[PATCH] Add support to dnfpayload.py for addon NFS repos.
Vratislav Podzimek
vpodzime at redhat.com
Thu May 14 06:52:44 UTC 2015
On Wed, 2015-05-13 at 13:40 -0400, Chris Lumens wrote:
> We need to handle the mounting before dnf gets involved, and then pass
> it baseurl=file://, since it doesn't understand NFS. This is just a
> port of the same code over from yuminstall.py.
> ---
> pyanaconda/packaging/dnfpayload.py | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
> index 4324a53..a14725e 100644
> --- a/pyanaconda/packaging/dnfpayload.py
> +++ b/pyanaconda/packaging/dnfpayload.py
> @@ -222,6 +222,14 @@ class DNFPayload(packaging.PackagePayload):
> repo = dnf.repo.Repo(ksrepo.name, DNF_CACHE_DIR)
> url = self._replace_vars(ksrepo.baseurl)
> mirrorlist = self._replace_vars(ksrepo.mirrorlist)
> +
> + if url and url.startswith("nfs://"):
> + (server, path) = url[6:].split(":", 1)
> + mountpoint = "%s/%s.nfs" % (constants.MOUNT_DIR, repo.name)
> + self._setupNFS(mountpoint, server, path, None)
> +
> + url = "file://" + mountpoint
> +
> if url:
> repo.baseurl = [url]
> if mirrorlist:
ACK.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list