]>
git.saurik.com Git - apt.git/blob - test/integration/test-dpkg-assert-multi-arch
   4 TESTDIR
="$(readlink -f "$(dirname "$0")")" 
   7 configarchitecture 'amd64' 'i386' 
   9 buildsimplenativepackage 'native-pkg' 'amd64' '1.0' 'stable' 
  10 buildsimplenativepackage 'foreign-pkg' 'i386' '0.5' 'stable' 'Multi-Arch: foreign' 
  11 buildsimplenativepackage 'same-lib' 'amd64,i386' '0.5' 'stable' 'Multi-Arch: same' 
  12 buildsimplenativepackage 'all-pkg' 'all' '2.0' 'stable' 
  13 buildsimplenativepackage 'all-foreign-pkg' 'all' '2.0' 'stable' 'Multi-Arch: foreign' 
  18         msgtest 'Test with' $1 'for correct qualifier mode' $2 
  19         #aptget install $1 -qq -o Debug::pkgDPkgPM=1 || true 
  20         aptget install $1 -qq -o Debug::pkgDPkgPM=1 -o Dpkg::ExplicitLastConfigure=1 -o PackageManager::Configure=all > testqualifier.output 2>&1 || true 
  21         GIVEN="$(grep -v -- '--unpack' testqualifier.output | sed -ne 's/^.*--[rpc][^ ]* \([^ ]*\).
*$
/\
1/p
')" 
  22         if [ "$GIVEN" = "$2" ]; then 
  25                 cat >&2 testqualifier.output 
  32 msgmsg 'non
-multiarch or 
"ubuntus" old multiarchified dpkg
' 
  33 echo 'Dir
::Bin
::dpkg 
"./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper 
  34 cat > ./dpkg-wrapper <<EOF 
  36 if echo "\$*" | grep -q -- "--assert-multi-arch"; then 
  37         echo >&2 'dpkg
: Fehler
: unbekannte Option 
--assert-multi-arch' 
  38         echo >&1 'dpkg
: Info
: unbekannte Option 
--assert-multi-arch' 
  43 chmod +x ./dpkg-wrapper 
  45 testqualifier 'native
-pkg' 'native
-pkg' 
  46 testqualifier 'native
-pkg:amd64
' 'native
-pkg' 
  47 testqualifier 'foreign
-pkg' 'foreign
-pkg:i386
' 
  48 testqualifier 'foreign
-pkg:i386
' 'foreign
-pkg:i386
' 
  49 testqualifier 'same
-lib' 'same
-lib' 
  50 testqualifier 'same
-lib:amd64
' 'same
-lib' 
  51 testqualifier 'same
-lib:i386
' 'same
-lib:i386
' 
  52 testqualifier 'all
-pkg' 'all
-pkg' 
  53 testqualifier 'all
-pkg:amd64
' 'all
-pkg' 
  54 testqualifier 'all
-foreign-pkg' 'all
-foreign-pkg' 
  55 testqualifier 'all
-foreign-pkg:amd64
' 'all
-foreign-pkg' 
  56 insertinstalledpackage 'all
-pkg' 'amd64
' '1.0' 
  57 insertinstalledpackage 'all
-foreign-pkg' 'amd64
' '1.0' 'Multi
-Arch: foreign
' 
  58 testqualifier 'all
-pkg' 'all
-pkg' 
  59 testqualifier 'all
-pkg:amd64
' 'all
-pkg' 
  60 testqualifier 'all
-foreign-pkg' 'all
-foreign-pkg' 
  61 testqualifier 'all
-foreign-pkg:amd64
' 'all
-foreign-pkg' 
  62 insertinstalledpackage 'always
-all-pkg' 'all
' '1.0' 
  63 insertinstalledpackage 'always
-all-foreign-pkg' 'all
' '1.0' 'Multi
-Arch: foreign
' 
  64 testqualifier 'all
-pkg-' 'all
-pkg' 
  65 testqualifier 'all
-foreign-pkg-' 'all
-foreign-pkg' 
  66 testqualifier 'always
-all-pkg-' 'always
-all-pkg' 
  67 testqualifier 'always
-all-foreign-pkg-' 'always
-all-foreign-pkg' 
  69 msgmsg 'multiarch dpkg 
(new interface version
)' 
  70 rm rootdir/var/lib/dpkg/status 
  71 touch rootdir/var/lib/dpkg/status 
  72 echo 'Dir
::Bin
::dpkg 
"./dpkg-wrapper";' > rootdir/etc/apt/apt.conf.d/99dpkgwrapper 
  73 cat > ./dpkg-wrapper <<EOF 
  75 if echo "\$*" | grep -q -- "--assert-multi-arch"; then 
  80 chmod +x ./dpkg-wrapper 
  82 testqualifier 'native
-pkg' 'native
-pkg:amd64
' 
  83 testqualifier 'native
-pkg:amd64
' 'native
-pkg:amd64
' 
  84 testqualifier 'foreign
-pkg' 'foreign
-pkg:i386
' 
  85 testqualifier 'foreign
-pkg:i386
' 'foreign
-pkg:i386
' 
  86 testqualifier 'same
-lib' 'same
-lib:amd64
' 
  87 testqualifier 'same
-lib:amd64
' 'same
-lib:amd64
' 
  88 testqualifier 'same
-lib:i386
' 'same
-lib:i386
' 
  89 testqualifier 'all
-pkg' 'all
-pkg:all
' 
  90 testqualifier 'all
-pkg:amd64
' 'all
-pkg:all
' 
  91 testqualifier 'all
-foreign-pkg' 'all
-foreign-pkg:all
' 
  92 testqualifier 'all
-foreign-pkg:amd64
' 'all
-foreign-pkg:all
' 
  93 insertinstalledpackage 'all
-pkg' 'amd64
' '1.0' 
  94 insertinstalledpackage 'all
-foreign-pkg' 'amd64
' '1.0' 'Multi
-Arch: foreign
' 
  95 testqualifier 'all
-pkg' 'all
-pkg:all
' 
  96 testqualifier 'all
-pkg:amd64
' 'all
-pkg:all
' 
  97 testqualifier 'all
-foreign-pkg' 'all
-foreign-pkg:all
' 
  98 testqualifier 'all
-foreign-pkg:amd64
' 'all
-foreign-pkg:all
' 
  99 insertinstalledpackage 'always
-all-pkg' 'all
' '1.0' 
 100 insertinstalledpackage 'always
-all-foreign-pkg' 'all
' '1.0' 'Multi
-Arch: foreign
' 
 101 testqualifier 'all
-pkg-' 'all
-pkg:amd64
' 
 102 testqualifier 'all
-foreign-pkg-' 'all
-foreign-pkg:amd64
' 
 103 testqualifier 'always
-all-pkg-' 'always
-all-pkg:all
' 
 104 testqualifier 'always
-all-foreign-pkg-' 'always
-all-foreign-pkg:all
'