1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' anaconda-10.1.1.37/packages.py mezzanine_patched_anaconda-10.1.1.37/packages.py |
2 |
|
|
--- anaconda-10.1.1.37/packages.py 2006-04-06 06:14:16.948845599 +1000 |
3 |
|
|
+++ mezzanine_patched_anaconda-10.1.1.37/packages.py 2006-04-06 06:13:12.308104109 +1000 |
4 |
|
|
@@ -19,6 +19,7 @@ |
5 |
|
|
import iutil |
6 |
|
|
import isys |
7 |
|
|
import rpm |
8 |
|
|
+import hdrlist |
9 |
|
|
import os |
10 |
|
|
import timer |
11 |
|
|
import time |
12 |
|
|
@@ -400,10 +401,7 @@ |
13 |
|
|
|
14 |
|
|
self.progress.setPackage(h) |
15 |
|
|
self.progress.setPackageScale(0, 1) |
16 |
|
|
- self.instLog.write (self.modeText % (h[rpm.RPMTAG_NAME], |
17 |
|
|
- h[rpm.RPMTAG_VERSION], |
18 |
|
|
- h[rpm.RPMTAG_RELEASE], |
19 |
|
|
- h[rpm.RPMTAG_ARCH])) |
20 |
|
|
+ self.instLog.write (self.modeText % (hdrlist.nevra(h))) |
21 |
|
|
self.instLog.flush () |
22 |
|
|
|
23 |
|
|
self.rpmFD = -1 |
24 |
|
|
@@ -985,9 +983,9 @@ |
25 |
|
|
# dup'd when we go out of scope |
26 |
|
|
|
27 |
|
|
if upgrade: |
28 |
|
|
- modeText = _("Upgrading %s-%s-%s.%s.\n") |
29 |
|
|
+ modeText = _("Upgrading %s.\n") |
30 |
|
|
else: |
31 |
|
|
- modeText = _("Installing %s-%s-%s.%s.\n") |
32 |
|
|
+ modeText = _("Installing %s.\n") |
33 |
|
|
|
34 |
|
|
log ("getting rpm error class") |
35 |
|
|
errors = rpmErrorClass(instLog) |
36 |
|
|
@@ -1288,13 +1286,10 @@ |
37 |
|
|
h = ts.hdrFromFdno(fd) |
38 |
|
|
os.close(fd) |
39 |
|
|
if upgrade: |
40 |
|
|
- text = _("Upgrading %s-%s-%s.%s.\n") |
41 |
|
|
+ text = _("Upgrading %s.\n") |
42 |
|
|
else: |
43 |
|
|
- text = _("Installing %s-%s-%s.%s.\n") |
44 |
|
|
- instLog.write(text % (h['name'], |
45 |
|
|
- h['version'], |
46 |
|
|
- h['release'], |
47 |
|
|
- h['arch'])) |
48 |
|
|
+ text = _("Installing %s.\n") |
49 |
|
|
+ instLog.write(text % (hdrlist.nevra(h))) |
50 |
|
|
os.unlink(id.compspkg) |
51 |
|
|
del ts |
52 |
|
|
|
53 |
|
|
@@ -1320,14 +1315,19 @@ |
54 |
|
|
instLog.write(_("\n\nThe following packages were available in " |
55 |
|
|
"this version but NOT installed:\n")) |
56 |
|
|
|
57 |
|
|
+ ts = rpm.TransactionSet(instPath) |
58 |
|
|
+ ts.setVSFlags(~(rpm.RPMVSF_NORSA|rpm.RPMVSF_NODSA)) |
59 |
|
|
+ |
60 |
|
|
lines = [] |
61 |
|
|
for p in id.grpset.hdrlist.values(): |
62 |
|
|
if not p.isSelected(): |
63 |
|
|
- lines.append("%s-%s-%s.%s.rpm\n" % |
64 |
|
|
- (p.hdr[rpm.RPMTAG_NAME], |
65 |
|
|
- p.hdr[rpm.RPMTAG_VERSION], |
66 |
|
|
- p.hdr[rpm.RPMTAG_RELEASE], |
67 |
|
|
- p.hdr[rpm.RPMTAG_ARCH])) |
68 |
|
|
+ text = "%s" % (hdrlist.nevra(p)) |
69 |
|
|
+ for f in ts.dbMatch('name', p.hdr[rpm.RPMTAG_NAME]): |
70 |
|
|
+ if hdrlist.nevra(p) == hdrlist.nevra(f): |
71 |
|
|
+ text = "%s (already installed)" % (text) |
72 |
|
|
+ else: |
73 |
|
|
+ text = "%s (%s installed)" % (text, hdrlist.nevra(f)) |
74 |
|
|
+ lines.append("%s\n" % text) |
75 |
|
|
lines.sort() |
76 |
|
|
for line in lines: |
77 |
|
|
instLog.write(line) |