On 02/24/13 02:37 PM, Tim Foster wrote:
On 02/23/13 02:33 PM, Erik Trauschke wrote:
This is a quick fix to change the default behavior of pkgrecv which
currently just syncs the latest packages.
It introduces a "-m latest" option to achieve the current default
behavior.
https://cr.opensolaris.org/action/browse/pkg/erisch/14851733/webrev/
Can you explain the intent of the bugfix?
At the moment the default behavior is "latest" even though there is no
such pattern for -m at this time. This is usually not what people want
if they run pkgrecv. Usually they want to copy the whole repo.
The more confusing issue is why I stumbled across this bug and decided
to give it a go. If you run the following:
pkgrecv -s source -d dest pkg@1.0 pkg@2.0 pkg@3.0
you'd expect it would sync all three packages since you explicitly
specified them. But pkgrecv will only sync pkg@3.0. If you want to sync
all three you'd have to specify -m all-timestamps (or in this case
all-versions would be sufficient)
So changing the default behavior makes pkgrecv more intuitive.
It seems to me, that this really helps if the packages being updated to
have dependencies specified very exactly; right down to the timestamp in
the FMRI.. I'm not sure if we ever specify dependencies this way -
pkgdepend doesn't seem to generate them, and I'm unaware of any build
systems that have manually introduced dependencies like this.
I'm not opposed to the change, but do I wonder if the user should
instead be using -r, that is, the problem isn't actually about
dependencies specified right down to the timestamp at all, but simply
that older versions of packages aren't being copied.
If the aim is to just pkgrecv enough of the repository to be able
install a given package and its dependencies, then -m all-timestamps
seems like overkill.
Perhaps I'm missing something? I was thinking that maybe this is for
stepping-stone builds, like S11 SRU 10, but in that case, I'd expect that,
pkgrecv -s <uri> -d <local> -r \
entire@0.175.0.10.0.5.0 entire@0.5.11,5.11-0.175.1.0.0.24.2
would still get me what I need?
I'm kinda failing to see the connection between my change and a change
in how the dependencies are treated. This has nothing to do with the
stepping-stone build extraction we were talking about several times.
This is just a change in the default behavior.
Erik
cheers,
tim
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss