From d99c3f9f81e37bf6a625ef5cc1270656990a2309 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 30 Apr 2008 10:33:27 +0200 Subject: aptsources/distro.py: fix typo (thanks to cjwatson) --- aptsources/distro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aptsources/distro.py b/aptsources/distro.py index debbb12a..6d3b453f 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -167,7 +167,7 @@ class Distribution: # try to guess the nearest mirror from the locale self.country = None self.country_code = None - locale = os.getenv("LANG", default="en.UK") + locale = os.getenv("LANG", default="en_UK") a = locale.find("_") z = locale.find(".") if z == -1: -- cgit v1.2.3 From 890400953236172486955263fbd54b52bc64488a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 May 2008 10:36:28 +0200 Subject: * data/templates/Ubuntu.info.in: - added ubuntu 'intrepid' --- data/templates/Ubuntu.info.in | 52 +++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 2 ++ 2 files changed, 54 insertions(+) diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 47ab53de..5561862d 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -1,5 +1,57 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/changelog +Suite: intrepid +RepositoryType: deb +BaseURI: http://archive.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu +MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors +_Description: Ubuntu 8.10 'Intrepid Ibex' +Component: main +_CompDescription: Officially supported +_CompDescriptionLong: Canonical-supported Open Source software +Component: universe +_CompDescription: Community-maintained +_CompDescriptionLong: Community-maintained Open Source software +Component: restricted +_CompDescription: Non-free drivers +_CompDescriptionLong: Proprietary drivers for devices +Component: multiverse +_CompDescription: Restricted software +_CompDescriptionLong: Software restricted by copyright or legal issues + +Suite: intrepid +MatchName: .* +BaseURI: cdrom:\[Ubuntu.*8.10 +_Description: Cdrom with Ubuntu 8.10 'Intrepid Ibex' +Available: False +Component: main +_CompDescription: Officially supported +Component: restricted +_CompDescription: Restricted copyright + +Suite: intrepid-security +ParentSuite: intrepid +RepositoryType: deb +BaseURI: http://security.ubuntu.com/ubuntu/ +MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com +_Description: Important security updates + +Suite: intrepid-updates +ParentSuite: intrepid +RepositoryType: deb +_Description: Recommended updates + +Suite: intrepid-proposed +ParentSuite: intrepid +RepositoryType: deb +_Description: Pre-released updates + +Suite: intrepid-backports +ParentSuite: intrepid +RepositoryType: deb +_Description: Unsupported updates + + Suite: hardy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ diff --git a/debian/changelog b/debian/changelog index 08fe98a8..37c26a91 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ python-apt (0.7.5) UNRELEASED; urgency=low * apt/cache.py: - add reqReinstallPkgs property that lists all packages in ReInstReq or HoldReInstReq + * data/templates/Ubuntu.info.in: + - added ubuntu 'intrepid' -- Michael Vogt Fri, 04 Jan 2008 21:17:00 +0100 -- cgit v1.2.3 From 8ada71a45a165cd0a4731a890a8a281b6188098e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 5 May 2008 10:48:30 +0200 Subject: * debian/README.source: - added (basic) documentation how to build python-apt --- debian/README.source | 3 +++ debian/changelog | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 debian/README.source diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 00000000..ecd31364 --- /dev/null +++ b/debian/README.source @@ -0,0 +1,3 @@ +This package is maintained in bzr and it should be build +with: +$ bzr-buildpackage --native diff --git a/debian/changelog b/debian/changelog index 37c26a91..b370e53a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ python-apt (0.7.5) UNRELEASED; urgency=low ReInstReq or HoldReInstReq * data/templates/Ubuntu.info.in: - added ubuntu 'intrepid' + * debian/README.source: + - added (basic) documentation how to build python-apt -- Michael Vogt Fri, 04 Jan 2008 21:17:00 +0100 -- cgit v1.2.3 From 5bd807b1a1b05d8ba44a6c330cd55222b9fe9a46 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 May 2008 11:57:55 +0200 Subject: * aptsources/distinfo.py: - support arch specific BaseURI and MatchURI in the distinfo template --- aptsources/distinfo.py | 10 ++++++++-- data/templates/Ubuntu.info.in | 4 ++++ debian/changelog | 3 +++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index fdd063a5..5c8f7782 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -28,6 +28,7 @@ import gettext from os import getenv import ConfigParser import string +import apt_pkg #from gettext import gettext as _ import gettext @@ -126,6 +127,8 @@ 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 match_loc = re.compile(r"^#LOC:(.+)$") @@ -185,10 +188,13 @@ class DistInfo: template.available = value elif field == 'RepositoryType': template.type = value - elif field == 'BaseURI': + elif field == 'BaseURI' and not template.base_uri: template.base_uri = value + elif field == 'BaseURI-%s' % self.arch: + template.base_uri = value + elif field == 'MatchURI' and not template.match_uri: template.match_uri = value - elif field == 'MatchURI': + elif field == 'MatchURI-%s' % self.arch: template.match_uri = value elif field == 'MirrorsFile': if not map_mirror_sets.has_key(value): diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 5561862d..30cbaa5e 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -3,6 +3,8 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chang Suite: intrepid RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ +BaseURI-powerpc: http://ports.ubuntu.com/ubuntu/ +MatchURI-powerpc: ports.ubuntu.com MatchURI: archive.ubuntu.com/ubuntu MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.10 'Intrepid Ibex' @@ -56,6 +58,8 @@ Suite: hardy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu +BaseURI-powerpc: http://ports.ubuntu.com/ubuntu/ +MatchURI-powerpc: ports.ubuntu.com MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.04 'Hardy Heron' Component: main diff --git a/debian/changelog b/debian/changelog index b370e53a..b2ee0469 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,9 @@ python-apt (0.7.5) UNRELEASED; urgency=low - added ubuntu 'intrepid' * debian/README.source: - added (basic) documentation how to build python-apt + * aptsources/distinfo.py: + - support arch specific BaseURI and MatchURI in the distinfo + template -- Michael Vogt Fri, 04 Jan 2008 21:17:00 +0100 -- cgit v1.2.3 From ec243913efd84b2cf8655f7ab82c12398e4f7bc8 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 May 2008 12:01:11 +0200 Subject: security is only on ports.ubuntu.com now too --- data/templates/Ubuntu.info.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 30cbaa5e..6d1d0819 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -3,7 +3,7 @@ _ChangelogURI: http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chang Suite: intrepid RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ -BaseURI-powerpc: http://ports.ubuntu.com/ubuntu/ +BaseURI-powerpc: http://ports.ubuntu.com/ MatchURI-powerpc: ports.ubuntu.com MatchURI: archive.ubuntu.com/ubuntu MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors @@ -58,7 +58,7 @@ Suite: hardy RepositoryType: deb BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu -BaseURI-powerpc: http://ports.ubuntu.com/ubuntu/ +BaseURI-powerpc: http://ports.ubuntu.com/ MatchURI-powerpc: ports.ubuntu.com MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.04 'Hardy Heron' @@ -90,6 +90,8 @@ ParentSuite: hardy RepositoryType: deb BaseURI: http://security.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com +BaseURI-powerpc: http://ports.ubuntu.com/ +MatchURI-powerpc: ports.ubuntu.com/ubuntu _Description: Important security updates Suite: hardy-updates -- cgit v1.2.3 From 35d1d39728f6e2ef5e025b2359ee6d53911f9cc1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 May 2008 12:08:14 +0200 Subject: make MirrorsFile arch specific too --- aptsources/distinfo.py | 3 ++- data/templates/Ubuntu.info.in | 6 ++++-- debian/changelog | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/aptsources/distinfo.py b/aptsources/distinfo.py index 5c8f7782..9b438701 100644 --- a/aptsources/distinfo.py +++ b/aptsources/distinfo.py @@ -196,7 +196,8 @@ class DistInfo: template.match_uri = value elif field == 'MatchURI-%s' % self.arch: template.match_uri = value - elif field == 'MirrorsFile': + elif (field == 'MirrorsFile' or + field == 'MirrorsFile-%s' % self.arch): if not map_mirror_sets.has_key(value): mirror_set = {} try: diff --git a/data/templates/Ubuntu.info.in b/data/templates/Ubuntu.info.in index 6d1d0819..c3cfe6df 100644 --- a/data/templates/Ubuntu.info.in +++ b/data/templates/Ubuntu.info.in @@ -6,7 +6,8 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ BaseURI-powerpc: http://ports.ubuntu.com/ MatchURI-powerpc: ports.ubuntu.com MatchURI: archive.ubuntu.com/ubuntu -MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-amd64: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-i386: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.10 'Intrepid Ibex' Component: main _CompDescription: Officially supported @@ -60,7 +61,8 @@ BaseURI: http://archive.ubuntu.com/ubuntu/ MatchURI: archive.ubuntu.com/ubuntu BaseURI-powerpc: http://ports.ubuntu.com/ MatchURI-powerpc: ports.ubuntu.com -MirrorsFile: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-amd64: /usr/share/python-apt/templates/Ubuntu.mirrors +MirrorsFile-i386: /usr/share/python-apt/templates/Ubuntu.mirrors _Description: Ubuntu 8.04 'Hardy Heron' Component: main _CompDescription: Officially supported diff --git a/debian/changelog b/debian/changelog index b2ee0469..0f046f26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,8 @@ python-apt (0.7.5) UNRELEASED; urgency=low * debian/README.source: - added (basic) documentation how to build python-apt * aptsources/distinfo.py: - - support arch specific BaseURI and MatchURI in the distinfo - template + - support arch specific BaseURI, MatchURI and MirrosFile fields + in the distinfo template -- Michael Vogt Fri, 04 Jan 2008 21:17:00 +0100 -- cgit v1.2.3 From cabdf7f7238ad23e7d61074e542c065b86b25268 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 13 Jun 2008 11:59:36 +0200 Subject: * apt/cache.py: - add "memonly" option to apt.Cache() to force python-apt to not touch the pkgcache.bin file (this works around a possible race condition in the pkgcache.bin handling) --- apt/cache.py | 5 ++++- debian/changelog | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apt/cache.py b/apt/cache.py index a92bd5be..384afe31 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -41,8 +41,11 @@ class Cache(object): dictionary """ - def __init__(self, progress=None, rootdir=None): + def __init__(self, progress=None, rootdir=None, memonly=False): self._callbacks = {} + if memonly: + # force apt to build its caches in memory + apt_pkg.Config.Set("Dir::Cache::pkgcache","") if rootdir: apt_pkg.Config.Set("Dir", rootdir) apt_pkg.Config.Set("Dir::State::status", rootdir + "/var/lib/dpkg/status") diff --git a/debian/changelog b/debian/changelog index 68a7627f..db1211ab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +python-apt (0.7.6) unstable; urgency=low + + * apt/cache.py: + - add "memonly" option to apt.Cache() to force python-apt to + not touch the pkgcache.bin file (this works around a possible + race condition in the pkgcache.bin handling) + + -- + python-apt (0.7.5) unstable; urgency=low * use the new ListUpdate() code -- cgit v1.2.3 From 58322f187bef63ef6c6768cb055401401623b64a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 13 Jun 2008 12:00:33 +0200 Subject: make the changelog match the debian upload --- debian/changelog | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index db1211ab..25beaeee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,13 @@ python-apt (0.7.6) unstable; urgency=low - add "memonly" option to apt.Cache() to force python-apt to not touch the pkgcache.bin file (this works around a possible race condition in the pkgcache.bin handling) + * data/templates/Ubuntu.info.in: + - added ubuntu 'intrepid' + * debian/README.source: + - added (basic) documentation how to build python-apt + * aptsources/distinfo.py: + - support arch specific BaseURI, MatchURI and MirrosFile fields + in the distinfo template -- @@ -23,13 +30,6 @@ python-apt (0.7.5) unstable; urgency=low * apt/cache.py: - add reqReinstallPkgs property that lists all packages in ReInstReq or HoldReInstReq - * data/templates/Ubuntu.info.in: - - added ubuntu 'intrepid' - * debian/README.source: - - added (basic) documentation how to build python-apt - * aptsources/distinfo.py: - - support arch specific BaseURI, MatchURI and MirrosFile fields - in the distinfo template -- Michael Vogt Tue, 19 Feb 2008 21:06:36 +0100 -- cgit v1.2.3