From 6675704a3afbc6cdea455e0a6bcbc9dd6ebd8096 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Tue, 15 Sep 2009 13:47:16 -0400 Subject: Remove the installation number screen. Whatever form the new entitlement system takes, it is unlikely it will look like what we've currently got. It's probably better to start over fresh than attempt to adapt what we've got into supporting the new system. This will also allow testing of the RHEL6 tree with the right product name without requiring testers to enter a key. --- dispatch.py | 4 -- gui.py | 10 --- installclass.py | 13 ---- instdata.py | 5 -- kickstart.py | 1 - packages.py | 64 ------------------ text.py | 46 ------------- ui/instkey.glade | 202 ------------------------------------------------------- 8 files changed, 345 deletions(-) delete mode 100644 ui/instkey.glade diff --git a/dispatch.py b/dispatch.py index 7dd2c5409..c4cfa7a16 100644 --- a/dispatch.py +++ b/dispatch.py @@ -30,8 +30,6 @@ from packages import firstbootConfiguration from packages import betaNagScreen from packages import setupTimezone from packages import setFileCons -from packages import regKeyScreen -from packages import writeRegKey from storage import storageInitialize from storage import storageComplete from storage.partitioning import doAutoPartition @@ -71,7 +69,6 @@ installSteps = [ ("language", ), ("keyboard", ), ("betanag", betaNagScreen, ), - ("regkey", regKeyScreen, ), ("storageinit", storageInitialize, ), ("findrootparts", findRootParts, ), ("findinstall", ), @@ -107,7 +104,6 @@ installSteps = [ ("firstboot", firstbootConfiguration, ), ("instbootloader", writeBootloader, ), ("writeksconfig", writeKSConfiguration, ), - ("writeregkey", writeRegKey, ), ("setfilecon", setFileCons, ), ("copylogs", copyAnacondaLogs, ), ("methodcomplete", doMethodComplete, ), diff --git a/gui.py b/gui.py index f4e2bb20b..6eab12b3b 100755 --- a/gui.py +++ b/gui.py @@ -1097,16 +1097,6 @@ class InstallInterface: custom_buttons=[_("_Exit installer")]).getrc() return rc - def getInstallKey(self, key = ""): - d = InstallKeyWindow(self.anaconda, key) - rc = d.run() - if rc in [gtk.RESPONSE_CANCEL, gtk.RESPONSE_DELETE_EVENT]: - ret = None - else: - ret = d.get_key() - d.destroy() - return ret - def getLuksPassphrase(self, passphrase = "", preexist = False): if self.icw: parent = self.icw.window diff --git a/installclass.py b/installclass.py index c16cb0480..7143f6acd 100644 --- a/installclass.py +++ b/installclass.py @@ -51,7 +51,6 @@ class BaseInstallClass(object): showLoginChoice = 0 _description = "" _descriptionFields = () - regkeydesc = None name = "base" pkgstext = "" # default to showing the upgrade option @@ -76,14 +75,6 @@ class BaseInstallClass(object): # we can use a different install data class installDataClass = InstallData - # install key related bits - skipkeytext = None - instkeyname = None - allowinstkeyskip = True - instkeydesc = None - installkey = None - skipkey = False - def _get_description(self): return _(self._description) % self._descriptionFields description = property(_get_description) @@ -128,7 +119,6 @@ class BaseInstallClass(object): "dopostaction", "postscripts", "writeksconfig", - "writeregkey", "methodcomplete", "copylogs", "setfilecon", @@ -174,9 +164,6 @@ class BaseInstallClass(object): return {'base': uri} - def handleRegKey(self, key, intf): - pass - def setPackageSelection(self, anaconda): pass diff --git a/instdata.py b/instdata.py index 220b074ab..405ba4394 100644 --- a/instdata.py +++ b/instdata.py @@ -215,11 +215,6 @@ class InstallData: else: f.write("install\n"); - if self.instClass.skipkey: - f.write("key --skip\n") - elif self.instClass.installkey: - f.write("key %s\n" %(self.instClass.installkey,)) - m = None if self.anaconda.methodstr: diff --git a/kickstart.py b/kickstart.py index 648dcd8e7..79264f1f6 100644 --- a/kickstart.py +++ b/kickstart.py @@ -1432,7 +1432,6 @@ def setSteps(anaconda): dispatch.skipStep("bootdisk") dispatch.skipStep("betanag") - dispatch.skipStep("regkey") dispatch.skipStep("installtype") dispatch.skipStep("network") diff --git a/packages.py b/packages.py index 07fa45f1f..074f753a4 100644 --- a/packages.py +++ b/packages.py @@ -58,13 +58,6 @@ def firstbootConfiguration(anaconda): f.close() return - -def writeRegKey(anaconda): - if anaconda.id.instClass.installkey and os.path.exists(anaconda.rootPath + "/etc/sysconfig/rhn"): - f = open(anaconda.rootPath + "/etc/sysconfig/rhn/install-num", "w+") - f.write("%s\n" %(anaconda.id.instClass.installkey,)) - f.close() - os.chmod(anaconda.rootPath + "/etc/sysconfig/rhn/install-num", 0600) def writeKSConfiguration(anaconda): log.info("Writing autokickstart file") @@ -332,63 +325,6 @@ def recreateInitrd (kernelTag, instRoot): stdout = "/dev/null", stderr = "/dev/null", searchPath = 1, root = instRoot) -def regKeyScreen(anaconda): - def checkRegKey(anaconda, key, quiet=0): - rc = True - try: - anaconda.id.instClass.handleRegKey(key, anaconda.intf, - not anaconda.isKickstart) - except Exception, e: - if not quiet: - log.info("exception handling installation key: %s" %(e,)) - - (type, value, tb) = sys.exc_info() - list = traceback.format_exception(type, value, tb) - for l in list: - log.debug(l) - anaconda.intf.messageWindow(_("Invalid Key"), - _("The key you entered is invalid."), - type="warning") - rc = False - - return rc - - key = anaconda.id.instClass.installkey or "" - - # handle existing key if we're headed forward - if key and not anaconda.id.instClass.skipkey and \ - anaconda.dir == DISPATCH_FORWARD and checkRegKey(anaconda, key): - return DISPATCH_FORWARD - - # if we're backing up we should allow them to reconsider skipping the key - if anaconda.dir == DISPATCH_BACK and anaconda.id.instClass.skipkey: - anaconda.id.instClass.skipkey = False - - while not anaconda.id.instClass.skipkey: - rc = anaconda.intf.getInstallKey(key) - if rc is None and anaconda.dispatch.canGoBack(): - return DISPATCH_BACK - elif rc is None: - continue - elif rc == SKIP_KEY: - if anaconda.id.instClass.skipkeytext: - rc = anaconda.intf.messageWindow(_("Skip"), - _(anaconda.id.instClass.skipkeytext), - type="custom", custom_icon="question", - custom_buttons=[_("_Back"), _("_Skip")]) - if not rc: - continue - # unset the key and associated data - checkRegKey(anaconda, None, quiet=1) - anaconda.id.instClass.skipkey = True - break - - key = rc - if checkRegKey(anaconda, key): - break - - return DISPATCH_FORWARD - def betaNagScreen(anaconda): publicBetas = { "Red Hat Linux": "Red Hat Linux Public Beta", "Red Hat Enterprise Linux": "Red Hat Enterprise Linux Public Beta", diff --git a/text.py b/text.py index 1d6db0fdc..f2a1c6972 100644 --- a/text.py +++ b/text.py @@ -341,52 +341,6 @@ class InstallInterface: ret = w.run() return ret != INSTALL_BACK - def getInstallKey(self, key = ""): - ic = self.anaconda.id.instClass - keyname = _(ic.instkeyname) - if keyname is None: - keyname = _("Installation Key") - - g = GridFormHelp(self.screen, keyname, "instkey", 1, 6) - - txt = TextboxReflowed(65, ic.instkeydesc or - _("Please enter your %(instkey)s") % - {"instkey": keyname,}) - g.add(txt, 0, 0, (0,0,0,1)) - - - radio = RadioGroup() - keyradio = radio.add(keyname, "key", int(not self.anaconda.id.instClass.skipkey)) - keyentry = Entry(24) - keyentry.set(key) - - sg = Grid(3, 1) - sg.setField(keyradio, 0, 0) - sg.setField(Label(" "), 1, 0) - sg.setField(keyentry, 2, 0, (1,0,0,0)) - g.add(sg, 0, 1) - - if ic.allowinstkeyskip: - skipradio = radio.add(_("Skip entering %(instkey)s") % - {"instkey": keyname}, "skip", - int(self.anaconda.id.instClass.skipkey)) - g.add(skipradio, 0, 2) - - bb = ButtonBar(self.screen, [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ]) - g.add(bb, 0, 5, (0,1,0,0)) - rc = g.run() - res = bb.buttonPressed(rc) - if res == TEXT_BACK_CHECK: - self.screen.popWindow() - return None - if radio.getSelection() == "skip": - self.screen.popWindow() - return SKIP_KEY - key = keyentry.value() - self.screen.popWindow() - return key - - def kickstartErrorWindow(self, text): s = _("The following error was found while parsing the " "kickstart configuration file:\n\n%s") %(text,) diff --git a/ui/instkey.glade b/ui/instkey.glade deleted file mode 100644 index eb508d77d..000000000 --- a/ui/instkey.glade +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - 12 - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER - False - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 6 - - - - True - GTK_BUTTONBOX_END - - - - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - 1 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - Please enter your %(instkey)s. - False - False - GTK_JUSTIFY_LEFT - True - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 5 - False - False - - - - - - True - 2 - 2 - False - 6 - 6 - - - - True - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - True - %(instkey)s: - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - True - GTK_RELIEF_NORMAL - True - False - False - True - keyRadio - - - - True - Skip entering %(instkey)s - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - 0 - 2 - 1 - 2 - fill - - - - - - - True - True - True - True - 0 - - True - - False - 24 - - - 1 - 2 - 0 - 1 - - - - - - 0 - True - False - - - - - - - -- cgit