Gentoo Archives: gentoo-commits

From: "Alec Warner (antarus)" <antarus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9377 - in main/trunk: bin pym/portage pym/repoman
Date: Sun, 24 Feb 2008 07:52:36
Message-Id: E1JTBf0-0000Zq-4T@stork.gentoo.org
1 Author: antarus
2 Date: 2008-02-24 07:52:33 +0000 (Sun, 24 Feb 2008)
3 New Revision: 9377
4
5 Modified:
6 main/trunk/bin/repoman
7 main/trunk/pym/portage/news.py
8 main/trunk/pym/repoman/utilities.py
9 Log:
10 Various repoman fixes, plus a weird lockfile tracekback in news.
11
12 Modified: main/trunk/bin/repoman
13 ===================================================================
14 --- main/trunk/bin/repoman 2008-02-24 00:09:42 UTC (rev 9376)
15 +++ main/trunk/bin/repoman 2008-02-24 07:52:33 UTC (rev 9377)
16 @@ -9,6 +9,7 @@
17
18 import commands
19 import codecs
20 +import commands
21 import errno
22 import formatter
23 import logging
24 @@ -21,7 +22,6 @@
25 import tempfile
26 import time
27
28 -from commands import getstatusoutput
29 from itertools import izip
30 from stat import S_ISDIR, ST_CTIME
31
32 @@ -984,7 +984,7 @@
33 if xmllint_capable:
34 # xmlint can produce garbage output even on success, so only dump
35 # the ouput when it fails.
36 - st, out = getstatusoutput(
37 + st, out = commands.getstatusoutput(
38 "xmllint --nonet --noout --dtdvalid '%s' '%s'" % \
39 (metadata_dtd, os.path.join(checkdir, "metadata.xml")))
40 if st != os.EX_OK:
41 @@ -1594,7 +1594,7 @@
42 for myfile in myupdates:
43 if myfile in bin_blobs:
44 continue
45 - myout=getstatusoutput("egrep -q "+headerstring+" "+myfile)
46 + myout = commands.getstatusoutput("egrep -q "+headerstring+" "+myfile)
47 if myout[0]==0:
48 myheaders.append(myfile)
49
50
51 Modified: main/trunk/pym/portage/news.py
52 ===================================================================
53 --- main/trunk/pym/portage/news.py 2008-02-24 00:09:42 UTC (rev 9376)
54 +++ main/trunk/pym/portage/news.py 2008-02-24 07:52:33 UTC (rev 9377)
55 @@ -105,7 +105,8 @@
56 skiplist.append(item.name)
57 unread_file.close()
58 finally:
59 - unlockfile(unread_lock)
60 + if unread_lock:
61 + unlockfile(unread_lock)
62 write_atomic(skipfile, "\n".join(skiplist)+"\n")
63 try:
64 apply_permissions(filename=skipfile,
65
66 Modified: main/trunk/pym/repoman/utilities.py
67 ===================================================================
68 --- main/trunk/pym/repoman/utilities.py 2008-02-24 00:09:42 UTC (rev 9376)
69 +++ main/trunk/pym/repoman/utilities.py 2008-02-24 07:52:33 UTC (rev 9377)
70 @@ -123,7 +123,7 @@
71 p = os.path.join(path, d)
72
73 if os.path.isdir(p):
74 - cat_pkg_dir = os.path.join(p.split(os.path.sep)[-2:])
75 + cat_pkg_dir = os.path.join(*p.split(os.path.sep)[-2:])
76 logging.debug('adding %s to scanlist' % cat_pkg_dir)
77 ret.append(cat_pkg_dir)
78 return ret
79 @@ -152,7 +152,9 @@
80 logging.warn('%s is not a valid category according to profiles/categories, ' \
81 'skipping checks in %s' % (catdir, catdir))
82 else:
83 - scanlist.append(os.path.join(catdir, pkgdir))
84 + path = os.path.join(catdir, pkgdir)
85 + logging.debug('adding %s to scanlist' % path)
86 + scanlist.append(path)
87 return scanlist
88
89
90
91 --
92 gentoo-commits@l.g.o mailing list