Kaynağa Gözat

* apt-pkg/depcache.cc:
- if no /var/lib/apt/extended_states exists, create a empty one

Michael Vogt 20 yıl önce
ebeveyn
işleme
a381270a2e
3 değiştirilmiş dosya ile 16 ekleme ve 1 silme
  1. 9 0
      apt-pkg/depcache.cc
  2. 1 1
      configure.in
  3. 6 0
      debian/changelog

+ 9 - 0
apt-pkg/depcache.cc

@@ -186,6 +186,15 @@ bool pkgDepCache::writeStateFile(OpProgress *prog)
 
 
    FileFd StateFile;
    FileFd StateFile;
    string state = _config->FindDir("Dir::State") + "extended_states";
    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))
    if(!StateFile.Open(state, FileFd::ReadOnly))
       return _error->Error(_("Failed to open StateFile %s"),
       return _error->Error(_("Failed to open StateFile %s"),
 			   state.c_str());
 			   state.c_str());

+ 1 - 1
configure.in

@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 
 dnl -- SET THIS TO THE RELEASE VERSION --
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.44.2ubuntu1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.44.2ubuntu2")
 PACKAGE="apt"
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
 AC_SUBST(PACKAGE)

+ 6 - 0
debian/changelog

@@ -1,3 +1,9 @@
+apt (0.6.44.2ubuntu2) edgy; urgency=low
+
+  * create a empty extended_states file if none exists already
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  4 Jul 2006 09:23:03 +0200
+
 apt (0.6.44.2ubuntu1) edgy; urgency=low
 apt (0.6.44.2ubuntu1) edgy; urgency=low
 
 
   * merged with debian/unstable
   * merged with debian/unstable