summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-03-25 11:20:57 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2019-03-25 11:20:57 +0100
commit3b756807eb84f29acc5419e4039667aaf4a33702 (patch)
treec56b72971a35fdf3af55b4ccbddb45006507b9c7 /test
parent362c6eeb9979d9b3c18c30440fecfc4f2df85291 (diff)
Fix regression in pinning of local-only package versions
If a package version is only available in the status file, and that version is pinned, the never change made it ignore that pin, as it considered all available sources to have the pin "never" - which is wrong. LP: #1821308
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-policy-pinning16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index 6ee39077a..4615b3aa3 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -354,7 +354,21 @@ testsuccessequal "coolstuff:
1.0 0
500 file:${tmppath}/aptarchive/ stable/main i386 Packages" aptcache policy coolstuff
-
+msgmsg "Check that local-only versions can be pinned correctly (LP: #1821308)"
+echo "Package: coolstuff
+Pin: version 2.0~bpo1
+Pin-Priority: 1000" > rootdir/etc/apt/preferences
+testsuccessequal "coolstuff:
+ Installed: 2.0~bpo1
+ Candidate: 2.0~bpo1
+ Package pin: 2.0~bpo1
+ Version table:
+ 2.0~bpo2 1000
+ 100 file:${tmppath}/aptarchive/ backports/main i386 Packages
+ *** 2.0~bpo1 1000
+ 100 ${tmppath}/rootdir/var/lib/dpkg/status
+ 1.0 1000
+ 500 file:${tmppath}/aptarchive/ stable/main i386 Packages" aptcache policy coolstuff
msgmsg "Check for package-specific never pin"