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