Bugzilla – Bug 5294
pkgsend doesn't provide server response when operations fail
Last modified: 2009-02-13 12:09:16 UTC
You need to log in before you can comment on or make changes to this bug.
I downloaded source (with hg) on 19 Nov. 2008 and compiled the the pkg utilities on snv79b: SUNWipkg, SUNWipkg-gui-data, SUNWpython-cherrypy, SUNWipkg-brand, SUNWipkg-gui-l10n, SUNWpython-pyopenssl, SUNWipkg-gui, SUNWipkg-um. Then I configured and started the package manager daemon, pkg.depotd (service pkg/server), and added SVR4 packages with pkgsend. This all worked fine except for packages with letters in the version string (e.g., 3.10a). pkgsend failed with a message "open failed (status 400)". The error message should state the version number is invalid and the docs should state that letters can't be in version strings. Here's what happened: $ eval `pkgsend open xv-png@3.10a-1` $ pkgsend import 'xv-3.10a-png-i86pc-solaris5.8' $ pkgsend close pkg:/nslint@2.0.2,5.11-1:20081120T193039Z + pkgsend open xv-png@3.10a-1 pkgsend: open failed (status 400) + eval + pkgsend import xv-3.10a-png-i86pc-solaris5.8 pkgsend: import failed (status 404): Not Found + pkgsend close Failed with 404 When I removed the "a" from "3.10a" and retried pkgsend and it worked OK. I filed this as CR 6774394, but was told to file it here instead.
Missed 2008.11. Set milestone to 2009.04.
It's easy to be even more invalid than Dan's example. I tried the literal command: $ pkgsend -s http://localhost:12000 open foo pkgsend: open failed (status 400) and was perplexed by the resulting status 400. A more useful error message about invalid or missing versions would be most helpful.
Here's another confusing pkgsend error message. If the pkg.depotd server is readonly, it gives error 404: pkgsend open DRYDOGntp@4.2.4` pkgsend: open failed (status 404) *** Error code 1 make: Fatal error: Command failed for target `pkgsend' This message could also be improved. After making the server writable with svccfg -s application/pkg/server setprop pkg/readonly = false the error goes away. But the error message is still terrible. Also pkgsend should allow letters in version strings--it's quite common.
(In reply to comment #3) > Also pkgsend should allow letters in version strings--it's quite common. That isn't a restriction of pkgsend; that's a restriction of the design of pkg(5). You can really only do same version comparisons on numeric strings. If you allow alphabetic characters, then you start having to invent special rules about how the comparisons work. There are no plans to allow this. The version of the package doesn't have to match the version of the software, and probably shouldn't, since packages will often be updated more often than the software they deliver.
(In reply to comment #4) > pkg(5). You can really only do same version comparisons on numeric strings. Sigh. That should have been "sane" not "same."
pkgsend just needs to catch/retrieve any version errors and gracefully handle them.
Now displays this: pkgsend -s http://localhost:12001 open foo@1.a pkgsend: 'open' failed for transaction ID 'None'; status '404': Illegal FMRI 'foo@1.a': Bad Version: 1.a
*** Bug 3058 has been marked as a duplicate of this bug. ***
Fixed in changeset 873 / b95d76c53b5eeece7335982e3ccf7047770decc4.