On 10/22/12 11:12, Tim Foster wrote:
On 10/22/12 06:38 PM, Shawn Walker wrote:
On 10/15/12 06:30, Tim Foster wrote:
https://cr.opensolaris.org/action/browse/pkg/timf/salvage-to-existing-dir/salvage-to-existing-dir-webrev/
With this change, every time a user executes 'pkg fix' there's the
potential that this salvage logic could be triggered. Is that ok?
I've been trying to work out how we'd get into this situation, and have
experimented a bit, but haven't had any success at reproducing it.
A "pkg fix" does seem to allow action removal (at least based on my
reading of pkg.client.pkgplan.PkgPlan.propose_repair(..), but attempts
at creating an unpackaged 'salvage-from' directory, storing unpackaged
files there, then intentionally breaking the dir action that contains
that salvage-from attribute and running a "pkg fix" just leave that
unpackaged content untouched.
We need to somehow cause the salvage-from directory to be packaged, and
to get removed as part of the 'fix' operation to reproduce this. In any
case though, salvaging in that scenario still seems like the right thing
to do, saving whatever content we found there, and moving it to where it
belongs.
I wasn't suggesting it was wrong if it happened, just asking if it was
ok if it did.
Otherwise, +1.
Ok, thanks for taking a look - if anyone can suggest a way I could test
this scenario, I'd be happy to look into it.
No, because I failed to remember that the salvage logic relies on
something becoming unpackaged.
I was just concerned that it might not be ok if this runs every time
install() is executed, which currently includes 'pkg fix'. But if you
can't think of a way for it to be triggered or if it's ok if it is, then
drive on...
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss