Codebase list debian-goodies / 0506e82
dgrep: Properly handle more than one package or glob as parameter The man page promises that dgrep can handle more than one package name or glob expression as parameter, but dgrep passed them all at once to dglob despite dglob can only handle one glob expression per call. Looping over the parameters, passing them one by one to a single dglob call each and then piping output from all dglob calls to xargs solves the issue. Axel Beckert 9 years ago
2 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
55 * [dgrep]
66 - Fix old name "dpkg-grep" in error message.
77 - Consistently prefix error messages with program name.
8 - Properly handle more than one package or glob as parameter as
9 promised by the man page. (dglob can only handle one glob parameter
10 per call.)
811
912 [ Javier Fernández-Sanguino ]
1013 * [checkrestart]:
6565 shift
6666 done
6767
68 exec dglob -0f "$@" | xargs -0r $prog $opts "$pat"
68 for pkgglob in "$@"; do dglob -0f "$pkgglob"; done | xargs -0r $prog $opts "$pat"