commit: f6c347f5ac192715a666e14f617b61524f9445ac
Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Mon May 28 14:52:37 2018 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Jun 5 08:33:11 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f6c347f5
do not try to install files when there are none
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
bin/Makefile.in | 2 ++
pym/Makefile.in | 2 ++
2 files changed, 4 insertions(+)
diff --git a/bin/Makefile.in b/bin/Makefile.in
index 4ec94213e..afff11dfb 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -41,6 +41,7 @@ install:
$(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)"
$(DESTDIR)$(PORTAGE_BIN)
( cd "$(srcdir)" && find . -type d ) | while read f ; do \
files=( ) ; \
+ shopt -s nullglob ; \
for t in "$(srcdir)/$${f}"/* ; do \
[[ -d $${t} ]] && continue ; \
[[ $${t} == */Makefile* ]] && continue ; \
@@ -49,6 +50,7 @@ install:
$(INSTALL) -d -m 755 \
-o "$(portageuser)" -g "$(portagegroup)" \
"$(DESTDIR)$(PORTAGE_BIN)/$${f}" && \
+ [[ $${files[0]} ]] || continue ; \
$(INSTALL_subst) -m 755 \
-o "$(portageuser)" -g "$(portagegroup)" \
-t "$(DESTDIR)$(PORTAGE_BIN)/$${f}" \
diff --git a/pym/Makefile.in b/pym/Makefile.in
index dad4ed393..a32b219d6 100644
--- a/pym/Makefile.in
+++ b/pym/Makefile.in
@@ -22,6 +22,7 @@ install:
$(INSTALL) -d -m 755 -o "$(portageuser)" -g "$(portagegroup)"
$(DESTDIR)$(PORTAGE_PYM)
( cd "$(srcdir)" && find * -type d ) | while read f ; do \
files=( ) ; \
+ shopt -s nullglob ; \
for t in "$(srcdir)/$${f}"/* ; do \
[[ -d $${t} ]] && continue ; \
[[ $${t} == */Makefile* ]] && continue ; \
@@ -30,6 +31,7 @@ install:
$(INSTALL) -d -m 755 \
-o "$(portageuser)" -g "$(portagegroup)" \
"$(DESTDIR)$(PORTAGE_PYM)/$${f}" && \
+ [[ $${files[0]} ]] || continue ; \
$(INSTALL_subst) \
-o "$(portageuser)" -g "$(portagegroup)" \
-t "$(DESTDIR)$(PORTAGE_PYM)/$${f}" \