Gentoo Archives: gentoo-commits

From: "Alec Warner (antarus)" <antarus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in users/antarus/projects/infra: use_desc_gen.py
Date: Mon, 04 Aug 2008 19:29:28
Message-Id: E1KQ5kD-0006M2-VB@stork.gentoo.org
1 antarus 08/08/04 19:29:25
2
3 Modified: use_desc_gen.py
4 Log:
5 skip categories that do not exist in the repo but exist in categories for jmbsvicetto
6
7 Revision Changes Path
8 1.6 users/antarus/projects/infra/use_desc_gen.py
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.6&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?rev=1.6&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/users/antarus/projects/infra/use_desc_gen.py?r1=1.5&r2=1.6
13
14 Index: use_desc_gen.py
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/users/antarus/projects/infra/use_desc_gen.py,v
17 retrieving revision 1.5
18 retrieving revision 1.6
19 diff -u -r1.5 -r1.6
20 --- use_desc_gen.py 28 Jul 2008 23:15:04 -0000 1.5
21 +++ use_desc_gen.py 4 Aug 2008 19:29:25 -0000 1.6
22 @@ -17,6 +17,7 @@
23
24 __author__ = "Alec Warner <antarus@g.o>"
25
26 +import errno
27 import logging
28 import optparse
29 import os
30 @@ -51,7 +52,12 @@
31 for cat in categories:
32 cat_path = os.path.join(repo_path, cat)
33 logging.debug('path to category %s is %s' % (cat, cat_path))
34 - tmp_pkgs = GetPackages(cat_path)
35 + try:
36 + tmp_pkgs = GetPackages(cat_path)
37 + except OSError, e:
38 + if e.errno == errno.ENOENT:
39 + logging.error('skipping %s because it was not in %s' % (cat,
40 + repo_path))
41 pkg_paths = [os.path.join(cat_path, pkg) for pkg in tmp_pkgs]
42 packages.extend(pkg_paths)