--- cli.py | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cli.py b/cli.py index 0accd35..006fe71 100644 --- a/cli.py +++ b/cli.py @@ -1396,6 +1396,7 @@ class YumOptionParser(OptionParser): self.base.conf.obsoletes = 1 if opts.installroot: + self._setupAbsInstallRoot(opts) self.base.conf.installroot = opts.installroot if opts.skipbroken: @@ -1475,7 +1476,16 @@ class YumOptionParser(OptionParser): return opts, cmds + def _setupAbsInstallRoot(self, opts): + if not opts.installroot: + return + if opts.installroot[0] == '/': + return + # We have a relative installroot ... haha + opts.installroot = os.path.realpath(opts.installroot) + def getRoot(self,opts): + self._setupAbsInstallRoot(opts) # If the conf file is inside the installroot - use that. # otherwise look for it in the normal root if opts.installroot: -- 1.7.2.3 _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel