aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2019-05-22 23:33:44 +0200
committerRolf Eike Beer <eike@sf-mail.de>2019-05-22 23:38:23 +0200
commitd40c4c83ffeb2397b246c98cf5c7cfdea6660e82 (patch)
treef5ce935d724a7010f58584515df91c7ca3d659fa
parentRemove (broken) tatt-tests (diff)
downloadtatt-d40c4c83ffeb2397b246c98cf5c7cfdea6660e82.tar.gz
tatt-d40c4c83ffeb2397b246c98cf5c7cfdea6660e82.tar.bz2
tatt-d40c4c83ffeb2397b246c98cf5c7cfdea6660e82.zip
remove primary packages from rdeps scriptv0.6
This avoids needless duplicate work. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
-rw-r--r--tatt/scriptwriter.py22
-rw-r--r--tatt/tinderbox.py3
2 files changed, 22 insertions, 3 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py
index 4fbf015..fa26608 100644
--- a/tatt/scriptwriter.py
+++ b/tatt/scriptwriter.py
@@ -5,9 +5,11 @@ import os
import portage
import sys
+from .gentooPackage import gentooPackage as gP
from .usecombis import findUseFlagCombis
from .tinderbox import stablerdeps
from .tool import unique
+from portage.dep import dep_getkey
#### USE-COMBIS ########
@@ -110,13 +112,31 @@ def rdepTestString(job, rdep, config):
def writerdepscript(job, config):
# Populate the list of rdeps
+ # while at it also create a list of only the package names
rdeps = []
+ pkgs = []
for p in job.packageList:
- rdeps = rdeps + stablerdeps (p, config)
+ atom = p.packageCatName()
+ pkgs.append(atom)
+ rdeps = rdeps + stablerdeps (atom, config)
if len(rdeps) == 0:
print("No stable rdeps for " + job.name)
return
+ # now clean the list
+ # first find all those entries that have no useflags and main packages of this job
+ for i in range(len(rdeps) - 1, 0, -1):
+ r = rdeps[i]
+ hasU = False
+ for st in r[1]:
+ if len(st.strip()) > 0:
+ hasU = True
+ break
+ if hasU:
+ continue
+ if r[0] in pkgs:
+ rdeps.pop(i)
+
# If there are rdeps, write the script
rdepheader = scriptTemplate(job, config, "revdep-header")
outfilename = (job.name + "-rdeps.sh")
diff --git a/tatt/tinderbox.py b/tatt/tinderbox.py
index 63179af..0e69bcc 100644
--- a/tatt/tinderbox.py
+++ b/tatt/tinderbox.py
@@ -18,7 +18,7 @@ from portage.dep import isvalidatom
## Pass the config on to this function:
## Generate stable rdeps ###
-def stablerdeps (package, config):
+def stablerdeps (atom, config):
"""
Find packages with stable versions which depend on atom
We query the tinderbox at http://qa-reports.gentoo.org/output/genrdeps/rindex/
@@ -29,7 +29,6 @@ def stablerdeps (package, config):
# File structure on this tinderbox equals that in the tree
# Problem: The rdeps can be version dependent
# nothing we can do about this here...
- atom = package.packageCatName()
socket.setdefaulttimeout(45)
try: