public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alex Legler" <a3li@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/qa-scripts:master commit in: pkg_lists/
Date: Fri, 20 Mar 2015 18:23:38 +0000 (UTC)	[thread overview]
Message-ID: <1426875790.f7632e9c853bb0a711a14d74e40355f791c1d927.a3li@gentoo> (raw)

commit:     f7632e9c853bb0a711a14d74e40355f791c1d927
Author:     Alex Legler <alex <AT> a3li <DOT> li>
AuthorDate: Fri Mar 20 18:23:10 2015 +0000
Commit:     Alex Legler <a3li <AT> gentoo <DOT> org>
CommitDate: Fri Mar 20 18:23:10 2015 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=f7632e9c

Add package list script from www.g.o

 pkg_lists/distrowatch.sh | 28 ++++++++++++++++++++++++++++
 pkg_lists/pkglist.py     | 20 ++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/pkg_lists/distrowatch.sh b/pkg_lists/distrowatch.sh
new file mode 100755
index 0000000..2e165a6
--- /dev/null
+++ b/pkg_lists/distrowatch.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# $Id: distrowatch.sh,v 1.2 2008/07/12 02:02:47 robbat2 Exp $
+# this file creates a list of packages from the Portage tree for distrowatch
+#
+# $1 = web script directory
+# $2 = web site htdocs directory
+
+if ! [ -d "$1" -a -d "$2" ]; then
+	echo "You must specify the path to the web scripts and the path to the output directory"
+	exit 1
+fi
+
+#Note: distrowatch lists non-x86 packages like yaboot, so I'm now including all arches (drobbins, 04/04/2003)
+
+STABLE_ARCHES=" x86 amd64 ppc alpha arm hppa ia64 m68k mips ppc64 s390 sh sparc sparc-fbsd x86-fbsd"
+UNSTABLE_ARCHES=" ~x86 ~amd64 ~ppc ~alpha ~arm ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86-fbsd"
+
+tmp=$(mktemp)
+
+# gentoo_pkglist_x86.txt contains the stable branch packages
+ACCEPT_KEYWORDS="$STABLE_ARCHES" $1/pkglist.py 1> $tmp 2> /dev/null
+cat $tmp > $2/gentoo_pkglist_stable.txt
+
+# gentoo_pkglist_X86.txt contains the unstable branch packages
+ACCEPT_KEYWORDS="$STABLE_ARCHES $UNSTABLE_ARCHES" $1/pkglist.py 1> $tmp 2> /dev/null
+cat $tmp > $2/gentoo_pkglist_unstable.txt
+
+rm -f $tmp

diff --git a/pkg_lists/pkglist.py b/pkg_lists/pkglist.py
new file mode 100755
index 0000000..9777401
--- /dev/null
+++ b/pkg_lists/pkglist.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+# $Id: pkglist.py,v 1.1 2005/11/24 23:45:54 ramereth Exp $
+
+import portage
+
+allpkgs=portage.db["/"]["porttree"].dbapi.cp_all()
+bestpkgs={}
+mycount=0
+
+for x in allpkgs:
+	if x not in bestpkgs.keys():
+		y=portage.db["/"]["porttree"].dbapi.xmatch("bestmatch-visible", x)
+		bestpkgs[x]=y
+		if y=="":
+			continue
+		xs=portage.pkgsplit(bestpkgs[x])
+		print xs[0].split("/")[1],
+		print xs[1],
+		print bestpkgs[x]
+		mycount+=1


             reply	other threads:[~2015-03-20 18:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 18:23 Alex Legler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-17 15:27 [gentoo-commits] proj/qa-scripts:master commit in: pkg_lists/ Brian Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426875790.f7632e9c853bb0a711a14d74e40355f791c1d927.a3li@gentoo \
    --to=a3li@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox