Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9837 - main/trunk/pym/portage
Date: Fri, 11 Apr 2008 19:48:10
Message-Id: E1JkPEF-0003iD-9i@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-04-11 19:48:06 +0000 (Fri, 11 Apr 2008)
3 New Revision: 9837
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 Make doebuild() bail out early with a PermissionDenied error if there
9 is no write access to $PKGDIR.
10
11
12 Modified: main/trunk/pym/portage/__init__.py
13 ===================================================================
14 --- main/trunk/pym/portage/__init__.py 2008-04-11 19:07:25 UTC (rev 9836)
15 +++ main/trunk/pym/portage/__init__.py 2008-04-11 19:48:06 UTC (rev 9837)
16 @@ -5006,6 +5006,16 @@
17 actionmap[x]["dep"] = ' '.join(actionmap_deps[x])
18
19 if mydo in actionmap:
20 + if mydo == "package":
21 + # Make sure the package directory exists before executing
22 + # this phase. This can raise PermissionDenied if
23 + # the current user doesn't have write access to $PKGDIR.
24 + parent_dir = os.path.join(mysettings["PKGDIR"],
25 + mysettings["CATEGORY"])
26 + portage.util.ensure_dirs(parent_dir)
27 + if not os.access(parent_dir, os.W_OK):
28 + raise portage.exception.PermissionDenied(
29 + "access('%s', os.W_OK)" % parent_dir)
30 retval = spawnebuild(mydo,
31 actionmap, mysettings, debug, logfile=logfile)
32 elif mydo=="qmerge":
33
34 --
35 gentoo-commits@l.g.o mailing list