[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] pykickstart, pungi: Allow ignoring of group metadata from repos



> @@ -146,3 +161,27 @@ class F8_Repo(FC6_Repo):
>          rd = self.handler.RepoData(name=reponame, baseurl=repourl)
>          self.add(rd)
>  
> +class F11_Repo(F8_Repo):
> +    removedKeywords = F8_Repo.removedKeywords
> +    removedAttrs = F8_Repo.removedAttrs
> +
> +    def __str__(self):
> +        retval = ""
> +        for repo in self.repoList:
> +            retval += repo.__str__()
> +
> +        return retval
> +
> +    def _getParser(self):
> +        op = F8_Repo._getParser(self)
> +        op.add_option("--ignoregroups", action="store", type="ksboolean")
> +        return op
> +
> +    def methodToRepo(self):
> +        if not self.handler.method.url:
> +            raise KickstartError, formatErrorMsg(self.handler.method.lineno, msg=_("Method must be a url to be added to the repo list."))
> +        reponame = "ks-method-url"
> +        repourl = self.handler.method.url
> +        rd = self.handler.RepoData(name=reponame, baseurl=repourl)
> +        self.add(rd)
> +

You shouldn't need __str__ or methodToRepo in F11_Repo, since they
should all be inherited.  I should probably remove __str__ from F8_Repo
as well since it's in FC6_Repo.  Other than that, looks fine.  If you've
got commit access to pykickstart, go ahead and commit.  You can also try
running make check in the pykickstart tree after committing but before
pushing, just to make sure.

- Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]