If not given, anaconda will assume the repo listed is one of the ones in /etc/yum.repos.d that are disabled by default. --- pykickstart/commands/repo.py | 12 +++++++++++- pykickstart/handlers/control.py | 4 ++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pykickstart/commands/repo.py b/pykickstart/commands/repo.py index 2d67187..543ef94 100644 --- a/pykickstart/commands/repo.py +++ b/pykickstart/commands/repo.py @@ -125,10 +125,14 @@ class F14_RepoData(F13_RepoData): RHEL6_RepoData = F14_RepoData +F15_RepoData = F14_RepoData + class FC6_Repo(KickstartCommand): removedKeywords = KickstartCommand.removedKeywords removedAttrs = KickstartCommand.removedAttrs + urlRequired = True + def __init__(self, writePriority=0, *args, **kwargs): KickstartCommand.__init__(self, writePriority, *args, **kwargs) self.op = self._getParser() @@ -161,7 +165,7 @@ class FC6_Repo(KickstartCommand): if opts.baseurl and opts.mirrorlist: raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("Only one of --baseurl and --mirrorlist may be specified for repo command.")) - if not opts.baseurl and not opts.mirrorlist: + if self.urlRequired and not opts.baseurl and not opts.mirrorlist: raise KickstartValueError, formatErrorMsg(self.lineno, msg=_("One of --baseurl or --mirrorlist must be specified for repo command.")) rd = self.handler.RepoData() @@ -237,3 +241,9 @@ class F14_Repo(F13_Repo): return op RHEL6_Repo = F14_Repo + +class F15_Repo(F14_Repo): + removedKeywords = F14_Repo.removedKeywords + removedAttrs = F14_Repo.removedAttrs + + urlRequired = False diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py index 2228216..4e63bca 100644 --- a/pykickstart/handlers/control.py +++ b/pykickstart/handlers/control.py @@ -742,7 +742,7 @@ commandMap = { "poweroff": reboot.FC6_Reboot, "raid": raid.F14_Raid, "reboot": reboot.FC6_Reboot, - "repo": repo.F14_Repo, + "repo": repo.F15_Repo, "rescue": rescue.F10_Rescue, "rootpw": rootpw.F8_RootPw, "selinux": selinux.FC3_SELinux, @@ -1170,7 +1170,7 @@ dataMap = { "NetworkData": network.F8_NetworkData, "PartData": partition.F14_PartData, "RaidData": raid.F14_RaidData, - "RepoData": repo.F14_RepoData, + "RepoData": repo.F15_RepoData, "SshPwData": sshpw.F13_SshPwData, "UserData": user.F12_UserData, "VolGroupData": volgroup.FC3_VolGroupData, -- 1.7.1.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list