summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-08-22 15:10:45 +0000
committerJulian Andres Klode <jak@debian.org>2024-08-22 15:10:45 +0000
commit8a8fdea4c71fbddfda9f7d6a1d9ec5da68870e12 (patch)
tree767576588cb2578048c0467771bbfe0ca9d7056d /test
parentf51b662525c78149892be16c111bad44b05f6c63 (diff)
parent67070389f3752f6f23d1fb0c06bd963464aa8bca (diff)
Merge branch 'pin-source-version' into 'main'
Implement 'Pin: source-version <foo>' See merge request apt-team/apt!372
Diffstat (limited to 'test')
-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