summaryrefslogtreecommitdiff
path: root/test/integration/test-policy-pinning
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2019-04-02 17:03:04 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2019-05-07 11:23:31 +0200
commitab67c39b9cdd28d11dd43fe48bd1fdeab60d4c2f (patch)
tree6312a7c44109b907cf3472643e3c3aecada266ff /test/integration/test-policy-pinning
parentc28ce63c183d9fa0c8f5203ba8c3d162172d309d (diff)
Add test case for local-only packages pinned to never
Test from the fix for the regression in trusty for LP #1821308. (cherry picked from commit 61159a9be93f930066ad39e4f8eb658e18853b8e) (cherry picked from commit 436d5d5b573a8a30e0868a8af5c624801112377b) (cherry picked from commit a76f9705ab4dfa439fa2c8788ee67d0766700d07)
Diffstat (limited to 'test/integration/test-policy-pinning')
-rwxr-xr-xtest/integration/test-policy-pinning15
1 files changed, 14 insertions, 1 deletions
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index 1a9418855..6ba25c5c6 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -408,7 +408,20 @@ testsuccessequal "coolstuff:
500 file:${tmppath}/aptarchive stable/main all 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
+ Version table:
+ 2.0~bpo2 100
+ 100 file:${tmppath}/aptarchive backports/main all Packages
+ *** 2.0~bpo1 1000
+ 100 ${tmppath}/rootdir/var/lib/dpkg/status
+ 1.0 500
+ 500 file:${tmppath}/aptarchive stable/main all Packages" aptcache policy coolstuff
# Check for 0
echo "Package: coolstuff