HCoop
/
ntk
/
apt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b6afec
)
* apt-pkg/depcache.cc:
author
Michael Vogt
<michael.vogt@ubuntu.com>
Tue, 4 Jul 2006 07:22:49 +0000
(09:22 +0200)
committer
Michael Vogt
<michael.vogt@ubuntu.com>
Tue, 4 Jul 2006 07:22:49 +0000
(09:22 +0200)
- create a empty state file if none exists
apt-pkg/depcache.cc
patch
|
blob
|
blame
|
history
diff --git
a/apt-pkg/depcache.cc
b/apt-pkg/depcache.cc
index
7663d38
..
25a4372
100644
(file)
--- a/
apt-pkg/depcache.cc
+++ b/
apt-pkg/depcache.cc
@@
-186,6
+186,15
@@
bool pkgDepCache::writeStateFile(OpProgress *prog)
FileFd StateFile;
string state = _config->FindDir("Dir::State") + "extended_states";
+
+ // if it does not exist, create a empty one
+ if(!FileExists(state))
+ {
+ StateFile.Open(state, FileFd::WriteEmpty);
+ StateFile.Close();
+ }
+
+ // open it
if(!StateFile.Open(state, FileFd::ReadOnly))
return _error->Error(_("Failed to open StateFile %s"),
state.c_str());