Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r12389 - main/trunk/bin
Date: Wed, 07 Jan 2009 23:49:08 +0000
Author: zmedico
Date: 2009-01-07 23:49:08 +0000 (Wed, 07 Jan 2009)
New Revision: 12389

Modified:
   main/trunk/bin/ebuild.sh
Log:
Bug #250469 - Fix unpack() so that deb2targz is called in a way such that
$DISTDIR write access is not required.


Modified: main/trunk/bin/ebuild.sh
===================================================================
--- main/trunk/bin/ebuild.sh	2009-01-07 22:37:06 UTC (rev 12388)
+++ main/trunk/bin/ebuild.sh	2009-01-07 23:49:08 UTC (rev 12389)
@@ -406,10 +406,24 @@
 				# that reason.  We just make sure on AIX `deb2targz` is
 				# installed.
 				if type -P deb2targz > /dev/null; then
-					deb2targz "${srcdir}/${x}" || die "$myfail"
-					mv "${srcdir}/${x/.deb/.tar.gz}" data.tar.gz
+					y=${x##*/}
+					local created_symlink=0
+					if [ ! "$srcdir$x" -ef "$y" ] ; then
+						# deb2targz always extracts into the same directory as
+						# the source file, so create a symlink in the current
+						# working directory if necessary.
+						ln -sf "$srcdir$x" "$y" || die "$myfail"
+						created_symlink=1
+					fi
+					deb2targz "$y" || die "$myfail"
+					if [ $created_symlink = 1 ] ; then
+						# Clean up the symlink so the ebuild
+						# doesn't inadvertently install it.
+						rm -f "$y"
+					fi
+					mv -f "${y%.deb}".tar.gz data.tar.gz || die "$myfail"
 				else
-					ar x "${srcdir}/${x}" || die "$myfail"
+					ar x "$srcdir$x" || die "$myfail"
 				fi
 				;;
 			lzma)



Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
portage r12388 - main/trunk/pym/_emerge
Next by thread:
gentoo-x86 commit in lxde-base/lxsession-lite: lxsession-lite-0.3.6.ebuild ChangeLog
Previous by date:
portage r12388 - main/trunk/pym/_emerge
Next by date:
gentoo-x86 commit in lxde-base/lxsession-lite: lxsession-lite-0.3.6.ebuild ChangeLog


Updated Apr 29, 2012

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.