Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoolkit:master commit in: pym/gentoolkit/test/, pym/gentoolkit/
Date: Mon, 17 Sep 2018 23:32:17
Message-Id: 1537227087.72bb4d3a91e47db7532219889dbeda72f6073746.vdupras@gentoo
1 commit: 72bb4d3a91e47db7532219889dbeda72f6073746
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 17 23:31:27 2018 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 17 23:31:27 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=72bb4d3a
7
8 Atom.intersects: add repo comparison
9
10 The code for it was already there, but commented out. Portage now
11 supports repo alright...
12
13 pym/gentoolkit/atom.py | 7 +++----
14 pym/gentoolkit/test/test_atom.py | 5 ++---
15 2 files changed, 5 insertions(+), 7 deletions(-)
16
17 diff --git a/pym/gentoolkit/atom.py b/pym/gentoolkit/atom.py
18 index 9d8a558..b5b755c 100644
19 --- a/pym/gentoolkit/atom.py
20 +++ b/pym/gentoolkit/atom.py
21 @@ -227,10 +227,9 @@ class Atom(portage.dep.Atom, CPV):
22 this_slot != that_slot):
23 return False
24
25 - # TODO: Uncomment when Portage's Atom supports repo
26 - #if (self.repo_name is not None and other.repo_name is not None and
27 - # self.repo_name != other.repo_name):
28 - # return False
29 + if (self.repo is not None and other.repo is not None and
30 + self.repo != other.repo):
31 + return False
32
33 # Use deps are similar: if one of us forces a flag on and the
34 # other forces it off we do not intersect. If only one of us
35
36 diff --git a/pym/gentoolkit/test/test_atom.py b/pym/gentoolkit/test/test_atom.py
37 index 1adb221..399905e 100644
38 --- a/pym/gentoolkit/test/test_atom.py
39 +++ b/pym/gentoolkit/test/test_atom.py
40 @@ -126,9 +126,8 @@ class TestGentoolkitAtom(unittest.TestCase):
41 ('=cat/pkg-1-r1*', '<cat/pkg-1-r1', False),
42 ('=cat/pkg-1*', '>cat/pkg-2', False),
43 ('>=cat/pkg-8.4', '=cat/pkg-8.3.4*', False),
44 - # Repos not yet supported by Portage
45 - #('cat/pkg::gentoo', 'cat/pkg', True),
46 - #('cat/pkg::gentoo', 'cat/pkg::foo', False),
47 + ('cat/pkg::gentoo', 'cat/pkg', True),
48 + ('cat/pkg::gentoo', 'cat/pkg::foo', False),
49 ('=sys-devel/gcc-4.1.1-r3', '=sys-devel/gcc-3.3*', False),
50 ('=sys-libs/db-4*', '~sys-libs/db-4.3.29', True),
51 ]: