Bug 2253 - With the latest build of the pkg repo, can't install packages from additional authorities
: With the latest build of the pkg repo, can't install packages from additional...
Status: RESOLVED FIXINSOURCE
Product: pkg
cli
: unspecified
: Other Solaris
: P1 critical (vote)
: in94
Assigned To: Danek Duvall
: pkg/cli watcher
:
:
:
:
: pkg-blocker-2008-11
  Show dependency treegraph
 
Reported: 2008-06-16 15:01 UTC by Glenn Lagasse
Modified: 2008-07-17 11:17 UTC (History)
7 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Glenn Lagasse 2008-06-16 15:01:20 UTC
Building the pkg repo and then installing the resultant pkg package results in
not being able to install packages from additional authorities.

For instance, with a /var/pkg/cfg_cache configured thusly:

[policy]
require-optional = False
display-copyrights = True
preferred-authority = opensolaris.org
pursue-latest = True

[filter]

[authority_opensolaris.org]
origin = http://osol-re.sfbay:80/
ssl_key = None
prefix = opensolaris.org
ssl_cert = None
mirrors = []

[authority_punchin]
origin = http://righthook.east.sun.com:10000/
ssl_key = None
prefix = punchin
ssl_cert = None
mirrors = []

I am unable to install any packages contained in the punchin authority.  While
pkg list -a shows the packages, pkg install of those packages gives:

pkg: no package matching 'SUNW0punchin' could be found in 
current catalog suggest relaxing pattern, refreshing and/or 
examining catalogs

No amount of refreshing the pkg catalog helps.  Installing an older version of
the pkg command (something built on May 27th or thereabouts) does not exhibit
this problem.

Looking vat /var/pkg/catalog/punchin/catalog I can see the packages as well.

cat /export/home/glagasse/proto/var/pkg/catalog/punchin/catalog
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T182710Z
V pkg OPGpunchin 1.2.0,5.11-1:20080604T182744Z
V pkg ITpunchin 1.2.0,5.11-1:20080604T182746Z
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T182750Z
V pkg OPGpunchin 1.2.0,5.11-1:20080604T182850Z
V pkg ITpunchin 1.2.0,5.11-1:20080604T182852Z
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T182855Z
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T184121Z
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T184252Z
V pkg SUNW0punchin 2.2.0,5.11-1:20080604T190303Z
Comment 1 Shawn Walker 2008-06-16 18:00:55 UTC
This looks to be related to the change made for bug 2230. The test_basics_1
(cli.t_twodepot.TestTwoDepots) test fails when using a version of pkg where the
fix for bug 2230 has been applied. Once I remove the change for 2230, it
succeeds.
Comment 2 Bart Smaalders 2008-06-17 11:36:01 UTC
Did you try specifying the pkg authority as part of the install command?

eg 

pkg install pkg://punchin/SUNW0punchin
Comment 3 Glenn Lagasse 2008-06-17 11:39:32 UTC
No, I didn't try specifying the authority to the install command.

Should I have to?  If so, that would be a change from previous behaviour.
Comment 4 Shawn Walker 2008-06-17 20:48:51 UTC
(In reply to comment #3)
> No, I didn't try specifying the authority to the install command.
> 
> Should I have to?  If so, that would be a change from previous behaviour.

Would you be kind enough to try it out and report back the results? Thanks.
Comment 5 Glenn Lagasse 2008-06-18 15:25:17 UTC
specifying the authority name does indeed allow the package to install.

I used:

pkg -R /export/home/glagasse/foo install pkg://punchin/SUNW0punchin

This isn't expected behavior though is it?
Comment 6 Shawn Walker 2008-06-18 15:28:56 UTC
(In reply to comment #5)
> specifying the authority name does indeed allow the package to install.
> 
> I used:
> 
> pkg -R /export/home/glagasse/foo install pkg://punchin/SUNW0punchin
> 
> This isn't expected behavior though is it?

I'm not certain -- Bart is better suited to answer that question.

*However*, since your preferred authority is opensolaris.org, not punchin, what
do you expect as a user if you ask for a package that isn't available from your
preferred authority?

Should it try each of your available authorities until it succeeds?

What if it is available from multiple authorities?
Comment 7 Glenn Lagasse 2008-06-18 15:36:10 UTC
Yes, I'd expect it to search all of my available repositories.  As for handling
the case where it's available from multiple authorities, it should 'figure it
out' and 'do the right thing'.  Now, what that right thing is is a good
question.  If it can't figure it out on it's own, then display a message to
that affect and tell me what it found and how I can specify explicitly what I
want based on what it found.  Naturally, if it finds a match in my preferred
authority then there isn't much left to do as I would expect it to be installed
from there.
Comment 8 Bart Smaalders 2008-06-18 17:07:51 UTC
Indeed, we want to get to the "do the right thing" stage.

Right now, however, the design for handling packages from different authorities
is rather different than the implementation.... It appears we may have a
regression
in behavior w/ multiple repos for a bit while we get some underlying code
fixed.
Comment 9 Danek Duvall 2008-06-27 14:32:32 UTC
johansen suggests that bug 2325 and bug 2347 could be closed as dups of this
one, but while those two share a stack trace in common with bug 2229; namely,
that the package it's complaining about isn't a full package fmri, but is
missing the timestamp.  This bug doesn't have such a stack trace, though there
might be one associated with it.  If so, please 'fess up.
Comment 10 Danek Duvall 2008-06-27 20:36:22 UTC
I'll note that bugs 2325 and 2347 both have a build version component of the
version, while bug 2229 didn't, so that's likely a different problem, indeed.

This bug also has more to do with installing packages from alternate
authorities on the commandline -- that if a package isn't found in the
preferred authority, it should be pulled from another one automatically, rather
than having to specify an authority (in fact, doing that does work).  So I'd
say that 2325 and 2347, while possibly dups of each other, are probably not
dups of this bug.
Comment 11 Danek Duvall 2008-06-27 20:40:11 UTC
Or maybe it's just that we're hitting the same problem through two different
codepaths, one of which results in a stack trace, the other we're handling a
bit more sanely.
Comment 12 Danek Duvall 2008-07-09 21:25:29 UTC
*** Bug 2392 has been marked as a duplicate of this bug. ***
Comment 13 Dan Price 2008-07-10 18:41:08 UTC
Resetting target to Build 94.  Marking FIP as I know Bart is working on this.
Comment 14 Danek Duvall 2008-07-15 22:22:33 UTC
*** Bug 2325 has been marked as a duplicate of this bug. ***
Comment 15 Danek Duvall 2008-07-15 22:23:44 UTC
*** Bug 2347 has been marked as a duplicate of this bug. ***
Comment 16 Danek Duvall 2008-07-17 11:17:20 UTC
Fixed in changeset 5c756997bf679d4c20152406180122e722332237.