diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-12-11 21:49:06 +0100 |
---|---|---|
committer | kensington <kensington@gentoo.org> | 2017-12-13 20:06:56 +1100 |
commit | 0a94ca0bbafe543caa2eb28102436b5c97e50887 (patch) | |
tree | ebacd54c10960a57402730ce99be1417a34b422c /scripts | |
parent | scripts: fix matching blocked packages (diff) | |
download | tatt-0a94ca0bbafe543caa2eb28102436b5c97e50887.tar.gz tatt-0a94ca0bbafe543caa2eb28102436b5c97e50887.tar.bz2 tatt-0a94ca0bbafe543caa2eb28102436b5c97e50887.zip |
also detect already finished keywording
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tatt | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/scripts/tatt b/scripts/tatt index 1065a51..f526cd3 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -186,18 +186,23 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: port = portage.db[portage.root]["porttree"].dbapi filteredPackages = [] - for p in myJob.packageList: - print("Found the following package atom : " + p.packageString()) - # check if the package already has the needed keywords - if config['arch']: + + if config['arch']: + targetarch = config['arch'] + if myJob.type == "keyword": + targetarch = '~' + targetarch + + for p in myJob.packageList: + print("Found the following package atom : " + p.packageString()) + # check if the package already has the needed keywords kw = port.aux_get(p.packageString()[1:], ["KEYWORDS"]) if len(kw) > 0: kwl = kw[0].split() try: - kwl.index(config['arch']) + kwl.index(targetarch) # the list of keywords in portage already contains the target # keyword, skip this package - print("\talready stable") + print("\talready marked " + targetarch) continue except ValueError: filteredPackages.append(p) |