eclass/java-utils-2.eclass: Added -r to xargs in java-pkg_addres
authorWilliam L. Thomson Jr <wlt@o-sinc.com>
Mon, 22 Feb 2016 00:07:00 +0000 (19:07 -0500)
committerJames Le Cuirot <chewi@gentoo.org>
Mon, 22 Feb 2016 10:29:47 +0000 (10:29 +0000)
The -r option is necessary in case find does not output anything. Which
makes the jar uf command fail. This has no effect otherwise and should
be safe to add right away. It prevents potential issues/bug.

eclass/java-utils-2.eclass

index 5be7e172c7d73bff1d7590cdb62b9012dedd6d78..cb1c1d8b1301a196aa86fa314add518f57c128bf 100644 (file)
@@ -262,7 +262,7 @@ java-pkg_addres() {
        shift 2
 
        pushd "${dir}" > /dev/null || die "pushd ${dir} failed"
-       find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -0 jar uf "${jar}" || die "jar failed"
+       find -L -type f ! -path "./target/*" ! -path "./sources.lst" ! -name "MANIFEST.MF" ! -regex ".*\.\(class\|jar\|java\)" "${@}" -print0 | xargs -r0 jar uf "${jar}" || die "jar failed"
        popd > /dev/null || die "popd failed"
 }