[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#383257: apt-utils: apt-ftparchive: does not read default configuration file



tag 383257 patch
owner 383257 !
thanks

On Tue, Aug 15, 2006 at 07:14:55PM -0400, Matt Swift wrote:
> Package: apt-utils
> Version: 0.6.45
> Severity: normal
> 
> The shell transcript below seems to demonstrate that apt-ftparchive
> does not heed the various APT::FTPArchive::Release configuration
> values I have set up in /etc/apt/apt.conf, which are documented in the
> apt-ftparchive man page.  If I point apt-ftparchive specifically to
> the default configuration file in /etc/apt/apt.conf, then it works.
> Without the explicit -c option, apt-ftparchive is not even reading
> /etc/apt/apt.conf: I show this below by introducing an error into
> /etc/apt/apt.conf.  Using the -o command line options also works.
> 

Here's the fix, if no objects; I will merge it. But I want to give
everyone some time to think about it, as it could break existing
installations if apt-ftparchive suddenly starts reading the standard
configuration files.

=== modified file 'debian/changelog'
--- debian/changelog	2010-03-21 17:11:46 +0000
+++ debian/changelog	2010-03-21 17:41:46 +0000
@@ -20,6 +20,8 @@ apt (0.7.26~exp3) UNRELEASED; urgency=lo
   * apt-pkg/policy.cc:
     - Always return a candidate if there is at least one version pinned > 0
       (Closes: #512318)
+  * ftparchive/apt-ftparchive.cc:
+    - Read default configuration (Closes: #383257)
   * debian/rules:
     - Fix the libraries name to be e.g. libapt-pkg4.9 instead of
       libapt-pkg-4.9.

=== modified file 'ftparchive/apt-ftparchive.cc'
--- ftparchive/apt-ftparchive.cc	2010-02-17 23:05:14 +0000
+++ ftparchive/apt-ftparchive.cc	2010-03-21 17:41:52 +0000
@@ -925,7 +925,7 @@ int main(int argc, const char *argv[])
 
    // Parse the command line and initialize the package library
    CommandLine CmdL(Args,_config);
-   if (CmdL.Parse(argc,argv) == false)
+   if (pkgInitConfig(*_config) == false || CmdL.Parse(argc,argv) == false)
    {
       _error->DumpErrors();
       return 100;




-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.

Attachment: pgp3kwaqOi3zi.pgp
Description: PGP signature


Reply to: