]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-bug-543966-downgrade-below-1000-pin
correct cross & disappear progress detection
[apt.git] / test / integration / test-bug-543966-downgrade-below-1000-pin
index e59231608937175fb6ef31080a49e6643835c433..db81b7c7a4dbbc2e08e5b71fac02f60829ed6794 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 set -e
 
 #!/bin/sh
 set -e
 
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
 
 setupenvironment
 configarchitecture 'i386'
 
 setupenvironment
 configarchitecture 'i386'
@@ -13,16 +13,16 @@ insertinstalledpackage 'base-files' 'all' '5.0.0-1'
 setupaptarchive
 
 STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
 setupaptarchive
 
 STATUS=$(readlink -f rootdir/var/lib/dpkg/status)
-APTARCHIVE="$(readlink -f aptarchive)/"
+APTARCHIVE="$(readlink -f aptarchive)"
 
 testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
   Version table:
 
 testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
   Version table:
- *** 5.0.0-1 0
+ *** 5.0.0-1 100
         100 $STATUS
         100 $STATUS
-     5.0.0 0
-        500 file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=0
+     5.0.0 500
+        500 file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=0
 
 writepin() {
        echo "Package: $1
 
 writepin() {
        echo "Package: $1
@@ -33,54 +33,51 @@ Pin-Priority: $2" > rootdir/etc/apt/preferences
 
 
 testpinning() {
 
 
 testpinning() {
-       local PKGPIN=''
-       local PKGPINPRIO='0'
+       local PKGPINPRIO=''
        local REPPINPRIO=''
        if [ "$1" != '*' ]; then
                PKGPINPRIO=''
                REPPINPRIO=' 500'
        local REPPINPRIO=''
        if [ "$1" != '*' ]; then
                PKGPINPRIO=''
                REPPINPRIO=' 500'
-               PKGPIN='Package pin: 5.0.0
-  '
        fi
        writepin "$1" '99'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
        fi
        writepin "$1" '99'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
-  ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-99}
+  Version table:
+ *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-99}
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-99}
-       ${REPPINPRIO:-  99} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=99
+       ${REPPINPRIO:-  99} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=99
 
        writepin "$1" '100'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
 
        writepin "$1" '100'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
-  ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-100}
+  Version table:
+ *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-100}
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-100}
-       ${REPPINPRIO:- 100} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=100
+       ${REPPINPRIO:- 100} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=100
 
        writepin "$1" '999'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
 
        writepin "$1" '999'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0-1
-  ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-999}
+  Version table:
+ *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-999}
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-999}
-       ${REPPINPRIO:- 999} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=999
+       ${REPPINPRIO:- 999} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=999
 
        writepin "$1" '1000'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0
 
        writepin "$1" '1000'
        testsuccessequal "base-files:
   Installed: 5.0.0-1
   Candidate: 5.0.0
-  ${PKGPIN}Version table:
- *** 5.0.0-1 ${PKGPINPRIO:-1000}
+  Version table:
+ *** 5.0.0-1 100
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-1000}
         100 $STATUS
      5.0.0 ${PKGPINPRIO:-1000}
-       ${REPPINPRIO:-1000} file:${APTARCHIVE} unstable/main i386 Packages" aptcache policy base-files -o apt::pin=1000
+       ${REPPINPRIO:-1000} file:${APTARCHIVE} unstable/main all Packages" aptcache policy base-files -o apt::pin=1000
 }
 
 msgmsg 'Tests with generic-form pin'
 }
 
 msgmsg 'Tests with generic-form pin'