This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=70bbd83b05b2d0f9b6442935d03ae3993de108b0 commit 70bbd83b05b2d0f9b6442935d03ae3993de108b0 Author: Guillem Jover <[email protected]> AuthorDate: Sat Mar 19 14:02:27 2022 +0100 test: Check deb format with duplicate debian-binary and control.tar members --- src/at/deb-format.at | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/at/deb-format.at b/src/at/deb-format.at index 3564c3b1c..9fe6b17b2 100644 --- a/src/at/deb-format.at +++ b/src/at/deb-format.at @@ -130,6 +130,32 @@ control.tar ], [dpkg-deb: error: unexpected end of file in archive member header in pkg-missing-data.deb ]) +AT_CHECK([ +# Test duplicate debian-binary member +cp pkg-templ.deb pkg-duplicate-magic.deb +ar ra debian-binary pkg-duplicate-magic.deb debian-binary debian-binary +ar t pkg-duplicate-magic.deb +dpkg-deb -I pkg-duplicate-magic.deb +], [2], [debian-binary +debian-binary +control.tar +data.tar +], [dpkg-deb: error: archive 'pkg-duplicate-magic.deb' has premature member 'debian-binary' before 'control.tar', giving up +]) + +AT_CHECK([ +# Test duplicate control member +cp pkg-templ.deb pkg-duplicate-control.deb +ar ra control.tar pkg-duplicate-control.deb control.tar control.tar +ar t pkg-duplicate-control.deb +dpkg-deb -c pkg-duplicate-control.deb +], [2], [debian-binary +control.tar +control.tar +data.tar +], [dpkg-deb: error: archive 'pkg-duplicate-control.deb' contains two control members, giving up +]) + AT_CHECK([ # Test mixed member (index 1) cp pkg-templ.deb pkg-mixed-1-member.deb -- Dpkg.Org's dpkg

