49 |
|
|
50 |
if id.rootParts is not None and len(id.rootParts) > 0: |
if id.rootParts is not None and len(id.rootParts) > 0: |
51 |
dispatch.skipStep("findinstall", skip = 0) |
dispatch.skipStep("findinstall", skip = 0) |
52 |
|
if productName.find("SME Server") == -1: |
53 |
|
dispatch.skipStep("installtype", skip = 1) |
54 |
else: |
else: |
55 |
dispatch.skipStep("findinstall", skip = 1) |
dispatch.skipStep("findinstall", skip = 1) |
56 |
|
dispatch.skipStep("installtype", skip = 0) |
57 |
|
|
58 |
def findExistingRoots(intf, id, chroot, upgradeany = 0): |
def findExistingRoots(intf, id, chroot, upgradeany = 0): |
59 |
if not flags.setupFilesystems: |
if not flags.setupFilesystems: |
138 |
return -1 |
return -1 |
139 |
|
|
140 |
if flags.setupFilesystems: |
if flags.setupFilesystems: |
141 |
|
oldfsset.checkFilesystems(instPath) |
142 |
oldfsset.mountFilesystems(instPath, readOnly = readOnly) |
oldfsset.mountFilesystems(instPath, readOnly = readOnly) |
143 |
|
|
144 |
# XXX we should properly support 'auto' at some point |
# XXX we should properly support 'auto' at some point |
391 |
try: |
try: |
392 |
os.unlink("%s/var/lib/rpm/%s" %(instPath, file)) |
os.unlink("%s/var/lib/rpm/%s" %(instPath, file)) |
393 |
except: |
except: |
394 |
log("failed to unlink /var/lib/rpm/%s" %(file,)) |
pass |
395 |
|
# log("failed to unlink /var/lib/rpm/%s" %(file,)) |
396 |
|
|
397 |
packages = findpackageset.findpackageset(id.grpset.hdrlist.hdlist, |
packages = findpackageset.findpackageset(id.grpset.hdrlist.hdlist, |
398 |
instPath) |
instPath) |
520 |
pass |
pass |
521 |
sys.exit(0) |
sys.exit(0) |
522 |
|
|
523 |
# # Figure out current version for upgrade nag and for determining weird |
# Figure out current version for upgrade nag and for determining weird |
524 |
# # upgrade cases |
# upgrade cases |
525 |
# supportedUpgradeVersion = -1 |
supportedUpgradeVersion = -1 |
526 |
# mi = ts.dbMatch('provides', 'redhat-release') |
mi = ts.dbMatch('provides', 'e-smith-release') |
527 |
# for h in mi: |
for h in mi: |
528 |
# if h[rpm.RPMTAG_EPOCH] is None: |
if h[rpm.RPMTAG_EPOCH] is None: |
529 |
# epoch = None |
epoch = None |
530 |
# else: |
else: |
531 |
# epoch = str(h[rpm.RPMTAG_EPOCH]) |
epoch = str(h[rpm.RPMTAG_EPOCH]) |
532 |
# |
|
533 |
# if supportedUpgradeVersion <= 0: |
if supportedUpgradeVersion <= 0: |
534 |
# val = rpm.labelCompare((None, '3', '1'), |
val = rpm.labelCompare(('21', '6.0', '11'), |
535 |
# (epoch, h[rpm.RPMTAG_VERSION], |
(epoch, h[rpm.RPMTAG_VERSION], |
536 |
# h[rpm.RPMTAG_RELEASE])) |
h[rpm.RPMTAG_RELEASE])) |
537 |
# if val > 0: |
if val > 0: |
538 |
# supportedUpgradeVersion = 0 |
supportedUpgradeVersion = 0 |
539 |
# else: |
else: |
540 |
# supportedUpgradeVersion = 1 |
supportedUpgradeVersion = 1 |
541 |
# break |
break |
542 |
# |
|
543 |
# if productName.find("Red Hat Enterprise Linux") == -1: |
if supportedUpgradeVersion == 0: |
544 |
# supportedUpgradeVersion = 1 |
rc = intf.messageWindow(_("Warning"), |
545 |
# |
_("You appear to be upgrading from a system " |
546 |
# if supportedUpgradeVersion == 0: |
"which is too old to upgrade to this " |
547 |
# rc = intf.messageWindow(_("Warning"), |
"version of %s. Are you sure you wish to " |
548 |
# _("You appear to be upgrading from a system " |
"continue the upgrade " |
549 |
# "which is too old to upgrade to this " |
"process?") %(productName,), |
550 |
# "version of %s. Are you sure you wish to " |
type = "yesno") |
551 |
# "continue the upgrade " |
if rc == 0: |
552 |
# "process?") %(productName,), |
try: |
553 |
# type = "yesno") |
resetRpmdb(id.dbpath, instPath) |
554 |
# if rc == 0: |
except Exception, e: |
555 |
# try: |
log("error returning rpmdb to old state: %s" %(e,)) |
556 |
# resetRpmdb(id.dbpath, instPath) |
pass |
557 |
# except Exception, e: |
sys.exit(0) |
558 |
# log("error returning rpmdb to old state: %s" %(e,)) |
|
|
# pass |
|
|
# sys.exit(0) |
|
|
# |
|
559 |
|
|
560 |
# during upgrade, make sure that we only install %lang colored files |
# during upgrade, make sure that we only install %lang colored files |
561 |
# for the languages selected to be supported. |
# for the languages selected to be supported. |