]> git.saurik.com Git - apt.git/blobdiff - test/integration/test-apt-ftparchive-cachedb
Use _apt as our unprivileged user name
[apt.git] / test / integration / test-apt-ftparchive-cachedb
index 2a3bfce9967377dd68f8a65d8c980a187198b209..0e1986bcd0c407573eeb3f192e4b10d3346b7ddc 100755 (executable)
@@ -5,7 +5,7 @@ ensure_correct_packages_file() {
     testequal "Package: foo
 Priority: optional
 Section: others
-Installed-Size: 29
+$(dpkg-deb -I ./aptarchive/pool/main/foo_1_i386.deb | grep 'Installed-Size:' | sed 's#^ ##')
 Maintainer: Joe Sixpack <joe@example.org>
 Architecture: i386
 Version: 1
@@ -25,7 +25,7 @@ usr/share/doc/foo/copyright                               others/foo" cat ./aptarchive/dists/test/Conte
 TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
-configarchitecture "i386"
+configarchitecture 'i386'
 
 mkdir -p aptarchive/dists/test/main/i18n/
 mkdir -p aptarchive/dists/test/main/source/
@@ -91,3 +91,10 @@ ensure_correct_contents_file
 testequal " Misses in Cache: 0
  dists/test/Contents-i386: New 402 B  Misses in Cache: 0" grep Misses stats-out.txt
 
+# and clean
+rm -rf aptarchive/pool/main/*
+testequal "packages-main-i386.db" aptftparchive clean ftparchive.conf
+aptftparchive clean ftparchive.conf -o Debug::APT::FTPArchive::Clean=1 > clean-out.txt 2>&1 
+testequal "0   Number of unique keys in the tree" grep unique clean-out.txt
+testequal "packages-main-i386.db" grep packages-main-i386.db clean-out.txt
+