[PATCH 2/2] Don't disable anaconda repo on rawhide
Vratislav Podzimek
vpodzime at redhat.com
Tue Mar 11 07:25:56 UTC 2014
On Mon, 2014-03-10 at 16:30 -0700, Brian C. Lane wrote:
> The anaconda (BASE_REPO_NAME) repo will be added when the user enters a
> repo url manually. Use it instead of the default rawhide mirror repo.
> But both it and the rawhide repo were being disabled (rawhide disabled
> anaconda, and anaconda with method disabled rawhide).
>
> Also add some better logging to describe what repos are being used.
> ---
> pyanaconda/packaging/yumpayload.py | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
> index b864f12..6f61878 100644
> --- a/pyanaconda/packaging/yumpayload.py
> +++ b/pyanaconda/packaging/yumpayload.py
> @@ -512,6 +512,7 @@ reposdir=%s
> self.disableRepo(repo.id)
> return
>
> +
No extra blank line needed.
> # see if we can get a usable base repo from self.data.method
> if method.method:
> try:
> @@ -587,6 +588,7 @@ reposdir=%s
> elif self._yum.conf.yumvar['releasever'] == "rawhide" and \
> "rawhide" in self.repos and \
> self._yum.repos.getRepo("rawhide").enabled and \
> + repo.id != BASE_REPO_NAME and \
> repo.id != "rawhide":
What about 'repo.id not in (BASE_REPO_NAME, "rawhide")' ?
> self.disableRepo(repo.id)
> elif method.method and \
> @@ -604,11 +606,14 @@ reposdir=%s
> repo = self._yum.repos.getRepo(repo_id)
> if repo.enabled:
> try:
> + log.info("gathering repo metadata for %s", repo_id)
> self._getRepoMetadata(repo)
> except PayloadError as e:
> log.error("failed to grab repo metadata for %s: %s",
> repo_id, e)
> self.disableRepo(repo_id)
> + else:
> + log.info("skipping disabled repo %s", repo_id)
>
> # Make sure environmentAddon information is current
> self._refreshEnvironmentAddons()
Otherwise this and the other patch from this set both look good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list