Re: [gentoo-portage-dev] Fwd: /etc/portage/profile/{pmask,arch.list, categories}

2006-01-10 Thread Marius Mauch
On Mon, 9 Jan 2006 10:21:49 -0500
Alec Warner [EMAIL PROTECTED] wrote:

 
 My Apologies, KMail died, and when I restarted it it had the mail but
 stripped the attachment ;)
 --  Forwarded Message  --
 
 Subject: /etc/portage/profile/{pmask,arch.list, categories}
 Date: Monday 09 January 2006 09:59
 From: Alec Warner [EMAIL PROTECTED]
 To: gentoo-portage-dev@gentoo.org
 
 Apparently these weren't working ( not being read in ) due to a lack
 of /etc/portage/profile being in Locations in config in portage.py
 
 I split a patch for hte issue by simply adding the extra location and
 fixing the odd grabfile_package calls.  It seems grabfile package was
 stripping the
 - so it wouldn't nuke existing entries in the pmask file.
 
 Comments welcome as usual.

The profile stacking doesn't work that way ...
$PORTDIR/profiles/ and /etc/portage aren't part of the profile
stack, /etc/portage/profile is and actually works as intended. So this
patch would actually create a bug instead of fixing one
And if you think those dirs should be part of the stacking the patch is
still wrong as it has to be done the other way round.

Marius

-- 
Public Key at http://www.genone.de/info/gpg-key.pub

In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.


signature.asc
Description: PGP signature


[gentoo-portage-dev] Fwd: /etc/portage/profile/{pmask,arch.list, categories}

2006-01-09 Thread Alec Warner

My Apologies, KMail died, and when I restarted it it had the mail but stripped 
the attachment ;)
--  Forwarded Message  --

Subject: /etc/portage/profile/{pmask,arch.list, categories}
Date: Monday 09 January 2006 09:59
From: Alec Warner [EMAIL PROTECTED]
To: gentoo-portage-dev@gentoo.org

Apparently these weren't working ( not being read in ) due to a lack
of /etc/portage/profile being in Locations in config in portage.py

I split a patch for hte issue by simply adding the extra location and fixing
the odd grabfile_package calls.  It seems grabfile package was stripping the
- so it wouldn't nuke existing entries in the pmask file.

Comments welcome as usual.

Alec Warner (antarus)

---
--- portage.py.ferringb	2006-01-05 03:55:17.169455112 -0500
+++ portage.py	2006-01-09 09:49:00.743795432 -0500
@@ -1108,7 +1108,7 @@
 self.pkeywordsdict = {}
 self.punmaskdict = {}
 			else:
-locations = [self[PORTDIR] + /profiles, USER_CONFIG_PATH]
+locations = [self[PORTDIR] + /profiles, USER_CONFIG_PATH,USER_CONFIG_PATH+/profile]
 for ov in self[PORTDIR_OVERLAY].split():
 	ov = os.path.normpath(ov)
 	if os.path.isdir(ov+/profiles):
@@ -1165,13 +1165,16 @@
 			self.loadVirtuals('/')
 
 			#package.mask
-			pkgmasklines = [grabfile_package(os.path.join(x, package.mask)) for x in self.profiles]
+
+			pkgmasklines = [grabfile(os.path.join(x, package.mask)) for x in self.profiles]
 			for l in locations:
-pkgmasklines.append(grabfile_package(l+os.path.sep+package.mask, recursive=1))
+pkgmasklines.append(grabfile(x+os.path.sep+package.mask, recursive=1))
 			pkgmasklines = stack_lists(pkgmasklines, incremental=1)
 
 			self.pmaskdict = {}
 			for x in pkgmasklines:
+if not isvalidatom(x):
+	writemsg(!!! Invalid atom %s in package.mask % x )
 mycatpkg=dep_getkey(x)
 if self.pmaskdict.has_key(mycatpkg):
 	self.pmaskdict[mycatpkg].append(x)


pgpP0rR57b22x.pgp
Description: PGP signature