/[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.2 by slords, Sat Jul 30 07:28:39 2005 UTC Revision 1.7 by growell, Fri Sep 16 22:11:45 2005 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        # XXX - FIXME - HACK RAID upgrade
43        rc = iutil.execWithRedirect("/tmp/updates/raidconvert",
44                                        ["raidconvert"],
45                                        stdin = None,
46                                        stdout = "/dev/tty5",
47                                        stderr = "/dev/tty5")
48        if rc:
49            raise SystemError
50    
51      if dir == DISPATCH_BACK:      if dir == DISPATCH_BACK:
52          return          return
53      if id.rootParts is None:      if id.rootParts is None:
# Line 49  def findRootParts(intf, id, dispatch, di Line 59  def findRootParts(intf, id, dispatch, di
59    
60      if id.rootParts is not None and len(id.rootParts) > 0:      if id.rootParts is not None and len(id.rootParts) > 0:
61          dispatch.skipStep("findinstall", skip = 0)          dispatch.skipStep("findinstall", skip = 0)
62            if productName.find("SME Server") == -1:
63                dispatch.skipStep("installtype", skip = 1)
64      else:      else:
65          dispatch.skipStep("findinstall", skip = 1)          dispatch.skipStep("findinstall", skip = 1)
66            dispatch.skipStep("installtype", skip = 0)
67    
68  def findExistingRoots(intf, id, chroot, upgradeany = 0):  def findExistingRoots(intf, id, chroot, upgradeany = 0):
69      if not flags.setupFilesystems:      if not flags.setupFilesystems:
# Line 515  def upgradeFindPackages(intf, method, id Line 528  def upgradeFindPackages(intf, method, id
528                  pass                  pass
529              sys.exit(0)              sys.exit(0)
530    
531  #    # Figure out current version for upgrade nag and for determining weird      # Figure out current version for upgrade nag and for determining weird
532  #    # upgrade cases      # upgrade cases
533  #    supportedUpgradeVersion = -1      supportedUpgradeVersion = -1
534  #    mi = ts.dbMatch('provides', 'redhat-release')      mi = ts.dbMatch('provides', 'e-smith-release')
535  #    for h in mi:      for h in mi:
536  #        if h[rpm.RPMTAG_EPOCH] is None:          if h[rpm.RPMTAG_EPOCH] is None:
537  #            epoch = None              epoch = None
538  #        else:          else:
539  #            epoch = str(h[rpm.RPMTAG_EPOCH])              epoch = str(h[rpm.RPMTAG_EPOCH])
540  #  
541  #        if supportedUpgradeVersion <= 0:          if supportedUpgradeVersion <= 0:
542  #            val = rpm.labelCompare((None, '3', '1'),              val = rpm.labelCompare(('21', '6.0', '11'),
543  #                                   (epoch, h[rpm.RPMTAG_VERSION],                                     (epoch, h[rpm.RPMTAG_VERSION],
544  #                                    h[rpm.RPMTAG_RELEASE]))                                      h[rpm.RPMTAG_RELEASE]))
545  #            if val > 0:              if val > 0:
546  #                supportedUpgradeVersion = 0                  supportedUpgradeVersion = 0
547  #            else:              else:
548  #                supportedUpgradeVersion = 1                  supportedUpgradeVersion = 1
549  #                break                  break
550  #  
551  #    if productName.find("Red Hat Enterprise Linux") == -1:      if supportedUpgradeVersion == 0:
552  #        supportedUpgradeVersion = 1          rc = intf.messageWindow(_("Warning"),
553  #                                  _("You appear to be upgrading from a system "
554  #    if supportedUpgradeVersion == 0:                                    "which is too old to upgrade to this "
555  #        rc = intf.messageWindow(_("Warning"),                                    "version of %s.  Are you sure you wish to "
556  #                                _("You appear to be upgrading from a system "                                    "continue the upgrade "
557  #                                  "which is too old to upgrade to this "                                    "process?") %(productName,),
558  #                                  "version of %s.  Are you sure you wish to "                                  type = "yesno")
559  #                                  "continue the upgrade "          if rc == 0:
560  #                                  "process?") %(productName,),              try:
561  #                                type = "yesno")                  resetRpmdb(id.dbpath, instPath)
562  #        if rc == 0:              except Exception, e:
563  #            try:                  log("error returning rpmdb to old state: %s" %(e,))
564  #                resetRpmdb(id.dbpath, instPath)                  pass
565  #            except Exception, e:              sys.exit(0)
566  #                log("error returning rpmdb to old state: %s" %(e,))  
 #                pass  
 #            sys.exit(0)  
 #  
567    
568      # during upgrade, make sure that we only install %lang colored files      # during upgrade, make sure that we only install %lang colored files
569      # 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