diff options
-rw-r--r-- | apt-pkg/cacheset.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-policy-pinning | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index db34c4a20..816925c4d 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -336,7 +336,7 @@ bool CacheSetHelper::PackageFromString(PackageContainerInterface * const pci, pk bool CacheSetHelper::PackageFromCommandLine(PackageContainerInterface * const pci, pkgCacheFile &Cache, const char **cmdline) { bool found = false; for (const char **I = cmdline; *I != 0; ++I) - found |= PackageFrom(CacheSetHelper::PACKAGENAME, pci, Cache, *I); + found |= PackageFrom(CacheSetHelper::STRING, pci, Cache, *I); return found; } /*}}}*/ diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning index dba873656..062c8058f 100755 --- a/test/integration/test-policy-pinning +++ b/test/integration/test-policy-pinning @@ -83,6 +83,15 @@ buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports" setupaptarchive +testsuccessequal "coolstuff: + Installed: (none) + Candidate: 2.0~bpo1 + Version table: + 2.0~bpo1 500 + 500 file:${APTARCHIVE} backports/main all Packages + 1.0 500 + 500 file:${APTARCHIVE} stable/main all Packages" apt policy '^cool.*' + testequalpolicycoolstuff() { local INSTALLED="${1:-(none)}" local CANDIDATE="${2:-(none)}" |