]> git.saurik.com Git - apt.git/blob - test/integration/test-bug-737130-multicompress-file-modes
test/integration/test-essential-force-loopbreak: fix on non-amd64 systems
[apt.git] / test / integration / test-bug-737130-multicompress-file-modes
1 #!/bin/sh
2 set -e
3
4 TESTDIR=$(readlink -f $(dirname $0))
5 . $TESTDIR/framework
6 setupenvironment
7 configarchitecture 'i386'
8
9 cat >aptarchive/ftparchive.conf <<EOF
10 Dir { ArchiveDir "$(pwd)/aptarchive"; CacheDir "$(pwd)/aptarchive"; };
11 Default { Translation::Compress ". gzip bzip2 xz"; FileMode 0644; };
12 tree "dists/sid" {
13 Sections "main";
14 Architectures "i386";
15 LongDescription "false";
16 };
17 EOF
18 mkdir -p aptarchive/dists/sid/main/binary-i386
19 mkdir -p aptarchive/dists/sid/main/i18n
20 testsuccess aptftparchive generate aptarchive/ftparchive.conf
21 i18n=aptarchive/dists/sid/main/i18n
22 for comp in '' .gz .bz2 .xz; do
23 msgtest 'Test apt-ftparchive file mode is 644 for' "Translation-en$comp"
24 FILEMODE="$(stat --format %a "$i18n/Translation-en$comp")"
25 if [ "$FILEMODE" != '644' ]; then
26 msgfail "Mode was '$FILEMODE'!"
27 else
28 msgpass
29 fi
30 done