Debian Bug report logs - #760549
python-apt: apt_pkg.init_config() should apt_pkg.config.clean()

version graph

Package: python-apt; Maintainer for python-apt is APT Development Team <[email protected]>; Source for python-apt is src:python-apt (PTS, buildd, popcon).

Reported by: Raphaël Hertzog <[email protected]>

Date: Fri, 5 Sep 2014 07:57:07 UTC

Severity: wishlist

Tags: wontfix

Found in version python-apt/0.9.3.9

Full log


Message #17 received at [email protected] (full text, mbox, reply):

Received: (at 760549) by bugs.debian.org; 5 Sep 2014 08:31:40 +0000
From [email protected] Fri Sep 05 08:31:40 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
	(2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-8.8 required=4.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,FREEMAIL_FROM,FROMDEVELOPER,HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW,
	SPF_PASS autolearn=ham version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 5; hammy, 150; neutral, 65; spammy, 1.
	spammytokens:0.953-+--our hammytokens:0.000-+--python-apt, 0.000-+--pythonapt,
	 0.000-+--wikidebianorg, 0.000-+--UD:wiki.debian.org, 0.000-+--wiki.debian.org
Return-path: <[email protected]>
Received: from mail-oi0-f45.google.com ([209.85.218.45])
	by buxtehude.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
	(Exim 4.80)
	(envelope-from <[email protected]>)
	id 1XPovk-0007L2-Ac
	for [email protected]; Fri, 05 Sep 2014 08:31:40 +0000
Received: by mail-oi0-f45.google.com with SMTP id a3so7614863oib.18
        for <[email protected]>; Fri, 05 Sep 2014 01:31:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date:message-id
         :subject:to:content-type:content-transfer-encoding;
        bh=pGiKW6Su1tJf8H2Ks9nNpVZg2r7TfMNLHz2fW361eX8=;
        b=dRr1VwUFjtu/RYwg3fJ/PkI0umGkS3/mbjDCQqnr7RHWwXITSLKax2YV8TggLdSIAV
         yBhJxeU1sQULUj/x+EXFY/tNVnQopjLUyfFSMYTPbrEBlgSewI+Zx1vf1O5M/pWjKNl4
         +YwLh3gNo5foYyRKtdECV8ttBlc+ibbmBJ2Zt7IGXlovRLiM4tKxo/JS+VqxRDV3OOJO
         0lNkbuhZ6bFz3l4hX4dn7fnVoBZzsVjX+3fGtF8kUWQUm6Yef/EVHu6EOq3UxqRvL3ju
         QwuvlXWlSGizh9Wxp4H0Z0X58FICytI2nfhORSE8kejTS4EjDVMpbrnUvczfIXLwLEFF
         GCgw==
X-Received: by 10.182.181.42 with SMTP id dt10mr11317639obc.69.1409905893616;
 Fri, 05 Sep 2014 01:31:33 -0700 (PDT)
MIME-Version: 1.0
Sender: [email protected]
Received: by 10.182.45.200 with HTTP; Fri, 5 Sep 2014 01:31:13 -0700 (PDT)
In-Reply-To: <[email protected]>
References: <[email protected]> <[email protected]>
From: Julian Andres Klode <[email protected]>
Date: Fri, 5 Sep 2014 10:31:13 +0200
X-Google-Sender-Auth: Z_u3EIK2VEaaP29j8td-t5XwAiU
Message-ID: <CAEA6rAwhhxKRao8=aS3gj4O8JXXhpE33NAm6LvJXr3EjKE6Akw@mail.gmail.com>
Subject: Re: Bug#760549: python-apt: apt_pkg.init_config() should apt_pkg.config.clean()
To: Raphaël Hertzog <[email protected]>, 
	[email protected]
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On Fri, Sep 5, 2014 at 10:21 AM, Julian Andres Klode <[email protected]> wrote:
> On Fri, Sep 05, 2014 at 09:56:26AM +0200, Raphaël Hertzog wrote:
>> Furthermore it would be nice if the configuration was loaded in a lazy
>> way in all the apt.* modules. That would probably solve #728274.
>
> It would not, AFAICT. The thing with #728274 is that is a use case that
> directly conflicts with another use case. One group of users like in the
> bug report want to specify configuration files in the chroot, and others
> are setting them outside the chroot (especially APT::Architecture for
> foreign chroots).

Sorry, yes it actually would solve it in case you only create a single
Cache(). Unfortunately, our configuration is a global thing, and thus
the entries from the different root directory would remain even after
the cache was closed; for example, when creating a new one.

It might make sense to provide the ability to switch apt_pkg.config
between different Configuration instances (setting _config on the C++
level), but I'm not sure if that would provide a consistent behaviour.

In short, global state sucks a lot, and there's not much we can do to fix it.
-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

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



Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:17:11 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.