#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64'
insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb'
insertpackage 'unstable' 'pkgb' 'amd64' '2'
insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb'
-insertpackage 'unstable' 'pkge' 'none' '1'
setupaptarchive
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
The following packages will be REMOVED:
pkgb:none
Inst pkgc (1 unstable [amd64])
Conf pkgc (1 unstable [amd64])' aptget install pkgc -s
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
-The following extra packages will be installed:
+The following additional packages will be installed:
pkgb
The following packages will be REMOVED:
pkgb:none
Conf pkgb (2 unstable [amd64])
Conf pkga (2 unstable [amd64])' aptget install pkga -s
-# ensure that arch-less stanzas from Packages files are ignored
-msgtest 'Package is distributed in the Packages files' 'pkge'
-grep -q 'Package: pkge' $(find aptarchive -name 'Packages') && msgpass || msgfail
-testnopackage pkge
-testnopackage pkge:none
-testnopackage pkge:*
-
# do not automatically change from none-arch to whatever-arch as
# this breaks other none packages and dpkg has this ruleset as
# this difference seems so important that it has to be maintained …
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s
insertinstalledpackage 'pkgx' 'none' '1'
insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)'
insertinstalledpackage 'pkgz' 'none' '1'
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
Purg pkgy:none [1]
Purg pkgx:none [1]' aptget purge pkgx -s
-testequal 'Reading package lists...
+testsuccessequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED: