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-portage-dev
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-portage-dev@g.o
From: jb benoit <benoitj@...>
Subject: Re: Display of keyword in emerge : code proposal
Date: Tue, 22 Nov 2005 21:47:40 +0100
Marius Mauch wrote:

>On Fri, 18 Nov 2005 19:13:13 +0100
>jb benoit <benoitj@...> wrote:
>
>  
>
>>$ diff -Naur portage.py.sav portage.py
>>--- portage.py.sav      2005-11-17 15:32:20.000000000 +0100
>>+++ portage.py  2005-11-17 15:15:24.000000000 +0100
>>@@ -3866,6 +3866,42 @@
>>                                pmaskfile.close()
>>        return None
>>
>>+def getprintablemaskingstatus(mycpv):
>>+
>>+       #checking
>>+       global portdb
>>+       mysplit = catpkgsplit(mycpv)
>>+       if not mysplit:
>>+               raise ValueError("invalid CPV: %s" % mycpv)
>>+       if not portdb.cpv_exists(mycpv):
>>+               raise KeyError("CPV %s does not exist" % mycpv)
>>+       mycp=mysplit[0]+"/"+mysplit[1]
>>+
>>+       #gathering data
>>+       mygroups = portdb.aux_get(mycpv, ["KEYWORDS"])[0].split()
>>+       myarch = settings["ARCH"]
>>+       maskdict=settings.pmaskdict
>>+
>>+       rValue=[]
>>+       test=0
>>+
>>+       # keyword chercking
>>+       for gp in mygroups:
>>+               if gp=="~"+myarch:
>>+                       kmask="~"+myarch
>>+                       rValue.append(kmask)
>>+                       test = 1
>>+
>>+       # package.mask checking
>>+        if test == 1:
>>+               if maskdict.has_key(mycp):
>>+                       for x in maskdict[mycp]:
>>+                               if mycpv in
>>portdb.xmatch("match-all", x):
>>+                                       rValue.append("~M")
>>+
>>+       return rValue
>>+
>>+
>> def getmaskingstatus(mycpv):
>>        global portdb
>>        mysplit = catpkgsplit(mycpv)
>>    
>>
>
>- Doesn't work with binpkgs (though that's probably also a problem in
>getmaskingstatus() itself)
>- there is more than keyword and p.mask for masking (profiles)
>- the function name is misleading (you're not checking the actual
>masking status)
>- you don't check for non-~arch and package.mask'ed packages
>- you don't check for non-$ARCH ACCEPT_KEYWORDS/package.keywords entries
>- other semantic issues I' not going to repeat
>- completely useless without docs.
>
>  
>
If this can help, i'll respond to some of your question :
My aims is very different to the one of getmaskingstatus().

I don't have to check everywere for the status :
The package which status I'm searching were already checked by 
getmaskingstatus().
This is very important.

The only 2 thinks I implemented was to search :

if the package beeing checked is an unstable version,
which can be done only by looking at the supported keywords in the ebuild.

if the package beeing checked is a masked version.
I only need to check is the package was masked in packages.mask,
don't mind the reason for which it's now unmasked.   

If you thinks this can be usefull, I can made the corection needed.
If you think this is just a bunch of trash, just tell me to forget, but 
i'll miss this feature.

Jb

>We didn't say "it's complicated" for no reason ;)
>
>Marius
>
>PS: But thanks anyway, looking at getmaskingstatus() reminds me of
>removing the stupid -* message.
>
>  
>

-- 
gentoo-portage-dev@g.o mailing list


Replies:
Re: Display of keyword in emerge : code proposal
-- Marius Mauch
Re: Display of keyword in emerge : code proposal
-- Brian
References:
Display of keyword in emerge : code proposal
-- jb benoit
Re: Display of keyword in emerge : code proposal
-- Marius Mauch
Navigation:
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Display of keyword in emerge : code proposal
Next by thread:
Re: Display of keyword in emerge : code proposal
Previous by date:
Re: [PATCH] inital Manifest2 support
Next by date:
Re: Manifest signing


Updated Jun 17, 2009

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

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