From: "Nirbheek Chauhan" <nirbheek@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gnome:master commit in: scripts/
Date: Mon, 28 Mar 2011 16:15:14 +0000 (UTC) [thread overview]
Message-ID: <c35f4ec82c12d0f13c78b97ce9ba53907a520a0a.nirbheek@gentoo> (raw)
commit: c35f4ec82c12d0f13c78b97ce9ba53907a520a0a
Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 28 16:14:39 2011 +0000
Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
CommitDate: Mon Mar 28 16:14:41 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=c35f4ec8
slot_rindex.py: take care of =cat/pkg-ver* deps
Earlier, categorization was done purely on the basis of the :slot dep.
Now, =cat/pkg-ver* deps are also taken into account while generating the
slot-rdep mapping
---
scripts/slot_rindex.py | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/scripts/slot_rindex.py b/scripts/slot_rindex.py
index 3ca50dc..f66b599 100755
--- a/scripts/slot_rindex.py
+++ b/scripts/slot_rindex.py
@@ -122,6 +122,27 @@ def get_deps_both(cpv, depvars=DEPVARS):
dep_cps.add(portage.dep.dep_getkey(dep))
return (dep_cps, dep_strs)
+def get_dep_slot(dep):
+ """
+ If the dep atom contains a slot, return that
+ If the dep atom doesn't contain a slot, but is of the =cat/pkg-ver* type,
+ check which slots each satisfied cpv has, and return that if they're all the
+ same; return None if they're different
+ """
+ # FIXME: Use our own portdb so that we match atoms outside of PORTDIR too
+ slot = portage.dep.dep_getslot(dep)
+ if slot or not dep.startswith('='):
+ return slot
+ cp = portage.dep.dep_getkey(dep)
+ cpvrs = portage.dep.match_from_list(dep, portdb.xmatch('match-all', cp))
+ for cpvr in cpvrs:
+ my_slot = portdb.aux_get(cpvr, ['SLOT'])[0]
+ if slot and my_slot != slot:
+ # omg, one of the slots is different
+ return None
+ slot = my_slot
+ return slot
+
def get_revdeps_rindex(key):
"""
Given a key, returns a reverse-dependency list of that key using the tinderbox rindex
@@ -172,10 +193,10 @@ for rdep in revdeps:
(cps, deps) = get_deps_both(rdep)
if KEY not in cps:
continue
- for cpv in deps:
- if cpv.find(KEY) == -1:
+ for dep in deps:
+ if dep.find(KEY) == -1:
continue
- slot = portage.dep.dep_getslot(cpv)
+ slot = get_dep_slot(dep)
if not slot_rdeps.has_key(slot):
slot_rdeps[slot] = []
slot_rdeps[slot].append(rdep)
next reply other threads:[~2011-03-28 16:15 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-28 16:15 Nirbheek Chauhan [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-04-03 19:42 [gentoo-commits] proj/gnome:master commit in: scripts/ Matt Turner
2020-04-03 19:42 Matt Turner
2020-03-28 8:31 Mart Raudsepp
2020-03-10 22:05 Matt Turner
2019-02-07 11:58 Mart Raudsepp
2018-04-25 10:32 Mart Raudsepp
2018-01-10 3:25 Mart Raudsepp
2012-04-01 21:14 Nirbheek Chauhan
2012-04-01 19:12 Nirbheek Chauhan
2011-08-18 6:23 Nirbheek Chauhan
2011-07-12 21:15 Nirbheek Chauhan
2011-05-21 18:38 Nirbheek Chauhan
2011-05-19 12:35 Gilles Dartiguelongue
2011-04-13 9:57 Nirbheek Chauhan
2011-04-09 6:29 Nirbheek Chauhan
2011-03-28 15:04 Nirbheek Chauhan
2011-03-26 1:58 Nirbheek Chauhan
2011-03-23 21:59 Nirbheek Chauhan
2011-03-23 21:59 Nirbheek Chauhan
2011-03-23 21:59 Nirbheek Chauhan
2011-03-23 19:21 Gilles Dartiguelongue
2011-03-23 10:39 Gilles Dartiguelongue
2011-03-20 8:11 Nirbheek Chauhan
2011-03-18 9:59 Nirbheek Chauhan
2011-03-18 8:23 Nirbheek Chauhan
2011-03-17 17:12 Nirbheek Chauhan
2011-03-15 13:08 Nirbheek Chauhan
2011-03-14 18:41 Nirbheek Chauhan
2011-03-12 20:10 Nirbheek Chauhan
2011-03-04 15:40 Nirbheek Chauhan
2011-02-18 4:40 Nirbheek Chauhan
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=c35f4ec82c12d0f13c78b97ce9ba53907a520a0a.nirbheek@gentoo \
--to=nirbheek@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