diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2017-12-23 12:42:36 +0100 |
---|---|---|
committer | kensington <kensington@gentoo.org> | 2017-12-23 23:08:39 +1100 |
commit | 595f4b1be52f4d721ed1c6b816bafc30d6685bb0 (patch) | |
tree | 4f92107f45fbcd74a67977365fbb4d552d61b391 /scripts | |
parent | stop processing if no packages are left (diff) | |
download | tatt-595f4b1be52f4d721ed1c6b816bafc30d6685bb0.tar.gz tatt-595f4b1be52f4d721ed1c6b816bafc30d6685bb0.tar.bz2 tatt-595f4b1be52f4d721ed1c6b816bafc30d6685bb0.zip |
improve handling of keywording bugs
There are 3 cases for every entry in the package list of a keywording bug:
- the entry is not keyworded yet, it needs normal processing
- the entry is already keyworded, but we should still unmask it in case other
packages from the list need it
- the entry is already stable, so can be entirely ignored
The unmasking of already keyworded packages did not happen, and already stable
packages were not detected as such and tested again.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/tatt | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/scripts/tatt b/scripts/tatt index 967b294..bfcefc8 100755 --- a/scripts/tatt +++ b/scripts/tatt @@ -187,6 +187,9 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: port = portage.db[portage.root]["porttree"].dbapi filteredPackages = [] + # for keywording bugs the packages that already have the keyword still need + # to be unmasked so they can be used by the other packages that still need work + kwPackages = [] if config['arch']: targetarch = config['arch'] @@ -200,10 +203,20 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: if len(kw) > 0: kwl = kw[0].split() try: + kwl.index(config['arch']) + # the list of keywords in portage already contains the arch + # as stable, skip this package + print("\talready stable for " + config['arch']) + continue + except ValueError: + pass + + try: kwl.index(targetarch) - # the list of keywords in portage already contains the target - # keyword, skip this package - print("\talready marked " + targetarch) + # the list of keywords in portage already contains the target keyword, + # skip this package from building, but remember it for unmasking + print("\talready keyworded as " + targetarch) + kwPackages.append(p) continue except ValueError: filteredPackages.append(p) @@ -249,6 +262,16 @@ if myJob.packageList is not None and len(myJob.packageList) > 0: print ("Uh Oh, no job.type? Tell tomka@gentoo.org to fix this!") unmaskfile.write(" # Job " + myJob.name + "\n") print ("Unmasked " + p.packageString()+ " in "+config['unmaskfile']) + + # now write the remaining packages for keywording + for p in kwPackages: + # Test if unmaskfile already contains the atom + if re.search(re.escape(p.packageString()), unmaskfileContent): + print (p.packageString() + " already in "+config['unmaskfile']) + else: + unmaskfile.write(p.packageString() + " # Job " + myJob.name + "\n") + print ("Unmasked " + p.packageString() + " in " + config['unmaskfile']) + unmaskfile.close() ## Write the scripts writeUSE(myJob, config) |