Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: tests/atom_explode/
Date: Fri, 30 Mar 2018 18:27:45
Message-Id: 1522434159.2a25ec6e1470446e80f12d2c51118c35e57024b3.grobian@gentoo
1 commit: 2a25ec6e1470446e80f12d2c51118c35e57024b3
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 30 18:22:39 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 30 18:22:39 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2a25ec6e
7
8 tests/atom_explode: deal with Manifest.gz files, bug #638970
9
10 There is two parts in here:
11 a) atom-explode.py: don't crash when Portage couldn't map an atom, just
12 print a descriptive message instead
13 b) dotest: filter out Manifest.* files to not feed in non-atoms
14
15 thanks tka for testing
16
17 Bug: https://bugs.gentoo.org/638970
18
19 tests/atom_explode/atom-explode.py | 3 +++
20 tests/atom_explode/dotest | 2 +-
21 2 files changed, 4 insertions(+), 1 deletion(-)
22
23 diff --git a/tests/atom_explode/atom-explode.py b/tests/atom_explode/atom-explode.py
24 index d28aaed..972bac7 100755
25 --- a/tests/atom_explode/atom-explode.py
26 +++ b/tests/atom_explode/atom-explode.py
27 @@ -5,6 +5,9 @@ import sys,portage
28 def doit(a):
29 # ['x11-terms', 'wterm', '6.2.9', 'r2']
30 cpv = portage.catpkgsplit(a)
31 + if not cpv:
32 + print("Portage could not match " + a + " to a package")
33 + return
34 # input -> CATEGORY / [P] PN - PVR [PV] [PR_int]
35 CATEGORY = cpv[0]
36 PN = cpv[1]
37
38 diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest
39 index e852bc0..3fe7086 100755
40 --- a/tests/atom_explode/dotest
41 +++ b/tests/atom_explode/dotest
42 @@ -14,7 +14,7 @@ if [[ $1 == -v ]] ; then
43 fi
44
45 # split the disk i/o out so both tests are CPU bound only
46 -files=$(find . -mindepth 2 -type f -printf '%P\n%f\n')
47 +files=$(find . -mindepth 2 -type f ! -name "Manifest.*" -printf '%P\n%f\n')
48 popd >/dev/null
49
50 printf "atom_explode():"