Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Control: reassign -1 python-apt On Fri, Dec 11, 2015 at 01:49:06PM +0100, Alexandre Detiste wrote: > Le vendredi 11 décembre 2015, 13:37:32 Julian Andres Klode a écrit : > > > Reading en.diff_Index translations from > > > /var/lib/apt/lists/ftp.be.debian.org_debian_dists_unstable_main_i18n_Translation-en.diff_Index: > > > done. > > > Rebuilding Xapian index... 0% > > > Traceback (most recent call last): > > > File "/usr/sbin/update-apt-xapian-index", line 104, in > > > indexer.rebuild(opts.pkgfile) > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 717, in > > > rebuild > > > self.buildIndex(dbdir, generator) > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 692, in > > > buildIndex > > > for doc in documents: > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 563, in > > > gen_documents_apt > > > for idx, pkg in enumerate(cache): > > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 231, in > > > __iter__ > > > yield self[pkgname] > > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 200, in > > > __getitem__ > > > raise KeyError('The cache has no package named %r' % key) > > > KeyError: "The cache has no package named 'WorldOfGoo'" > > > > > > > > > > I'm running since multiple weeks with a dummy package > > installed and cannot produce any error. > > I found just now that to reproduce this bug the package > must be installed & available in a repository. That helped me reproduce the issue. It is indeed a bug in python-apt. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. When replying, only quote what is necessary, and write each reply directly below the part(s) it pertains to (`inline'). Thank you.
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Control: reassign -1 apt On Fri, Dec 11, 2015 at 02:01:44PM +0100, Julian Andres Klode wrote: > Control: reassign -1 python-apt > > On Fri, Dec 11, 2015 at 01:49:06PM +0100, Alexandre Detiste wrote: > > Le vendredi 11 décembre 2015, 13:37:32 Julian Andres Klode a écrit : > > > > Reading en.diff_Index translations from > > > > /var/lib/apt/lists/ftp.be.debian.org_debian_dists_unstable_main_i18n_Translation-en.diff_Index: > > > > done. > > > > Rebuilding Xapian index... 0% > > > > Traceback (most recent call last): > > > > File "/usr/sbin/update-apt-xapian-index", line 104, in > > > > indexer.rebuild(opts.pkgfile) > > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 717, in > > > > rebuild > > > > self.buildIndex(dbdir, generator) > > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 692, in > > > > buildIndex > > > > for doc in documents: > > > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 563, in > > > > gen_documents_apt > > > > for idx, pkg in enumerate(cache): > > > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 231, in > > > > __iter__ > > > > yield self[pkgname] > > > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 200, in > > > > __getitem__ > > > > raise KeyError('The cache has no package named %r' % key) > > > > KeyError: "The cache has no package named 'WorldOfGoo'" > > > > > > > > > > > > > > I'm running since multiple weeks with a dummy package > > > installed and cannot produce any error. > > > > I found just now that to reproduce this bug the package > > must be installed & available in a repository. > > That helped me reproduce the issue. It is indeed a bug in > python-apt. > It turns out to be a bug in APT itself. dpkg converts the package name to lower case after reading it, APT does not do the same. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. When replying, only quote what is necessary, and write each reply directly below the part(s) it pertains to (`inline'). Thank you.
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
On Fri, Dec 04, 2015 at 08:52:59PM +0100, Alexandre Detiste wrote: > Le vendredi 4 décembre 2015, 10:16:05 Julian Andres Klode a écrit : > > Control: reassign -1 unattended-upgrades > > > > On Fri, Dec 04, 2015 at 08:06:36AM +0100, Alexandre Detiste wrote: > > > Package: python3-apt > > > Version: 1.1.0~beta1 > > > Severity: normal > > > > > > Hi, > > > > > > Since the last update of python3-apt to 1.1, unattended-upgrades > > > is crashing on a package with an uppercase case name. > > > > > > I do know this package is not policy-compliant; > > > but still UU / python3-apt should handle this situation > > > in a more gracefull way than a triple exception. > > > (and more enterprise-ish stuff may want to use > > > uppercase package names too) > > > > dpkg won't even let you create packages with upper case package > > names. > > > > Internally they are mapped to lowercase before entered into the > > cache, so I don't know where unattended-upgrades gets the mixed > > case name from. > > > > The behaviour of not accepting the upper case name is consistent > > with APT (apt-cache show WorldOfGoo fails) and dpkg (dpkg -l > > WorldOfGoo fails too). > > > > As such, I'm not going to fix this in python-apt. This should > > be patched in unattended-upgrades that gets a mixed name from > > somewhere it should not look at. > > > > > > (keeping you in CC because I don't know if you'll get this mail > after bug has been reassigned) > > > update-apt-xapian-index now barfs on this upercase package too. > > I agree the package was likely built on a Debian-less system with "ar + tar" > and without lintian. > > It looks like in some cases the package name is converted to lowercase > and in other cases not. > > > > Reading en.diff_Index translations from > /var/lib/apt/lists/ftp.be.debian.org_debian_dists_unstable_main_i18n_Translation-en.diff_Index: > done. > Rebuilding Xapian index... 0% > Traceback (most recent call last): > File "/usr/sbin/update-apt-xapian-index", line 104, in > indexer.rebuild(opts.pkgfile) > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 717, in rebuild > self.buildIndex(dbdir, generator) > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 692, in > buildIndex > for doc in documents: > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 563, in > gen_documents_apt > for idx, pkg in enumerate(cache): > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 231, in __iter__ > yield self[pkgname] > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 200, in > __getitem__ > raise KeyError('The cache has no package named %r' % key) > KeyError: "The cache has no package named 'WorldOfGoo'" > > I'm running since multiple weeks with a dummy package installed and cannot produce any error. Running update-apt-xapian-index works fine as well. So I'm sorry, but I can't help here, I don't know where your code get's a mixed case package name from, but the expected response to mixed case package names is a "no such package" response. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. When replying, only quote what is necessary, and write each reply directly below the part(s) it pertains to (`inline'). Thank you.
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Le vendredi 11 décembre 2015, 13:37:32 Julian Andres Klode a écrit : > > Reading en.diff_Index translations from > > /var/lib/apt/lists/ftp.be.debian.org_debian_dists_unstable_main_i18n_Translation-en.diff_Index: > > done. > > Rebuilding Xapian index... 0% > > Traceback (most recent call last): > > File "/usr/sbin/update-apt-xapian-index", line 104, in > > indexer.rebuild(opts.pkgfile) > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 717, in > > rebuild > > self.buildIndex(dbdir, generator) > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 692, in > > buildIndex > > for doc in documents: > > File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 563, in > > gen_documents_apt > > for idx, pkg in enumerate(cache): > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 231, in > > __iter__ > > yield self[pkgname] > > File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 200, in > > __getitem__ > > raise KeyError('The cache has no package named %r' % key) > > KeyError: "The cache has no package named 'WorldOfGoo'" > > > > > > I'm running since multiple weeks with a dummy package > installed and cannot produce any error. I found just now that to reproduce this bug the package must be installed & available in a repository. Here removing this .deb from my local reprepro repository solved the problem. > Running update-apt-xapian-index works fine as well. > > So I'm sorry, but I can't help here, I don't know where your code > get's a mixed case package name from, but the expected response > to mixed case package names is a "no such package" response. That's right; you may close this bug as it only relate to people running unofficial repository with broken unofficial .deb files. Greets, Alexandre
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Control: reassign -1 unattended-upgrades On Fri, Dec 04, 2015 at 08:06:36AM +0100, Alexandre Detiste wrote: > Package: python3-apt > Version: 1.1.0~beta1 > Severity: normal > > Hi, > > Since the last update of python3-apt to 1.1, unattended-upgrades > is crashing on a package with an uppercase case name. > > I do know this package is not policy-compliant; > but still UU / python3-apt should handle this situation > in a more gracefull way than a triple exception. > (and more enterprise-ish stuff may want to use > uppercase package names too) dpkg won't even let you create packages with upper case package names. Internally they are mapped to lowercase before entered into the cache, so I don't know where unattended-upgrades gets the mixed case name from. The behaviour of not accepting the upper case name is consistent with APT (apt-cache show WorldOfGoo fails) and dpkg (dpkg -l WorldOfGoo fails too). As such, I'm not going to fix this in python-apt. This should be patched in unattended-upgrades that gets a mixed name from somewhere it should not look at. -- Julian Andres Klode - Debian Developer, Ubuntu Member See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/. When replying, only quote what is necessary, and write each reply directly below the part(s) it pertains to (`inline'). Thank you.
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Le vendredi 4 décembre 2015, 10:16:05 Julian Andres Klode a écrit : > Control: reassign -1 unattended-upgrades > > On Fri, Dec 04, 2015 at 08:06:36AM +0100, Alexandre Detiste wrote: > > Package: python3-apt > > Version: 1.1.0~beta1 > > Severity: normal > > > > Hi, > > > > Since the last update of python3-apt to 1.1, unattended-upgrades > > is crashing on a package with an uppercase case name. > > > > I do know this package is not policy-compliant; > > but still UU / python3-apt should handle this situation > > in a more gracefull way than a triple exception. > > (and more enterprise-ish stuff may want to use > > uppercase package names too) > > dpkg won't even let you create packages with upper case package > names. > > Internally they are mapped to lowercase before entered into the > cache, so I don't know where unattended-upgrades gets the mixed > case name from. > > The behaviour of not accepting the upper case name is consistent > with APT (apt-cache show WorldOfGoo fails) and dpkg (dpkg -l > WorldOfGoo fails too). > > As such, I'm not going to fix this in python-apt. This should > be patched in unattended-upgrades that gets a mixed name from > somewhere it should not look at. > > (keeping you in CC because I don't know if you'll get this mail after bug has been reassigned) update-apt-xapian-index now barfs on this upercase package too. I agree the package was likely built on a Debian-less system with "ar + tar" and without lintian. It looks like in some cases the package name is converted to lowercase and in other cases not. Reading en.diff_Index translations from /var/lib/apt/lists/ftp.be.debian.org_debian_dists_unstable_main_i18n_Translation-en.diff_Index: done. Rebuilding Xapian index... 0% Traceback (most recent call last): File "/usr/sbin/update-apt-xapian-index", line 104, in indexer.rebuild(opts.pkgfile) File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 717, in rebuild self.buildIndex(dbdir, generator) File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 692, in buildIndex for doc in documents: File "/usr/lib/python2.7/dist-packages/axi/indexer.py", line 563, in gen_documents_apt for idx, pkg in enumerate(cache): File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 231, in __iter__ yield self[pkgname] File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 200, in __getitem__ raise KeyError('The cache has no package named %r' % key) KeyError: "The cache has no package named 'WorldOfGoo'"
Bug#807012: python3-apt & unattended-upgrades get confused by uppercase pkg
Package: python3-apt Version: 1.1.0~beta1 Severity: normal Hi, Since the last update of python3-apt to 1.1, unattended-upgrades is crashing on a package with an uppercase case name. I do know this package is not policy-compliant; but still UU / python3-apt should handle this situation in a more gracefull way than a triple exception. (and more enterprise-ish stuff may want to use uppercase package names too) The .deb is located in a private reprepro repository to enable fast re-install on my "new win XP laptop of the year". I'm assigning this first to python3-apt, as this is where most changes recently happened. Greets, Alexandre lintian /var/www/html/repos/pool/main/W/WorldOfGoo/WorldOfGoo_1.41_all.deb | wc -l 2568 ... E: WorldOfGoo: bad-package-name E: WorldOfGoo: package-not-lowercase Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apt/cache.py", line 194, in __getitem__ return self._weakref[key] File "/usr/lib/python3.4/weakref.py", line 131, in __getitem__ o = self.data[key]() KeyError: 'WorldOfGoo' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apt/cache.py", line 198, in __getitem__ rawpkg = self._cache[key] KeyError: 'WorldOfGoo' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/unattended-upgrade", line 1437, in main(options) File "/usr/bin/unattended-upgrade", line 1182, in main allowed_origins=allowed_origins) File "/usr/bin/unattended-upgrade", line 104, in __init__ self.adjust_candidate_versions() File "/usr/bin/unattended-upgrade", line 119, in adjust_candidate_versions for pkg in self: File "/usr/lib/python3/dist-packages/apt/cache.py", line 231, in __iter__ yield self[pkgname] File "/usr/lib/python3/dist-packages/apt/cache.py", line 200, in __getitem__ raise KeyError('The cache has no package named %r' % key) KeyError: "The cache has no package named 'WorldOfGoo'" dpkg -I /var/www/html/repos/pool/main/W/WorldOfGoo/WorldOfGoo_1.41_all.deb Package: WorldOfGoo Architecture: all Version: 1.41 Maintainer: Maks VerverSection: games Priority: extra Homepage: http://www.worldofgoo.com/ Depends: libc6, libstdc++6, libgl1, libglu1, libx11-6 Installed-Size: 82132 Description: A physics based puzzle/construction game The millions of Goo Balls who live in the beautiful World of Goo don't know that they are in a game, or that they are extremely delicious. apt-cache policy worldofgoo worldofgoo: Installé : 1.41 Candidat : 1.41 Table de version : *** 1.41 100 100 /var/lib/dpkg/status -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing'), (450, 'unstable'), (400, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.2.0-1-amd64 (SMP w/6 CPU cores) Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages python3-apt depends on: ii libapt-inst2.0 1.1.3 ii libapt-pkg5.0 1.1.3 ii libc6 2.19-22 ii libgcc11:5.2.1-23 ii libstdc++6 5.2.1-23 ii python-apt-common 1.1.0~beta1 ii python33.4.3-7 Versions of packages python3-apt recommends: ii iso-codes3.63-1 ii lsb-release 9.20150917 Versions of packages python3-apt suggests: pn python-apt-doc pn python3-apt-dbg -- no debconf information