aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/subslotted-packages.py15
-rwxr-xr-xscripts/subslotted-packages.sh16
2 files changed, 15 insertions, 16 deletions
diff --git a/scripts/subslotted-packages.py b/scripts/subslotted-packages.py
new file mode 100755
index 0000000..7d660cd
--- /dev/null
+++ b/scripts/subslotted-packages.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+from portage.dbapi.porttree import portdbapi
+import subprocess
+
+TREE = "/usr/portage/"
+
+dbapi = portdbapi()
+pkgs = dbapi.cp_all(categories=None, trees=[TREE])
+
+for pkg in pkgs:
+ res = subprocess.call("egrep -q \"SLOT=\\\"?[0-9]*\/\" %s/%s/*.ebuild" % (TREE, pkg), shell=True)
+ if res == 0:
+ print("%s" % pkg)
+
diff --git a/scripts/subslotted-packages.sh b/scripts/subslotted-packages.sh
deleted file mode 100755
index c34ced2..0000000
--- a/scripts/subslotted-packages.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-# find packages with subslots
-
-PORTDIR="${HOME}/cvs/gentoo-x86"
-
-pushd "${PORTDIR}" > /dev/null
-
-for pkg in $(find . -mindepth 2 -maxdepth 2 -type d | sort) ; do
- pushd ${pkg} > /dev/null
- if [[ -n $(find . -name '*.ebuild') ]] ; then
- [[ -n $(egrep "SLOT=\"?[0-9]*\/" *.ebuild) ]] && echo ${pkg/\.\//}
- fi
- popd > /dev/null # ${pkg}
-done
-
-popd > /dev/null # ${PORTDIR}