[Yum] Using YUM as non-root user
Seth Vidal
skvidal at fedoraproject.org
Tue Jun 30 16:33:55 UTC 2009
On Mon, 29 Jun 2009, Michael Lasevich wrote:
> Ok, after messing a bit with the yum command-line (mostly altering the
> yum.conf config file and adding some code having to do with include paths -
> which is probably configurable via env variables) I actually get it to run
> fine as a regular user. It sees the repo in MY config, it sees the custom RPM
> DB contents as per .rpmmacros file, and even fetches the rpm from repo, but I
> run into a wall when it tries to install the rpm.
>
> The issue is that when I install it manually I have to specify prefix (rpm
> --prefix /mypath -Uhv), but yum is not specifying it, so it tries to install
> to /bin instead of /mypath/bin, and obviously fails with "error: unpacking of
> archive failed on file /bin/myfile;4a495646: cpio: mkdir" . Now, I tried
> using installroot option, which SEEMS like the right thing, but is not. It
> changed the locations of many paths in many places including default paths to
> config files, and paths in .rpmmacros, (which is unfortunate as rpm itself
> does not see the installroot parameter) but in the end, it is still
> installing into /bin instead of /mypath/bin.
>
> So I assume I need to find where yum makes an API call to rpm libs and pass
> prefix to it, but I cannot seem to find that place in the yum code. Can
> someone point me to the right place to find it?
>
okay - AIUI - relocations only work when the pkg is built to allow itself
to be relocated.
If you want to install it in another path - then that's changing the
installroot which you can currently do in yum.
-sv
More information about the Yum
mailing list