test-bug-712435-missing-descriptions 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64'
  7. PACKAGESTANZA='Version: 0.9.7.8
  8. Installed-Size: 3270
  9. Maintainer: APT Development Team <deity@lists.debian.org>
  10. Architecture: amd64
  11. Filename: pool/main/a/apt/apt_0.9.7.8_amd64.deb
  12. MD5sum: 3a622acda41620df50aa22a9fac6f32e'
  13. DESCRIPTION='Description: commandline package manager
  14. This APT has Super Cow Powers.'
  15. TRANSDESCRIPTION='Description-en: commandline package manager
  16. This APT has translated Super Cow Powers.'
  17. echo "Package: apt-normal
  18. $PACKAGESTANZA
  19. $DESCRIPTION
  20. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  21. Package: apt-both-below
  22. $PACKAGESTANZA
  23. $DESCRIPTION
  24. $TRANSDESCRIPTION
  25. Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  26. Package: apt-both-middle
  27. $PACKAGESTANZA
  28. $DESCRIPTION
  29. Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  30. $TRANSDESCRIPTION
  31. Package: apt-both-top
  32. $PACKAGESTANZA
  33. Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  34. $DESCRIPTION
  35. $TRANSDESCRIPTION
  36. Package: apt-trans
  37. $PACKAGESTANZA
  38. $TRANSDESCRIPTION
  39. Description-md5: cccccccccccccccccccccccccccccccc
  40. Package: apt-md5
  41. $PACKAGESTANZA
  42. Description-md5: dddddddddddddddddddddddddddddddd
  43. Package: apt-none
  44. $PACKAGESTANZA
  45. Package: apt-intermixed
  46. $PACKAGESTANZA
  47. $DESCRIPTION
  48. X-Some-Flag: yes
  49. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  50. Package: apt-intermixed2
  51. $PACKAGESTANZA
  52. $DESCRIPTION
  53. X-Some-Flag: yes
  54. $TRANSDESCRIPTION
  55. X-Foo-Flag: Something with a Description
  56. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  57. X-Bar-Flag: no
  58. Package: apt-intermixed3
  59. $PACKAGESTANZA
  60. $DESCRIPTION
  61. X-Some-Flag: yes
  62. $TRANSDESCRIPTION
  63. X-Foo-Flag: Something with a Description
  64. X-Bar-Flag: no
  65. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" > aptarchive/Packages
  66. setupaptarchive
  67. testsuccessequal "Package: apt-normal
  68. $PACKAGESTANZA
  69. $DESCRIPTION
  70. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  71. " aptcache show apt-normal
  72. for variant in 'below' 'middle' 'top'; do
  73. testsuccessequal "Package: apt-both-$variant
  74. $PACKAGESTANZA
  75. $TRANSDESCRIPTION
  76. Description-md5: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
  77. " aptcache show apt-both-$variant
  78. done
  79. testsuccessequal "Package: apt-trans
  80. $PACKAGESTANZA
  81. $TRANSDESCRIPTION
  82. Description-md5: cccccccccccccccccccccccccccccccc
  83. " aptcache show apt-trans
  84. testsuccessequal "Package: apt-md5
  85. $PACKAGESTANZA
  86. Description-md5: dddddddddddddddddddddddddddddddd
  87. " aptcache show apt-md5
  88. testsuccessequal "Package: apt-none
  89. $PACKAGESTANZA
  90. " aptcache show apt-none
  91. testsuccessequal "Package: apt-intermixed
  92. $PACKAGESTANZA
  93. $DESCRIPTION
  94. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  95. X-Some-Flag: yes
  96. " aptcache show apt-intermixed
  97. testsuccessequal "Package: apt-intermixed2
  98. $PACKAGESTANZA
  99. $TRANSDESCRIPTION
  100. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  101. X-Some-Flag: yes
  102. X-Foo-Flag: Something with a Description
  103. X-Bar-Flag: no
  104. " aptcache show apt-intermixed2
  105. testsuccessequal "Package: apt-intermixed3
  106. $PACKAGESTANZA
  107. $TRANSDESCRIPTION
  108. Description-md5: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  109. X-Some-Flag: yes
  110. X-Foo-Flag: Something with a Description
  111. X-Bar-Flag: no
  112. " aptcache show apt-intermixed3
  113. msgtest 'Test that no description does not destroy' 'showpkg'
  114. aptcache showpkg apt-none | sed 's#/tmp/.*_aptarchive_#/tmp/aptarchive_#' >showpkg.explosion && msgpass || msgfail
  115. testfileequal showpkg.explosion 'Package: apt-none
  116. Versions:
  117. 0.9.7.8 (/tmp/aptarchive_Packages)
  118. Reverse Depends:
  119. Dependencies:
  120. 0.9.7.8 -
  121. Provides:
  122. 0.9.7.8 -
  123. Reverse Provides: '
  124. testempty aptcache search nonexistentstring
  125. # packages without a description can't be found
  126. testsuccessequal 'apt-normal - commandline package manager
  127. apt-both-below - commandline package manager
  128. apt-both-middle - commandline package manager
  129. apt-both-top - commandline package manager
  130. apt-trans - commandline package manager
  131. apt-intermixed - commandline package manager
  132. apt-intermixed2 - commandline package manager
  133. apt-intermixed3 - commandline package manager' aptcache search apt