public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r9538 - main/trunk/bin
@ 2008-03-28 10:18 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-03-28 10:18 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-03-28 10:18:08 +0000 (Fri, 28 Mar 2008)
New Revision: 9538

Modified:
   main/trunk/bin/emerge-webrsync
Log:
* Skip the recusive chown call if it fails on the top level directory since
  it's possible that emerge-webrsync is not run by root.

* Just chown to portage:portage instead of using PORTAGE_INST_{UID,GID}.


Modified: main/trunk/bin/emerge-webrsync
===================================================================
--- main/trunk/bin/emerge-webrsync	2008-03-28 10:03:28 UTC (rev 9537)
+++ main/trunk/bin/emerge-webrsync	2008-03-28 10:18:08 UTC (rev 9538)
@@ -33,7 +33,7 @@
 	exit 1
 fi
 eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \
-	PORTAGE_BIN_PATH PORTAGE_GPG_DIR PORTAGE_INST_UID PORTAGE_INST_GID \
+	PORTAGE_BIN_PATH PORTAGE_GPG_DIR \
 	PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \
 	http_proxy ftp_proxy)
 DISTDIR="${PORTAGE_TMPDIR}/emerge-webrsync"
@@ -189,8 +189,8 @@
 		# Free disk space
 		rm -f "${file}"
 
-		# Make sure user and group file ownership is ${PORTAGE_INST_UID}:${PORTAGE_INST_GID}
-		chown -R ${PORTAGE_INST_UID:-0}:${PORTAGE_INST_GID:-0} portage
+		chown portage:portage portage &> /dev/null && \
+			chown -R portage:portage portage
 		cd portage
 		rsync -av --progress --stats --delete --delete-after \
 			--exclude='/distfiles' --exclude='/packages' \

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-28 10:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-28 10:18 [gentoo-commits] portage r9538 - main/trunk/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox