From 08687ea30fffba24cf8204299285f3180f6ae3c3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 23 Aug 2008 10:45:14 +0200 Subject: do not run apt_pkg.init() in the middle of a function, that *destroys* all custom config data --- aptsources/distinfo.py | 1 - 1 file changed, 1 deletion(-) (limited to 'aptsources') diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index b962def6..a6c0faf8 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -128,7 +128,6 @@ class DistInfo: base_dir = "/usr/share/python-apt/templates"): self.metarelease_uri = '' self.templates = [] - apt_pkg.init() self.arch = apt_pkg.Config.Find("APT::Architecture") location = None -- cgit v1.2.3 From 34fa87e70cd6967805ba6faebf146bc4dcd5c14c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sat, 23 Aug 2008 11:10:57 +0200 Subject: * aptsources/__init__.py, aptsources/distinfo.py: - run apt_pkg.init() when aptsources gets imported and not the distinfo function --- aptsources/__init__.py | 4 ++++ debian/changelog | 3 +++ 2 files changed, 7 insertions(+) (limited to 'aptsources') diff --git a/aptsources/__init__.py b/aptsources/__init__.py index 8d1c8b69..d6b3605c 100644 --- a/aptsources/__init__.py +++ b/aptsources/__init__.py @@ -1 +1,5 @@ + +import apt_pkg +# init the package system +apt_pkg.init() diff --git a/debian/changelog b/debian/changelog index 6a8b7f7e..a2ae598a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,9 @@ python-apt (0.7.7.2) UNRELEASED; urgency=low * python/progress.cc: - when pulse() does not return a boolean assume "true" (thanks to Martin Pitt for telling me about the problem) + * aptsources/__init__.py, aptsources/distinfo.py: + - run apt_pkg.init() when aptsources gets imported and not + the distinfo function -- Michael Vogt Wed, 30 Jul 2008 10:24:30 +0200 -- cgit v1.2.3