I'm not sure I understand your question.

> Assuming I have my own test repository running on 127.0.0.1:1000.  
> Assuming there is my own package MyPackage on it, which is supposed to  
> be installed into /usr/mypackage. If I create an image myself (with  
> "pkg image-create") I am able to install the package with "pkg install".
> 
> The question then is:
> 
> How do I install a package in the /usr/mypackage dir of my system?

Are you asking how to install a package into an alternate root
directory?   Or, are you stating that MyPackage have an incorrect
specification of its paths and asking how to change this?

> How do I add another "authority" (per pkg man page) to an existing  
> image?

An authority is a repository.  Clients generally download packages from
the preferred-authority, but may specify additional repositories.

If your primary authority isn't localhost and already exists, you could
create one for your repo by adding the following to
$PKG_IMAGE/var/pkg/cfg_cache.

[authority_localauth]
origin = http://localhost:10000
prefix = localauth
mirrors = None

Note that if you want to change the preferred-authority, you'll also
need to edit the [policy] section of cfg_cache, too.

As Danek observed, make sure you refresh your catalog once you've added
another authority.  Once you have the catalog from the new authority you
should be able to install its packages.  If both authorities have
packages with the same name, you'll need to specify the authority in the
FMRI.   This is required so that the client can find the correct package
to install.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to