/[smeserver]/cdrom.image/updates/upgrade.py
ViewVC logotype

Diff of /cdrom.image/updates/upgrade.py

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by gordonr, Sat Jul 2 06:33:16 2005 UTC Revision 1.13 by slords, Wed Apr 5 01:20:27 2006 UTC
# Line 38  from rhpl.translate import _ Line 38  from rhpl.translate import _
38  upgrade_remove_blacklist = ()  upgrade_remove_blacklist = ()
39    
40  def findRootParts(intf, id, dispatch, dir, chroot):  def findRootParts(intf, id, dispatch, dir, chroot):
41    
42    #    w = intf.waitWindow(_("Converting to RAID"),
43    #        _("Converting to RAID, this may take several minutes..."))
44    #
45    #    # XXX - FIXME - HACK RAID upgrade
46    #
47    #    rc = iutil.execWithRedirect("/tmp/updates/raidconvert",
48    #                                ["raidconvert"],
49    #                                stdin = None,
50    #                                stdout = "/dev/tty5",
51    #                                stderr = "/dev/tty5")
52    #    w.pop()
53    #
54    #    if rc:
55    #        raise SystemError
56    
57      if dir == DISPATCH_BACK:      if dir == DISPATCH_BACK:
58          return          return
59      if id.rootParts is None:      if id.rootParts is None:
# Line 49  def findRootParts(intf, id, dispatch, di Line 65  def findRootParts(intf, id, dispatch, di
65    
66      if id.rootParts is not None and len(id.rootParts) > 0:      if id.rootParts is not None and len(id.rootParts) > 0:
67          dispatch.skipStep("findinstall", skip = 0)          dispatch.skipStep("findinstall", skip = 0)
68          if productName.find("Red Hat Enterprise Linux") == -1:          if productName.find("SME Server") == -1:
69              dispatch.skipStep("installtype", skip = 1)              dispatch.skipStep("installtype", skip = 1)
70      else:      else:
71          dispatch.skipStep("findinstall", skip = 1)          dispatch.skipStep("findinstall", skip = 1)
# Line 433  def upgradeFindPackages(intf, method, id Line 449  def upgradeFindPackages(intf, method, id
449                                        "installed arch of %s.  This is likely "                                        "installed arch of %s.  This is likely "
450                                        "to not succeed.  Are you sure you "                                        "to not succeed.  Are you sure you "
451                                        "wish to continue the upgrade process?")                                        "wish to continue the upgrade process?")
452                                      %(productName, h[rpm.RPMTAG_ARCH],                                      %(productName, myarch,
453                                        myarch),                                        h[rpm.RPMTAG_ARCH]),
454                                      type="yesno")                                      type="yesno")
455              if rc == 0:              if rc == 0:
456                  try:                  try:
# Line 518  def upgradeFindPackages(intf, method, id Line 534  def upgradeFindPackages(intf, method, id
534                  pass                  pass
535              sys.exit(0)              sys.exit(0)
536    
537  #    # Figure out current version for upgrade nag and for determining weird      # Figure out current version for upgrade nag and for determining weird
538  #    # upgrade cases      # upgrade cases
539  #    supportedUpgradeVersion = -1      supportedUpgradeVersion = -1
540  #    mi = ts.dbMatch('provides', 'redhat-release')      mi = ts.dbMatch('provides', 'e-smith-release')
541  #    for h in mi:      for h in mi:
542  #        if h[rpm.RPMTAG_EPOCH] is None:          if h[rpm.RPMTAG_EPOCH] is None:
543  #            epoch = None              epoch = None
544  #        else:          else:
545  #            epoch = str(h[rpm.RPMTAG_EPOCH])              epoch = str(h[rpm.RPMTAG_EPOCH])
546  #  
547  #        if supportedUpgradeVersion <= 0:          if supportedUpgradeVersion <= 0:
548  #            val = rpm.labelCompare((None, '3', '1'),              val = rpm.labelCompare(('21', '6.0', '11'),
549  #                                   (epoch, h[rpm.RPMTAG_VERSION],                                     (epoch, h[rpm.RPMTAG_VERSION],
550  #                                    h[rpm.RPMTAG_RELEASE]))                                      h[rpm.RPMTAG_RELEASE]))
551  #            if val > 0:              if val > 0:
552  #                supportedUpgradeVersion = 0                  supportedUpgradeVersion = 0
553  #            else:              else:
554  #                supportedUpgradeVersion = 1                  supportedUpgradeVersion = 1
555  #                break                  break
556  #  
557  #    if productName.find("Red Hat Enterprise Linux") == -1:      if supportedUpgradeVersion == 0:
558  #        supportedUpgradeVersion = 1          rc = intf.messageWindow(_("Warning"),
559  #                                  _("You appear to be upgrading from a system "
560  #    if supportedUpgradeVersion == 0:                                    "which is too old to upgrade to this "
561  #        rc = intf.messageWindow(_("Warning"),                                    "version of %s.  Are you sure you wish to "
562  #                                _("You appear to be upgrading from a system "                                    "continue the upgrade "
563  #                                  "which is too old to upgrade to this "                                    "process?") %(productName,),
564  #                                  "version of %s.  Are you sure you wish to "                                  type = "yesno")
565  #                                  "continue the upgrade "          if rc == 0:
566  #                                  "process?") %(productName,),              try:
567  #                                type = "yesno")                  resetRpmdb(id.dbpath, instPath)
568  #        if rc == 0:              except Exception, e:
569  #            try:                  log("error returning rpmdb to old state: %s" %(e,))
570  #                resetRpmdb(id.dbpath, instPath)                  pass
571  #            except Exception, e:              sys.exit(0)
572  #                log("error returning rpmdb to old state: %s" %(e,))  
 #                pass  
 #            sys.exit(0)  
 #  
573    
574      # during upgrade, make sure that we only install %lang colored files      # during upgrade, make sure that we only install %lang colored files
575      # for the languages selected to be supported.      # for the languages selected to be supported.


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed