On 08/26/10 09:06 PM, Darren Reed wrote:
In trying to create a my own package on a private depot, I've followed
the instructions in the man page for pkgsend which start with:
$ eval `pkgsend open [email protected]`
ok, it was obvious that wasn't going to work because there was nothing
in that statement that told pkgsend how to connect to my depotd (and in
trying it, no it didn't work), so I added the complimentary "-s
http://server:port" and then ran into this error:
pkgsend: 'open' failed for transaction ID 'None': http protocol error:
code: 400 reason: Bad Request
URL: ...
Additional Details:
The specified FMRI, '[email protected]', must include the publisher
prefix as the repository contains package data for more than one
publisher or a default publisher has not been defined.
What is the "publisher prefix"?
That's explained in the pkg(5) man page.
I'm even more confused by the "Additional Details" as the repository
contains no package data (I've only just started pkg.depotd -d
/directory -p port) to a previously empty /directory.
In order to address the "default publisher" bit of the message above, I
tried starting pkg.depotd with a small configuration file (pkg.depot
--cfg /tmp/depot.cfg):
[pkg]
port = 8081
inst_root = /tmp/depot
default_publisher = darrenr
but that did not cause the above error to stop being produced.
And it wouldn't; that's depot configuration, not repository configuration.
If you want to set the default publisher for the *repository*, you would
do this:
$ pkgrepo -s path_or_uri_to_repo set publisher/prefix=darrenr
...and yes, the pkgrepo man page needs to be expanded; there's already
an RFE for that.
With an additional bit of playing, it seems like what's required is this:
pkgsend -s http://server:port open pkg://darrenr/[email protected]
and that made sense. What I was looking for was how to specify only the
publisher (as part of the FMRI) when what I needed to do was give it a
full FMRI. If I try to just add the publisher
(darrenr/[email protected]), it fails so the error message should
mention that I need to provide a full pkg FMRI rather than just the
"publisher prefix".
Again, see pkg(5) for an explanation of package FMRIs, etc.
More information that I could easily see as being useful on the pkgsend
man page is:
* that without using "-s ..." it requires a local pkg.depotd to be
running on port 10000 as provided by svc:/application/pkg/server.
That's already in the man page; see the notes under the -s option.
* Some sort of reference to svc:...pkg/server on pkgsend's man page
seems sensible. Does make sense for pkgsend to check the state of this
service if -s is missing and fail with a more meaningful error?
No. pkgsend does not depend or know about the service. Nor should it
be checking for it.
* if it is possible to just add the publisher prefix without giving a
full fmri, please mention how that should be done as none of the CLI
options or examples illustrate this
Feel free to file RFEs, but I would note that the pkg(5) man page
explains what a publisher prefix is and what FMRIs are and that
pkgsend(1) says to see also pkg(5).
I'd rather not duplicate the material in pkg(5) in other man pages.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss