55 |
sys.exit(0) |
sys.exit(0) |
56 |
return DISPATCH_FORWARD |
return DISPATCH_FORWARD |
57 |
|
|
58 |
def doPostAction(id, instPath): |
def doPostAction(id, instPath, intf): |
59 |
id.instClass.postAction(instPath, flags.serial) |
id.instClass.postAction(instPath, flags.serial, intf) |
60 |
|
|
61 |
def firstbootConfiguration(id, instPath): |
def firstbootConfiguration(id, instPath): |
62 |
if id.firstboot == FIRSTBOOT_RECONFIG: |
if id.firstboot == FIRSTBOOT_RECONFIG: |
1089 |
if flags.test: |
if flags.test: |
1090 |
return |
return |
1091 |
|
|
|
w = intf.progressWindow(_("Post Install"), |
|
|
_("Performing post install configuration..."), 6) |
|
|
|
|
1092 |
upgrade = id.upgrade.get() |
upgrade = id.upgrade.get() |
1093 |
arch = iutil.getArch () |
arch = iutil.getArch () |
1094 |
|
|
1095 |
if upgrade: |
if upgrade: |
1096 |
|
w = intf.progressWindow(_("Post Upgrade"), |
1097 |
|
_("Performing post upgrade configuration..."), 6) |
1098 |
logname = '/root/upgrade.log' |
logname = '/root/upgrade.log' |
1099 |
else: |
else: |
1100 |
|
w = intf.progressWindow(_("Post Install"), |
1101 |
|
_("Performing post install configuration..."), 6) |
1102 |
logname = '/root/install.log' |
logname = '/root/install.log' |
1103 |
|
|
1104 |
instLogName = instPath + logname |
instLogName = instPath + logname |
1278 |
lines = [] |
lines = [] |
1279 |
for p in id.grpset.hdrlist.values(): |
for p in id.grpset.hdrlist.values(): |
1280 |
if not p.isSelected(): |
if not p.isSelected(): |
1281 |
mi = ts.dbMatch('name', p.hdr[rpm.RPMTAG_NAME]) |
text = "%s" % hdrlist.nevra(p) |
1282 |
if mi is not None: |
for f in ts.dbMatch('name', p.hdr[rpm.RPMTAG_NAME]): |
1283 |
for f in ts.dbMatch('name', p.hdr[rpm.RPMTAG_NAME]): |
if hdrlist.nevra(p) == hdrlist.nevra(f): |
1284 |
score1 = rhpl.arch.score(p.hdr[rpm.RPMTAG_ARCH]) |
text = "%s (already installed)" % text |
1285 |
score2 = rhpl.arch.score(f[rpm.RPMTAG_ARCH]) |
else: |
1286 |
|
text = "%s (%s installed)" % (text, hdrlist.nevra(f)) |
1287 |
if score1 == score2 and rpm.versionCompare(p.hdr, f) == 0: |
lines.append("%s\n" % text) |
|
lines.append("%s (already installed)\n" % (hdrlist.nevra(p))) |
|
|
else: |
|
|
lines.append("%s (%s installed)\n" % (hdrlist.nevra(p), hdrlist.nevra(f))) |
|
|
else: |
|
|
lines.append("%s\n" % (hdrlist.nevra(p))) |
|
1288 |
lines.sort() |
lines.sort() |
1289 |
for line in lines: |
for line in lines: |
1290 |
instLog.write(line) |
instLog.write(line) |