/[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.3 by slords, Sun Jul 31 16:24:58 2005 UTC
# Line 49  def findRootParts(intf, id, dispatch, di Line 49  def findRootParts(intf, id, dispatch, di
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:
# Line 387  def upgradeFindPackages(intf, method, id Line 390  def upgradeFindPackages(intf, method, id
390              try:              try:
391                  os.unlink("%s/var/lib/rpm/%s" %(instPath, file))                  os.unlink("%s/var/lib/rpm/%s" %(instPath, file))
392              except:              except:
393                  log("failed to unlink /var/lib/rpm/%s" %(file,))                  pass
394    #                log("failed to unlink /var/lib/rpm/%s" %(file,))
395    
396          packages = findpackageset.findpackageset(id.grpset.hdrlist.hdlist,          packages = findpackageset.findpackageset(id.grpset.hdrlist.hdlist,
397                                                   instPath)                                                   instPath)
# Line 515  def upgradeFindPackages(intf, method, id Line 519  def upgradeFindPackages(intf, method, id
519                  pass                  pass
520              sys.exit(0)              sys.exit(0)
521    
522  #    # Figure out current version for upgrade nag and for determining weird      # Figure out current version for upgrade nag and for determining weird
523  #    # upgrade cases      # upgrade cases
524  #    supportedUpgradeVersion = -1      supportedUpgradeVersion = -1
525  #    mi = ts.dbMatch('provides', 'redhat-release')      mi = ts.dbMatch('provides', 'e-smith-release')
526  #    for h in mi:      for h in mi:
527  #        if h[rpm.RPMTAG_EPOCH] is None:          if h[rpm.RPMTAG_EPOCH] is None:
528  #            epoch = None              epoch = None
529  #        else:          else:
530  #            epoch = str(h[rpm.RPMTAG_EPOCH])              epoch = str(h[rpm.RPMTAG_EPOCH])
531  #  
532  #        if supportedUpgradeVersion <= 0:          if supportedUpgradeVersion <= 0:
533  #            val = rpm.labelCompare((None, '3', '1'),              val = rpm.labelCompare(('21', '6.0', '11'),
534  #                                   (epoch, h[rpm.RPMTAG_VERSION],                                     (epoch, h[rpm.RPMTAG_VERSION],
535  #                                    h[rpm.RPMTAG_RELEASE]))                                      h[rpm.RPMTAG_RELEASE]))
536  #            if val > 0:              log("epoch: %s, version: %s, release: %s, val: %s", h[rpm.RPMTAG_EPOCH], h[rpm.RPMTAG_VERSION], h[rpm.RPMTAG_RELEASE], val)
537  #                supportedUpgradeVersion = 0              if val > 0:
538  #            else:                  supportedUpgradeVersion = 0
539  #                supportedUpgradeVersion = 1              else:
540  #                break                  supportedUpgradeVersion = 1
541  #                  break
542  #    if productName.find("Red Hat Enterprise Linux") == -1:  
543  #        supportedUpgradeVersion = 1      if supportedUpgradeVersion == 0:
544  #          rc = intf.messageWindow(_("Warning"),
545  #    if supportedUpgradeVersion == 0:                                  _("You appear to be upgrading from a system "
546  #        rc = intf.messageWindow(_("Warning"),                                    "which is too old to upgrade to this "
547  #                                _("You appear to be upgrading from a system "                                    "version of %s.  Are you sure you wish to "
548  #                                  "which is too old to upgrade to this "                                    "continue the upgrade "
549  #                                  "version of %s.  Are you sure you wish to "                                    "process?") %(productName,),
550  #                                  "continue the upgrade "                                  type = "yesno")
551  #                                  "process?") %(productName,),          if rc == 0:
552  #                                type = "yesno")              try:
553  #        if rc == 0:                  resetRpmdb(id.dbpath, instPath)
554  #            try:              except Exception, e:
555  #                resetRpmdb(id.dbpath, instPath)                  log("error returning rpmdb to old state: %s" %(e,))
556  #            except Exception, e:                  pass
557  #                log("error returning rpmdb to old state: %s" %(e,))              sys.exit(0)
558  #                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.


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