]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-policy-pinning
buildsystem: deal with spaces in path to source
[apt.git] / test / integration / test-policy-pinning
index ea266e934d25e598d4b89756f4158ddccd05c3bb..3d09cb7ce511bb329c9a754ae9e4322fa3cd17c4 100755 (executable)
@@ -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)}"
@@ -101,11 +110,11 @@ testequalpolicycoolstuff() {
        local BPO2ARCHIVE=""
        if [ ! "$7" = "2.0~bpo2" ]; then
                BPO1PIN="$AB"
-               BPO1ARCHIVE="        $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages"
+               BPO1ARCHIVE="        $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main all Packages"
        else
                BPO2ARCHIVE="
      2.0~bpo2 $AB
-        $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main i386 Packages"
+        $(echo "$AB" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} backports/main all Packages"
                SB="$(echo "$SB" | tail -n 1)"
                shift
        fi
@@ -117,7 +126,7 @@ testequalpolicycoolstuff() {
  $IB 2.0~bpo1 $PB
 ${BPO1ARCHIVE}$SB
  $IS 1.0 $AS
-        $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} stable/main i386 Packages$SS" \
+        $(echo "$AS" | awk '{ printf("%3s\n",$0) }') file:${APTARCHIVE} stable/main all Packages$SS" \
                aptcache policy coolstuff -o Policy=${INSTALLED}-${CANDIDATE}-${AB}-${AS}-${PB} $*
 }
 
@@ -293,7 +302,7 @@ Pin-Priority: 2147483648
 " > rootdir/etc/apt/preferences
 
 testfailureequal "Reading package lists...
-E: Cannot convert 2147483648 to integer -  (34: Numerical result out of range)
+E: Cannot convert 2147483648 to integer: out of range
 E: ${tmppath}/rootdir/etc/apt/preferences: Value 2147483648 is outside the range of valid pin priorities (-32768 to 32767)" \
  aptget install -s coolstuff -o PinPriority=2147483648