deb-content.at 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. AT_TESTED([dpkg-deb])
  2. AT_SETUP([dpkg-deb .deb conffiles])
  3. AT_KEYWORDS([dpkg-deb deb conffiles])
  4. DPKG_GEN_CONTROL([pkg-conff-dupe])
  5. DPKG_GEN_FILE([pkg-conff-dupe], [conffiles], [/test-conffile-1
  6. /test-conffile-2
  7. /test-conffile-1])
  8. AT_DATA([pkg-conff-dupe/test-conffile-1], [test init
  9. ])
  10. AT_DATA([pkg-conff-dupe/test-conffile-2], [test init
  11. ])
  12. AT_CHECK([
  13. # Duplicate conffile entries should produce a warning.
  14. dpkg-deb -b pkg-conff-dupe
  15. ], [0], [ignore], [dpkg-deb: warning: conffile name '/test-conffile-1' is duplicated
  16. dpkg-deb: warning: ignoring 1 warning about the control file(s)
  17. ])
  18. DPKG_GEN_CONTROL([pkg-conff-noel])
  19. printf "/test-conffile-1" >"pkg-conff-noel/DEBIAN/conffiles"
  20. AT_DATA([pkg-conff-noel/test-conffile-1], [test init
  21. ])
  22. AT_CHECK([
  23. # Conffiles need a final newline to guarantee there's been no accidental
  24. # file truncation.
  25. dpkg-deb -b pkg-conff-noel pkg-conff-noel.deb
  26. ], [2], [ignore], [dpkg-deb: error: conffile name '/test-conffile-1' is too long, or missing final newline
  27. ])
  28. DPKG_GEN_CONTROL([pkg-deb-newline])
  29. touch 'pkg-deb-newline/file
  30. newline'
  31. AT_CHECK([
  32. # Cannot create package with newlines in filenames.
  33. dpkg-deb -b pkg-deb-newline
  34. ], [2], [ignore], [dpkg-deb: error: newline not allowed in pathname './file
  35. newline'
  36. ])
  37. AT_CLEANUP