summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-08-22 16:10:58 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2024-08-22 16:11:38 +0200
commit67070389f3752f6f23d1fb0c06bd963464aa8bca (patch)
tree02e0e09f6d5a6e1132dab89b154418c3f5be7a7b /test/integration
parentaccc2f202eabfe472ceae37d9e4f4431a8cc298f (diff)
Implement 'Pin: source-version <foo>'
As wondered about by Paride some minutes ago.
Diffstat (limited to 'test/integration')
-rwxr-xr-xtest/integration/test-policy-pinning17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/integration/test-policy-pinning b/test/integration/test-policy-pinning
index dc3192fe9..99f193930 100755
--- a/test/integration/test-policy-pinning
+++ b/test/integration/test-policy-pinning
@@ -80,8 +80,9 @@ testglobalpolicy
msgmsg 'Test with specific packages'
+# Yeesh, the XB-Source stuff is hacky, hopefully this won't break.
buildsimplenativepackage "coolstuff" "all" "1.0" "stable"
-buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports"
+buildsimplenativepackage "coolstuff" "all" "2.0~bpo1" "backports" "XB-Source: coolstuff (2.0~bpo1-source-version)"
setupaptarchive
@@ -434,6 +435,20 @@ testsuccessequal "coolstuff:
1.0 500
500 file:${tmppath}/aptarchive stable/main all Packages" aptcache policy coolstuff
+echo "Package: coolstuff
+Pin: source-version 2.0~bpo1-source-version
+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
Pin: release n=backports