test-ubuntu-bug-859188-multiarch-reinstall 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386' 'armel'
  7. buildsimplenativepackage 'libsame' 'amd64,i386,armel' '1.0' 'unstable' 'Multi-Arch: same'
  8. # FIXME: hack around dpkg's current inability to handle multiarch, a clean install would be better…
  9. insertinstalledpackage 'libsame' 'amd64,i386' '1.0' 'Multi-Arch: same'
  10. sed -e 's#/installed#/unstable#' -e 's#Installed-Size: 42#Installed-Size: 1#' -i rootdir/var/lib/dpkg/status
  11. setupaptarchive
  12. REINSTALL='Reading package lists...
  13. Building dependency tree...
  14. 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
  15. Inst libsame [1.0] (1.0 unstable [amd64])
  16. Inst libsame:i386 [1.0] (1.0 unstable [i386])
  17. Conf libsame (1.0 unstable [amd64])
  18. Conf libsame:i386 (1.0 unstable [i386])'
  19. testequal "$REINSTALL" aptget install --reinstall libsame -s
  20. testequal "$REINSTALL" aptget install --reinstall libsame:amd64 -s
  21. testequal "$REINSTALL" aptget install --reinstall libsame:i386 -s
  22. testequal "$REINSTALL" aptget install --reinstall libsame:amd64 libsame:i386 -s