Просмотр исходного кода

* apt-pkg/deb/debsystem.cc:
- add better config item for extended_states file

David Kalnischkies лет назад: 16
Родитель
Сommit
d34690e1dc
6 измененных файлов с 15 добавлено и 11 удалено
  1. 1 1
      apt-pkg/deb/debsystem.cc
  2. 2 2
      apt-pkg/depcache.cc
  3. 2 0
      debian/changelog
  4. 1 6
      doc/apt-mark.8.xml
  5. 8 0
      doc/apt.ent
  6. 1 2
      doc/examples/configure-index

+ 1 - 1
apt-pkg/deb/debsystem.cc

@@ -158,7 +158,7 @@ bool debSystem::Initialize(Configuration &Cnf)
    /* These really should be jammed into a generic 'Local Database' engine
       which is yet to be determined. The functions in pkgcachegen should
       be the only users of these */
-   Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct
+   Cnf.CndSet("Dir::State::extended_states", Cnf.FindDir("Dir::State").append("extended_states"));
    Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status");
    Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg");
 

+ 2 - 2
apt-pkg/depcache.cc

@@ -165,7 +165,7 @@ bool pkgDepCache::Init(OpProgress *Prog)
 bool pkgDepCache::readStateFile(OpProgress *Prog)			/*{{{*/
 {
    FileFd state_file;
-   string const state = _config->FindDir("Dir::State") + "extended_states";
+   string const state = _config->FindFile("Dir::State::extended_states");
    if(FileExists(state)) {
       state_file.Open(state, FileFd::ReadOnly);
       int const file_size = state_file.Size();
@@ -222,7 +222,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)	/*{{{*/
       std::clog << "pkgDepCache::writeStateFile()" << std::endl;
 
    FileFd StateFile;
-   string const state = _config->FindDir("Dir::State") + "extended_states";
+   string const state = _config->FindFile("Dir::State::extended_states");
 
    // if it does not exist, create a empty one
    if(!FileExists(state)) 

+ 2 - 0
debian/changelog

@@ -4,6 +4,8 @@ apt (0.7.26~exp6) UNRELEASED; urgency=low
   * apt-pkg/deb/dpkgpm.cc:
     - write Disappeared also to the history.log
     - forward manual-installed bit on package disappearance
+  * apt-pkg/deb/debsystem.cc:
+    - add better config item for extended_states file
 
  -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 27 May 2010 17:34:51 +0200
 

+ 1 - 6
doc/apt-mark.8.xml

@@ -121,12 +121,7 @@
 
  <refsect1><title>Files</title>
    <variablelist>
-      <varlistentry><term><filename>/var/lib/apt/extended_states</filename></term>
-      <listitem><para>Status list of auto-installed packages.
-		      Configuration Item: <literal>Dir::State</literal>
-		      sets the path to the <filename>extended_states</filename> file.
-      </para></listitem>
-      </varlistentry>
+	&file-extended_states;
    </variablelist>
  </refsect1>
 

+ 8 - 0
doc/apt.ent

@@ -363,6 +363,14 @@
      </varlistentry>
 ">
 
+<!ENTITY file-extended_states "
+      <varlistentry><term><filename>/var/lib/apt/extended_states</filename></term>
+      <listitem><para>Status list of auto-installed packages.
+      Configuration Item: <literal>Dir::State::extended_states</literal>.
+      </para></listitem>
+      </varlistentry>
+">
+
 <!-- TRANSLATOR: This is the section header for the following paragraphs - comparable
      to the other headers like NAME and DESCRIPTION and should therefore be uppercase. -->
 <!ENTITY translation-title "TRANSLATION">

+ 1 - 2
doc/examples/configure-index

@@ -294,9 +294,8 @@ Dir "/"
   State "var/lib/apt/" 
   {
      Lists "lists/";
-     xstatus "xstatus";
-     userstatus "status.user";
      status "/var/lib/dpkg/status";
+     extended_states "extended_states";
      cdroms "cdroms.list";
   };