diff options
Diffstat (limited to 't/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec')
3 files changed, 43 insertions, 0 deletions
diff --git a/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/changelog.in b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/changelog.in new file mode 100644 index 0000000..d25031a --- /dev/null +++ b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/changelog.in @@ -0,0 +1,20 @@ +[% $source %] ([% $version %]) unstable; urgency=low + + * Version reused, new source package name. + + -- [% $author %] [% $date %] + +[% $source %] (0.5) unstable; urgency=low + + * Lintian Test Suite. + * Test: [% $testname %] + + -- [% $author %] Fri, 06 Feb 2009 22:22:37 -0800 + +[% $source %] (0) unstable; urgency=low + + * Lintian Test Suite. + * Should be ignored. + * Test: [% $testname %] + + -- [% $author %] Fri, 06 Feb 2008 22:22:37 -0800 diff --git a/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/postinst b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/postinst new file mode 100644 index 0000000..9a9a79c --- /dev/null +++ b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/debian/postinst @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +# Bad +dpkg --compare-versions "$2" lt "0.5" +dpkg --compare-versions "$2" lt 0.5~ +dpkg --compare-versions "$2" lt 0.5-1~ +dpkg --compare-versions "$2" lt '0.5-1~' +dpkg --compare-versions '0.5-1~' gt "$2" +if dpkg --compare-versions '0.5-1~' gt "$2"; then :; fi + +# Good +dpkg --compare-versions "$2" lt "0" +dpkg --compare-versions "$2" lt "0~" +dpkg --compare-versions "$2" lt 0.50.5 +# This is a false-positive for 0.5 +# dpkg --compare-versions "$2" lt 0.5~ + +#DEBHELPER# diff --git a/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/fill-values b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/fill-values new file mode 100644 index 0000000..6036e51 --- /dev/null +++ b/t/recipes/checks/maintainer-scripts/ancient-version/scripts-supports-ancient-package-version/build-spec/fill-values @@ -0,0 +1,3 @@ +Testname: scripts-supports-ancient-package-version +Skeleton: upload-non-native +Description: Check for maintainer scripts supporting old versions |