On Fri, Jan 15, 2021 at 10:48:05PM +0100, Helmut Grohne wrote: > On Fri, Jan 15, 2021 at 09:43:05PM +0100, Helmut Grohne wrote: > > Duh! I ran into this as well now. Thanks for filing it. I think the > > patch mostly explains itself. <.*> matches e.g. "<< 2:8) <!nocheck> > > <!noinsttest>" or "<< 2:8) <!nocheck> <!noinsttest>".
How (if you did) test your patch? Trying here after adding a test didn't quite work: --- a/pbuilder-satisfydepends-funcs +++ b/pbuilder-satisfydepends-funcs @@ -202,7 +202,8 @@ filter_restriction_deps() { echo "$INSTALLPKG" done | # remove the restriction list and add " | " between entries - sed 's/<.*>//; $,$! s/$/ |/' | +# sed 's/<.*>//; $,$! s/$/ |/' | + sed 's/<[^)(]*>//; $,$! s/$/ |/' | xargs --no-run-if-empty done | # add ", " between entries --- a/t/test_pbuilder-satisfydepends-funcs +++ b/t/test_pbuilder-satisfydepends-funcs @@ -234,6 +234,15 @@ expect_output "" test_filter_arch_restriction_deps "foo [amd64] <stage1>" "amd64 expect_output "foo" test_filter_arch_restriction_deps "foo [amd64] <!stage1>" "amd64" "" expect_output "" test_filter_arch_restriction_deps "foo [i386] <stage1>" "amd64" "stage1" +test_filter_version_restriction_deps() { + echo "$1" | filter_restriction_deps "$2" +} + +expect_output "foo (<< 2:8)" test_filter_version_restriction_deps "foo (<< 2:8) <!nocheck> <!noinsttest>" "" +expect_output "" test_filter_version_restriction_deps "foo (<< 2:8) <!nocheck> <!noinsttest>" "nocheck" +expect_output "" test_filter_version_restriction_deps "foo (<< 2:8) <!nocheck> <!noinsttest>" "noinsttest" +expect_output "" test_filter_version_restriction_deps "foo (<< 2:8) <!nocheck> <!noinsttest>" "nocheck noinsttest" + expect_output "debhelper (>= 7)" test_get_build_deps_dsc expect_output "debhelper (>= 9), haskell-devscripts (>= 0.8.15), cdbs, ghc, ghc-prof, libghc-hashable-dev (<< 1.3), libghc-hashable-prof (<< 1.3), ghc-doc, libghc-hashable-doc (<< 1.3)" test_get_parsed_build_deps_dsc The test: [FAIL] test_filter_version_restriction_deps expected [foo (<< 2:8)] but got [foo (] [FAIL] test_filter_version_restriction_deps expected [] but got [foo (] ./test_pbuilder-satisfydepends-funcs: Ran 65 tests and 63 succeeded, 2 failed (apparently, of the 4 added tests, it's the first 2 that fails. So, there is also *another* bug: pbuilder can't correctly handle multiple profiles specified separatedly: it wants them within a single < >) -- regards, Mattia Rizzolo GPG Key: 66AE 2B4A FCCF 3F52 DA18 4D18 4B04 3FCD B944 4540 .''`. More about me: https://mapreri.org : :' : Launchpad user: https://launchpad.net/~mapreri `. `'` Debian QA page: https://qa.debian.org/developer.php?login=mattia `-
signature.asc
Description: PGP signature