debian/rules and find
Hi,
this afternoon I occurred a serious problem where some of our
debian/rules file will fail.
xargs will *always* execute the command, even with no input. This
means that all constructs like "find -name foo|xargs chmod g+w" will
fail as soon as find doesn't find any file. As Joey pointed out this
is a documented feature. I understand that there are situations where
this is a needed feature.
However in the process of creating .deb files this is not needed, even
worse it will stop the creation. Instead we should use xargs -r or
--no-run-if-empty which won't execute the program on the command line
if there is no input.
So please check your debian/rules files for constructs like the
following:
chmod g+w `find debian/tmp -name foo`
find debian/tmp -name foo|xargs chmod g+w
the correct way to implement this would be
find debian/tmp -name foo|xargs -r chmod g+w
Regards,
Joey
--
There are lies, statistics and benchmarks.
Reply to: