pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to install package in different directory prefix

On Thu, 30 Dec 2010 05:39:11 +0000
"Thomas Mueller" <> wrote:

> How, using pkgsrc or otherwise, would I setup to install a package in
> a different directory prefix, other than /usr, /usr/pkg,
> or /usr/local, and then how would I tell pkgsrc and gcc to recognize
> those installed libraries and includes if such an installed package
> becomes a dependency of something else I want to install?  I could
> have a prefix like /usr/local2 or /usr/testing and still have access
> to the base system and other installed packages.
> I might want to install something in an experimental directory prefix
> to be able to access it but without burning bridges on an established
> installation.  I could modify the path and library and include search
> paths for a special session but be able to subsequently return to
> normal setup.
> I might want to do this with an alpha or beta prerelease of something
> like Firefox 4 or Seamonkey 2.1, for instance.
> Tom

It seems to me what you're suggesting is creating a second /usr/pkg2
directory and somehow getting pkgsrc to cope with two different package
directories simultaneously. I think this would get pretty messy.

If you want to install a newer version of a package, simply
save binary package, pkg_delete the old version and pkg_add new
version. If you want to go back to older version, reinstall saved
binary package.

Another option is to replace the entire /usr/pkg directory. This is
better if you want to test many new packages. For example you could
update your pkgsrc tree and rebuild all package.

First, build packages inside chroot, this way it will not interfere
with currently installed packaged.

Second, set the following variables when building and installing

LOCALBASE=      /usr/pkg
PKG_DBDIR=      ${LOCALBASE}/db/pkg

When you want to rebuild all your packages to newer versions, but still
keep the old packages:

mv /usr/pkg /usr/pkg.old

and then add new packages.

Home | Main Index | Thread Index | Old Index