handle pkgnames shorter than modifiers
authorDavid Kalnischkies <david@kalnischkies.de>
Mon, 21 Apr 2014 11:26:55 +0000 (13:26 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 26 Apr 2014 07:51:05 +0000 (09:51 +0200)
commitd99854cac4065bc7b337815fb2116269d58dab73
tree70da8273517b7ffb025aa47862c26f7fd6d54480
parent7187074bfc7a6932ab21c33546e71b61abe258e3
handle pkgnames shorter than modifiers

The bugreport highlights the problem with an empty package name. We fix
this by 'ignoring' these so that it behaves just like "apt-get install".
The deeper problem is that modifier strings can be longer than a package
name in which case the comparison doesn't make sense, so don't compare
then. Was not noticed so far as all modifiers are of length 1, so the
only package name shorter than this is in fact the empty package name.

Closes: 744940
apt-pkg/cacheset.cc
test/integration/test-ubuntu-bug-365611-long-package-names