diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-12-02 21:58:18 +0100 |
---|---|---|
committer | kensington <kensington@gentoo.org> | 2017-12-05 22:59:32 +1100 |
commit | 34d64c3a8f36151e42b2bc7ad56d5ede8ab8b9e6 (patch) | |
tree | e6def505cdb1d89c58a9f25b74ddb658f40f0bca /scripts | |
parent | explicitely flag blocked packages and circular dependencies (diff) | |
download | tatt-34d64c3a8f36151e42b2bc7ad56d5ede8ab8b9e6.tar.gz tatt-34d64c3a8f36151e42b2bc7ad56d5ede8ab8b9e6.tar.bz2 tatt-34d64c3a8f36151e42b2bc7ad56d5ede8ab8b9e6.zip |
filter out already stable packages earlier
Drop them entirely from the package list, not only for the use flag testing.
This avoids needless rdep testing and unmasking, too.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tatt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/tatt b/scripts/tatt index 68897fc..f680f4e 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -5,6 +5,7 @@ from subprocess import * import sys import re import os +import portage import base64 import requests @@ -182,8 +183,26 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: print ("Jobname: " + myJob.name) ## Determine jobtype + 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']: + kw = port.aux_get(p.packageString()[1:], ["KEYWORDS"]) + if len(kw) > 0: + kwl = kw[0].split() + try: + kwl.index(config['arch']) + # the list of keywords in portage already contains the target + # keyword, skip this package + print("\talready stable") + continue + except ValueError: + filteredPackages.append(p) + + myJob.packageList = filteredPackages # Unmasking: try: |