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

Author: zmedico
Date: 2008-10-05 16:31:26 +0000 (Sun, 05 Oct 2008)
New Revision: 11630

Modified:
   main/trunk/bin/ebuild.sh
Log:
In dyn_clean, cd to $PORTAGE_BUILDDIR/.. before attempting to remove it since
some kernels, such as Solaris, return EINVAL when an attempt is made to remove
the current working directory. Thanks to Fabian Groffen <grobian@g.o> for
reporting.


Modified: main/trunk/bin/ebuild.sh
===================================================================
--- main/trunk/bin/ebuild.sh	2008-10-05 16:04:31 UTC (rev 11629)
+++ main/trunk/bin/ebuild.sh	2008-10-05 16:31:26 UTC (rev 11630)
@@ -751,9 +751,10 @@
 	# result in it wiping the users distfiles directory (bad).
 	rm -rf "${PORTAGE_BUILDDIR}/distdir"
 
-	if [ -z "$(find "${PORTAGE_BUILDDIR}" -mindepth 1 -maxdepth 1)" ]; then
-		rmdir "${PORTAGE_BUILDDIR}"
-	fi
+	# Some kernels, such as Solaris, return EINVAL when an attempt
+	# is made to remove the current working directory.
+	cd "$PORTAGE_BUILDDIR"/..
+	rmdir "$PORTAGE_BUILDDIR" 2>/dev/null
 
 	true
 }




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

only message in thread, other threads:[~2008-10-05 16:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-05 16:31 [gentoo-commits] portage r11630 - 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