~racb/ubuntu/quantal/apt/by_hash

« back to all changes in this revision

Viewing changes to test/integration/test-bug-595691-empty-and-broken-archive-files

  • Committer: Package Import Robot
  • Author(s): Steve Langasek, Michael Vogt, Steve Langasek
  • Date: 2012-06-11 22:36:16 UTC
  • mfrom: (1.4.47 sid)
  • Revision ID: package-import@ubuntu.com-20120611223616-1cctfc7qrxrx4vcu
Tags: 0.9.6ubuntu1
[ Michael Vogt ]
* merged from Debian, remaining changes:
  - use ubuntu keyring and ubuntu archive keyring in apt-key
  - run update-apt-xapian-index in apt.cron
  - support apt-key net-update and verify keys against master-keyring
  - run apt-key net-update in cron.daily
  - different example sources.list
  - APT::pkgPackageManager::MaxLoopCount set to 5000
  - apport pkgfailure handling
  - ubuntu changelog download handling
  - patch for apt cross-building, see http://bugs.debian.org/666772

[ Steve Langasek ]
* Drop upgrade handling for obsolete conffile /etc/apt/apt.conf.d/01ubuntu,
  removed in previous LTS.
* prepare-release: declare the packages needed as source build deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
createemptyarchive() {
29
29
        find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
30
30
        if [ "en" = "$1" ]; then
31
 
                echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS
 
31
                echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
32
32
        fi
33
33
        touch aptarchive/Packages
34
 
        echo -n "" | $COMPRESSOR > aptarchive/${1}.$COMPRESS
 
34
        echo -n "" | $COMPRESSOR_CMD > aptarchive/${1}.$COMPRESS
35
35
        generatereleasefiles
36
36
        signreleasefiles
37
37
        rm -f aptarchive/Packages
40
40
createemptyfile() {
41
41
        find aptarchive/ \( -name "Packages*" -o -name "en*" \) -type f -delete
42
42
        if [ "en" = "$1" ]; then
43
 
                echo -n "" | $COMPRESSOR > aptarchive/Packages.$COMPRESS
 
43
                echo -n "" | $COMPRESSOR_CMD > aptarchive/Packages.$COMPRESS
44
44
        fi
45
45
        touch aptarchive/Packages aptarchive/${1}.$COMPRESS
46
46
        generatereleasefiles
50
50
 
51
51
setupcompressor() {
52
52
        COMPRESSOR="$1"
 
53
        COMPRESSOR_CMD="$1"
53
54
        case $COMPRESSOR in
54
55
        gzip) COMPRESS="gz";;
55
56
        bzip2) COMPRESS="bz2";;
66
67
                echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor
67
68
        elif [ -e "/usr/bin/${COMPRESSOR}" ]; then
68
69
                echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor
 
70
        elif [ "${COMPRESSOR}" = 'lzma' ]; then
 
71
                echo "Dir::Bin::xz \"/usr/bin/xz\";" >> rootdir/etc/apt/apt.conf.d/00compressor
 
72
                COMPRESSOR_CMD='xz --format=lzma'
69
73
        else
70
74
                msgtest "Test for availability of compressor" "${COMPRESSOR}"
71
75
                msgfail
72
 
                exit 1
 
76
                #exit 1
73
77
        fi
74
78
}
75
79