From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8CE0B1382C5 for ; Fri, 30 Mar 2018 18:27:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6597BE081B; Fri, 30 Mar 2018 18:27:44 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AE10E081B for ; Fri, 30 Mar 2018 18:27:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8A5DF335D63 for ; Fri, 30 Mar 2018 18:27:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E454F268 for ; Fri, 30 Mar 2018 18:27:40 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1522434159.2a25ec6e1470446e80f12d2c51118c35e57024b3.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: tests/atom_explode/ X-VCS-Repository: proj/portage-utils X-VCS-Files: tests/atom_explode/atom-explode.py tests/atom_explode/dotest X-VCS-Directories: tests/atom_explode/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 2a25ec6e1470446e80f12d2c51118c35e57024b3 X-VCS-Branch: master Date: Fri, 30 Mar 2018 18:27:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 05fb1c88-704c-47d4-8891-5b250568ac1f X-Archives-Hash: 8c4a55c3feb629e130f2dba8f981e4cb commit: 2a25ec6e1470446e80f12d2c51118c35e57024b3 Author: Fabian Groffen gentoo org> AuthorDate: Fri Mar 30 18:22:39 2018 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Mar 30 18:22:39 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2a25ec6e tests/atom_explode: deal with Manifest.gz files, bug #638970 There is two parts in here: a) atom-explode.py: don't crash when Portage couldn't map an atom, just print a descriptive message instead b) dotest: filter out Manifest.* files to not feed in non-atoms thanks tka for testing Bug: https://bugs.gentoo.org/638970 tests/atom_explode/atom-explode.py | 3 +++ tests/atom_explode/dotest | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/atom_explode/atom-explode.py b/tests/atom_explode/atom-explode.py index d28aaed..972bac7 100755 --- a/tests/atom_explode/atom-explode.py +++ b/tests/atom_explode/atom-explode.py @@ -5,6 +5,9 @@ import sys,portage def doit(a): # ['x11-terms', 'wterm', '6.2.9', 'r2'] cpv = portage.catpkgsplit(a) + if not cpv: + print("Portage could not match " + a + " to a package") + return # input -> CATEGORY / [P] PN - PVR [PV] [PR_int] CATEGORY = cpv[0] PN = cpv[1] diff --git a/tests/atom_explode/dotest b/tests/atom_explode/dotest index e852bc0..3fe7086 100755 --- a/tests/atom_explode/dotest +++ b/tests/atom_explode/dotest @@ -14,7 +14,7 @@ if [[ $1 == -v ]] ; then fi # split the disk i/o out so both tests are CPU bound only -files=$(find . -mindepth 2 -type f -printf '%P\n%f\n') +files=$(find . -mindepth 2 -type f ! -name "Manifest.*" -printf '%P\n%f\n') popd >/dev/null printf "atom_explode():"