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.
 
 
 
 
 
 

134 lines
4.5 KiB

  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'i386' 'amd64'
  7. # we need a valid locale here, otherwise the language configuration
  8. # will be overridden by LC_ALL=C
  9. LOCALE="$(echo "$LANG" | cut -d'_' -f 1)"
  10. MD5Sum='Description-md5: d41ee493aa9fcc6cbc9ce4eb7069959c'
  11. PACKAGESTANZA='Package: apt
  12. Priority: important
  13. Section: admin
  14. Installed-Size: 5984
  15. Maintainer: APT Development Team <deity@lists.debian.org>
  16. Architecture: i386
  17. Version: 0.8.7
  18. Filename: pool/main/a/apt/apt_0.8.7_i386.deb
  19. Size: 2140230
  20. MD5sum: 74769bfbcef9ebc4fa74f7a5271b9c08'
  21. PACKAGESTANZA2='Package: apt
  22. Priority: important
  23. Section: admin
  24. Installed-Size: 5984
  25. Maintainer: APT Development Team <deity@lists.debian.org>
  26. Architecture: amd64
  27. Version: 0.8.7
  28. Filename: pool/main/a/apt/apt_0.8.7_amd64.deb
  29. Size: 2210342
  30. MD5sum: 4a869bfbdef9ebc9fa74f7a5271e8d1a'
  31. echo "$PACKAGESTANZA
  32. Description: Advanced front-end for dpkg
  33. $MD5Sum
  34. $PACKAGESTANZA2
  35. Description: Advanced front-end for dpkg
  36. $MD5Sum" > aptarchive/Packages
  37. echo "Package: apt
  38. Description-${LOCALE}: Mächtige Oberfläche für dpkg
  39. Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
  40. auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
  41. APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
  42. um Pakete zu installieren und Upgrades durchzuführen.
  43. $MD5Sum" | bzip2 > aptarchive/${LOCALE}.bz2
  44. # the $LOCALE translation file will not be included as it is a flat archive it came from and therefore
  45. # its name can not be guessed correctly… (in non-flat archives the files are called Translation-*)
  46. echo 'APT::Cache::Generate "false";' > rootdir/etc/apt/apt.conf.d/00nogenerate
  47. NOLONGSTANZA="$PACKAGESTANZA
  48. Description: Advanced front-end for dpkg
  49. $MD5Sum
  50. "
  51. ENGLISHSTANZA="$PACKAGESTANZA
  52. Description: Advanced front-end for dpkg
  53. $MD5Sum
  54. "
  55. LOCALESTANZA="$PACKAGESTANZA
  56. Description-${LOCALE}: Mächtige Oberfläche für dpkg
  57. Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
  58. auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
  59. APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
  60. um Pakete zu installieren und Upgrades durchzuführen.
  61. $MD5Sum
  62. "
  63. LOCALESTANZA2="$PACKAGESTANZA2
  64. Description-${LOCALE}: Mächtige Oberfläche für dpkg
  65. Das Paket bietet dem Nutzer technisch führende Methoden für den Zugriff
  66. auf den dpkg-Paketmanager. Es beinhaltet das apt-get-Werkzeug und die
  67. APT-Dselect-Methode. Beides sind einfache und sicherere Wege,
  68. um Pakete zu installieren und Upgrades durchzuführen.
  69. $MD5Sum
  70. "
  71. testrun() {
  72. echo "Acquire::Languages { \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
  73. export LC_ALL=""
  74. rm -rf rootdir/var/lib/apt/lists
  75. setupaptarchive
  76. testequal "$LOCALESTANZA" aptcache show apt -o Test=File-${LOCALE}
  77. testequal "$LOCALESTANZA" aptcache show apt:i386 -o Test=File-${LOCALE}
  78. testequal "$LOCALESTANZA2" aptcache show apt:amd64 -o Test=File-${LOCALE}
  79. testequal "$NOLONGSTANZA" aptcache show apt -o Acquire::Languages="ww" -o Test=File-${LOCALE}
  80. testequal "$LOCALESTANZA" aptcache show apt -o Acquire::Languages::="ww" -o Test=File-${LOCALE}
  81. LC_ALL=C testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-${LOCALE}
  82. export LC_ALL=""
  83. echo "Acquire::Languages { \"ww\"; \"${LOCALE}\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
  84. testequal "$LOCALESTANZA" aptcache show apt -o Test=File-ww-${LOCALE}
  85. echo "Acquire::Languages { \"ww\"; \"en\"; };" > rootdir/etc/apt/apt.conf.d/00languages
  86. testequal "$ENGLISHSTANZA" aptcache show apt -o Test=File-ww
  87. }
  88. testrun
  89. echo "$PACKAGESTANZA
  90. Description: Advanced front-end for dpkg
  91. $MD5Sum
  92. $PACKAGESTANZA2
  93. Description: Advanced front-end for dpkg
  94. $MD5Sum" > aptarchive/Packages
  95. echo "Package: apt
  96. Description-en: Advanced front-end for dpkg
  97. This is Debian's next generation front-end for the dpkg package manager.
  98. It provides the apt-get utility and APT dselect method that provides a
  99. simpler, safer way to install and upgrade packages.
  100. $MD5Sum" | bzip2 > aptarchive/en.bz2
  101. ENGLISHSTANZA="$PACKAGESTANZA
  102. Description-en: Advanced front-end for dpkg
  103. This is Debian's next generation front-end for the dpkg package manager.
  104. It provides the apt-get utility and APT dselect method that provides a
  105. simpler, safer way to install and upgrade packages.
  106. $MD5Sum
  107. "
  108. ENGLISHSTANZA2="$PACKAGESTANZA2
  109. Description-en: Advanced front-end for dpkg
  110. This is Debian's next generation front-end for the dpkg package manager.
  111. It provides the apt-get utility and APT dselect method that provides a
  112. simpler, safer way to install and upgrade packages.
  113. $MD5Sum
  114. "
  115. testrun