summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-04-16 01:41:00 +0000
committerMike Frysinger <vapier@gentoo.org>2006-04-16 01:41:00 +0000
commit31167a1a2a964ca7b92901cae4309eff86a45ada (patch)
tree7377e6ada01dc45e91360cd1908990311f556a7f
parent33ee53c63ee6320df758a74a9f88a3dbb99bf0fb (diff)
downloadportage-31167a1a2a964ca7b92901cae4309eff86a45ada.tar.gz
portage-31167a1a2a964ca7b92901cae4309eff86a45ada.tar.bz2
portage-31167a1a2a964ca7b92901cae4309eff86a45ada.zip
use a temp file but this time cut out the duplicate calls to `find`
svn path=/main/trunk/; revision=3161
-rw-r--r--bin/misc-functions.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index d3c8ce16d..473f4e720 100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -184,17 +184,18 @@ install_qa_check() {
unset INSTALLTOD
fi
- local count=$(find "${D}"/ -user portage | wc -l)
- if [[ ${count} -gt 0 ]] ; then
- ewarn "${count} files were installed with user portage!"
- find "${D}"/ -user portage -print0 | xargs -0 chown -h ${PORTAGE_INST_UID:-0}
+ local find_log="${T}/find-portage-log"
+ find "${D}"/ -user portage -print0 > "${find_log}"
+ if [[ -s ${find_log} ]] ; then
+ ewarn "QA Notice: Files were installed with user portage!"
+ cat "${find_log}" | xargs -0 chown -h ${PORTAGE_INST_UID:-0}
fi
-
- count=$(find "${D}"/ -group portage | wc -l)
- if [[ ${count} -gt 0 ]] ; then
- ewarn "${count} files were installed with group portage!"
- find "${D}"/ -group portage -print0 | xargs -0 chgrp -h ${PORTAGE_INST_GID:-0}
+ find "${D}"/ -group portage -print0 > "${find_log}"
+ if [[ -s ${find_log} ]] ; then
+ ewarn "QA Notice: Files were installed with group portage!"
+ cat "${find_log}" | xargs -0 chgrp -h ${PORTAGE_INST_GID:-0}
fi
+ rm -f "${find_log}"
# Portage regenerates this on the installed system.
if [ -f "${D}/usr/share/info/dir.gz" ]; then