You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

31 lines
844 B

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