public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2011-03-22  4:10 Jeremy Olexa
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Olexa @ 2011-03-22  4:10 UTC (permalink / raw
  To: gentoo-commits

commit:     7b60da5539605f204b1d898e06a2f4298ec44427
Author:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 04:06:50 2011 +0000
Commit:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 04:09:43 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=7b60da55

genrdeps: Import initial scripts

These power the existing indexes:
 * http://tinderbox.dev.gentoo.org/misc/rindex/
 * http://tinderbox.dev.gentoo.org/misc/dindex/

New URLs will be:
 * http://qa-reports.gentoo.org/output/genrdeps/rindex/
 * http://qa-reports.gentoo.org/output/genrdeps/dindex/

---
 genrdeps/genrdeps.py           |   46 ++++++++++++++++++++++++++++++++++++++++
 genrdeps/run-genrdeps-index.sh |   16 ++++++++++++++
 2 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/genrdeps/genrdeps.py b/genrdeps/genrdeps.py
new file mode 100755
index 0000000..6e81a03
--- /dev/null
+++ b/genrdeps/genrdeps.py
@@ -0,0 +1,46 @@
+#!/usr/bin/python
+# Pepper and solar..
+
+import os, sys, types
+
+os.environ["PORTDIR_OVERLAY"]=""
+import portage, portage.dep
+
+def processDeps(deps,use=""):
+	returnMe=[]
+	for (index,x) in enumerate(deps):
+		if type(x)==types.ListType:
+			continue
+		elif x=="||":
+			returnMe.extend(processDeps(deps[index+1],use))
+		elif x[-1]=="?":
+			returnMe.extend(processDeps(deps[index+1],"+".join(x for x in (use,x[:-1]) if x)))
+		elif x[0]=="!":
+			returnMe.append((portage.dep_getkey(x),"[B]",use))
+		else:
+			returnMe.append((portage.dep_getkey(x),"",use))
+	return returnMe
+
+revdeps = {}
+for cpv in portage.portdb.cpv_all():
+	try:
+		deps = processDeps(portage.dep.paren_reduce(portage.portdb.aux_get(cpv, [sys.argv[1]])[0]))
+	except:
+		continue
+
+	for dep in deps:
+		if dep[0] not in revdeps:
+			revdeps[dep[0]] = []
+		revdeps[dep[0]].append((cpv, dep[1], dep[2] and ":"+dep[2]))
+
+dirs = []
+for cp in revdeps:
+    c = cp.split("/")[0]
+    if c not in dirs:
+        os.makedirs(c)
+        dirs.append(c)
+
+    revdeps[cp].sort()
+    f = open(cp, "w")
+    f.write("\n".join([ b+cpv+use for (cpv,b,use) in revdeps[cp] ])+"\n")
+    f.close()

diff --git a/genrdeps/run-genrdeps-index.sh b/genrdeps/run-genrdeps-index.sh
new file mode 100755
index 0000000..aa1b7fd
--- /dev/null
+++ b/genrdeps/run-genrdeps-index.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+${OUTPUTDIR}
+OUTPUT=/var/www/qa-reports.gentoo.org/htdocs/output/genrdeps
+[[ -d ${OUTPUT} ]] || mkdir ${OUTPUT}
+
+rm -rf ${OUTPUTDIR}/rindex
+mkdir ${OUTPUTDIR}/rindex
+cd ${OUTPUTDIR}/rindex
+/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py RDEPEND
+find | cut -c 3- > .rindex
+
+rm -rf ${OUTPUTDIR}/dindex
+mkdir ${OUTPUTDIR}/dindex
+cd ${OUTPUTDIR}/dindex
+/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py DEPEND
+find | cut -c 3- > .dindex



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2011-03-22  5:17 Jeremy Olexa
  0 siblings, 0 replies; 6+ messages in thread
From: Jeremy Olexa @ 2011-03-22  5:17 UTC (permalink / raw
  To: gentoo-commits

commit:     e88dad8e7c573418271f37de8709082810656d33
Author:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 05:17:17 2011 +0000
Commit:     Jeremy Olexa <darkside <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 05:17:17 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=e88dad8e

genrdeps: fix typos in variable names

---
 genrdeps/run-genrdeps-index.sh |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/genrdeps/run-genrdeps-index.sh b/genrdeps/run-genrdeps-index.sh
index aa1b7fd..da23879 100755
--- a/genrdeps/run-genrdeps-index.sh
+++ b/genrdeps/run-genrdeps-index.sh
@@ -1,7 +1,6 @@
 #!/bin/sh
-${OUTPUTDIR}
-OUTPUT=/var/www/qa-reports.gentoo.org/htdocs/output/genrdeps
-[[ -d ${OUTPUT} ]] || mkdir ${OUTPUT}
+OUTPUTDIR=/var/www/qa-reports.gentoo.org/htdocs/output/genrdeps
+[[ -d ${OUTPUTDIR} ]] || mkdir ${OUTPUTDIR}
 
 rm -rf ${OUTPUTDIR}/rindex
 mkdir ${OUTPUTDIR}/rindex



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2012-04-01 22:10 Christian Ruppert
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Ruppert @ 2012-04-01 22:10 UTC (permalink / raw
  To: gentoo-commits

commit:     c5f274ccc91d59cddceb63aa9f65c5741e6b678c
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  1 22:06:55 2012 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 22:06:55 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=c5f274cc

Improve run-genrdeps-index.sh

This is a slightly modified version of Arfrever's patch (bug 410399).
We'll remove the output dirs now only when we're done with the specified job,
this allows us to view the old data while an update is running in the
background.

Reported-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail.com>
X-Gentoo-Bug: 410399
X-Gentoo-Bug-URL: https://bugs.gentoo.org/410399

---
 genrdeps/run-genrdeps-index.sh |   30 ++++++++++++++++++++----------
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/genrdeps/run-genrdeps-index.sh b/genrdeps/run-genrdeps-index.sh
index 09cf7ac..819940d 100755
--- a/genrdeps/run-genrdeps-index.sh
+++ b/genrdeps/run-genrdeps-index.sh
@@ -1,21 +1,31 @@
 #!/bin/sh
 OUTPUTDIR=/var/www/qa-reports.gentoo.org/htdocs/output/genrdeps
-[[ -d ${OUTPUTDIR} ]] || mkdir -p ${OUTPUTDIR}
+[ -d "${OUTPUTDIR}" ] || mkdir -p ${OUTPUTDIR}
+cd ${OUTPUTDIR}
 
-rm -rf ${OUTPUTDIR}/rindex
-mkdir ${OUTPUTDIR}/rindex
-cd ${OUTPUTDIR}/rindex
+mkdir .rindex_new
+pushd .rindex_new > /dev/null
 /var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py RDEPEND
 find | cut -c 3- > .rindex
+popd > /dev/null
+mv rindex rindex_old
+mv .rindex_new rindex
+rm -rf rindex_old
 
-rm -rf ${OUTPUTDIR}/dindex
-mkdir ${OUTPUTDIR}/dindex
-cd ${OUTPUTDIR}/dindex
+mkdir .dindex_new
+pushd .dindex_new > /dev/null
 /var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py DEPEND
 find | cut -c 3- > .dindex
+popd > /dev/null
+mv dindex dindex_old
+mv .dindex_new dindex
+rm -rf dindex_old
 
-rm -rf ${OUTPUTDIR}/pindex
-mkdir ${OUTPUTDIR}/pindex
-cd ${OUTPUTDIR}/pindex
+mkdir .pindex_new
+pushd .pindex_new > /dev/null
 /var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py PDEPEND
 find | cut -c 3- > .pindex
+popd > /dev/null
+mv pindex pindex_old
+mv .pindex_new pindex
+rm -rf pindex_old



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2014-08-28 19:16 Jorge Manuel B. S. Vicetto
  0 siblings, 0 replies; 6+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2014-08-28 19:16 UTC (permalink / raw
  To: gentoo-commits

commit:     854a70debc99c31bb15f0034b8d2c1de01847ad4
Author:     Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 28 19:11:57 2014 +0000
Commit:     Jorge Manuel B. S. Vicetto <jmbsvicetto <AT> gentoo <DOT> org>
CommitDate: Thu Aug 28 19:11:57 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=854a70de

Since genrdeps.py doesn't work with python3, use python2.7 for the she-bang.

Signed-off-by: Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto <AT> gentoo.org>

---
 genrdeps/genrdeps.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/genrdeps/genrdeps.py b/genrdeps/genrdeps.py
index 6e81a03..d7eeb76 100755
--- a/genrdeps/genrdeps.py
+++ b/genrdeps/genrdeps.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2.7
 # Pepper and solar..
 
 import os, sys, types


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2020-02-22  5:54 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2020-02-22  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     3829672aa84492623130bf1303d567c1c1c2dd1c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 22 05:53:44 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 05:53:44 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=3829672a

genrdeps: Fix randomly skipping nested deps

FWIU the current logic skips || ( ( ... ) ( ... ) ) blocks.  Fix that.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 genrdeps/genrdeps.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/genrdeps/genrdeps.py b/genrdeps/genrdeps.py
index d7eeb76..412fff8 100755
--- a/genrdeps/genrdeps.py
+++ b/genrdeps/genrdeps.py
@@ -10,7 +10,7 @@ def processDeps(deps,use=""):
 	returnMe=[]
 	for (index,x) in enumerate(deps):
 		if type(x)==types.ListType:
-			continue
+			returnMe.extend(processDeps(x,use))
 		elif x=="||":
 			returnMe.extend(processDeps(deps[index+1],use))
 		elif x[-1]=="?":


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/
@ 2020-02-24  9:11 Michał Górny
  0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2020-02-24  9:11 UTC (permalink / raw
  To: gentoo-commits

commit:     4c4c42f9dfc1000a14d6aed140c24418203cced4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 24 09:10:53 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 24 09:10:53 2020 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=4c4c42f9

Remove old genrdeps

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 genrdeps/genrdeps.py           | 46 ------------------------------------------
 genrdeps/run-genrdeps-index.sh | 40 ------------------------------------
 2 files changed, 86 deletions(-)

diff --git a/genrdeps/genrdeps.py b/genrdeps/genrdeps.py
deleted file mode 100755
index 412fff8..0000000
--- a/genrdeps/genrdeps.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/python2.7
-# Pepper and solar..
-
-import os, sys, types
-
-os.environ["PORTDIR_OVERLAY"]=""
-import portage, portage.dep
-
-def processDeps(deps,use=""):
-	returnMe=[]
-	for (index,x) in enumerate(deps):
-		if type(x)==types.ListType:
-			returnMe.extend(processDeps(x,use))
-		elif x=="||":
-			returnMe.extend(processDeps(deps[index+1],use))
-		elif x[-1]=="?":
-			returnMe.extend(processDeps(deps[index+1],"+".join(x for x in (use,x[:-1]) if x)))
-		elif x[0]=="!":
-			returnMe.append((portage.dep_getkey(x),"[B]",use))
-		else:
-			returnMe.append((portage.dep_getkey(x),"",use))
-	return returnMe
-
-revdeps = {}
-for cpv in portage.portdb.cpv_all():
-	try:
-		deps = processDeps(portage.dep.paren_reduce(portage.portdb.aux_get(cpv, [sys.argv[1]])[0]))
-	except:
-		continue
-
-	for dep in deps:
-		if dep[0] not in revdeps:
-			revdeps[dep[0]] = []
-		revdeps[dep[0]].append((cpv, dep[1], dep[2] and ":"+dep[2]))
-
-dirs = []
-for cp in revdeps:
-    c = cp.split("/")[0]
-    if c not in dirs:
-        os.makedirs(c)
-        dirs.append(c)
-
-    revdeps[cp].sort()
-    f = open(cp, "w")
-    f.write("\n".join([ b+cpv+use for (cpv,b,use) in revdeps[cp] ])+"\n")
-    f.close()

diff --git a/genrdeps/run-genrdeps-index.sh b/genrdeps/run-genrdeps-index.sh
deleted file mode 100755
index fd89301..0000000
--- a/genrdeps/run-genrdeps-index.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-OUTPUTDIR=/var/www/qa-reports.gentoo.org/htdocs/output/genrdeps
-[ -d "${OUTPUTDIR}" ] || mkdir -p ${OUTPUTDIR}
-cd ${OUTPUTDIR}
-
-mkdir .rindex_new
-pushd .rindex_new > /dev/null
-/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py RDEPEND
-find | cut -c 3- > .rindex
-popd > /dev/null
-mv rindex rindex_old
-mv .rindex_new rindex
-rm -rf rindex_old
-
-mkdir .dindex_new
-pushd .dindex_new > /dev/null
-/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py DEPEND
-find | cut -c 3- > .dindex
-popd > /dev/null
-mv dindex dindex_old
-mv .dindex_new dindex
-rm -rf dindex_old
-
-mkdir .pindex_new
-pushd .pindex_new > /dev/null
-/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py PDEPEND
-find | cut -c 3- > .pindex
-popd > /dev/null
-mv pindex pindex_old
-mv .pindex_new pindex
-rm -rf pindex_old
-
-mkdir .bindex_new
-pushd .bindex_new > /dev/null
-/var/www/qa-reports.gentoo.org/qa-scripts/genrdeps/genrdeps.py BDEPEND
-find | cut -c 3- > .bindex
-popd > /dev/null
-mv bindex bindex_old
-mv .bindex_new bindex
-rm -rf bindex_old


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-24  9:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-24  9:11 [gentoo-commits] proj/qa-scripts:master commit in: genrdeps/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2020-02-22  5:54 Michał Górny
2014-08-28 19:16 Jorge Manuel B. S. Vicetto
2012-04-01 22:10 Christian Ruppert
2011-03-22  5:17 Jeremy Olexa
2011-03-22  4:10 Jeremy Olexa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox