Call for comments - pkg_trans

Ivan Voras ivoras at freebsd.org
Fri Aug 1 15:28:04 UTC 2008


Doug Barton wrote:
> Ivan Voras wrote:
>> 2008/7/31 Doug Barton <dougb at freebsd.org>:
>>
>>> As I'm sure you can imagine, I would not regard any solution that
>>> says "portupgrade is mandatory" very favorably, and I don't think
>>> I'd be alone there. What you need to be doing here is to define
>>> the API so that whatever tool(s) the user chooses can interact
>>> with the system.
>>
>> No, portupgrade isn't mandatory, and it probably never will be
>> because of ruby. It's only the most widely used and I think that
>> any scheme that adds or changes to the behaviour of the ports
>> infrastructure must also include portupgrade to be useful to the
>> most users.
> 
> At first glance these two statements seem contradictory, but I think
> what you meant in the second sentence is that for the new system to
> work portupgrade has to have support for it before it is rolled out.

Yes :)

> If so, then I agree with you and would only add that authors of other
> ports management tools should be given adequate notice of the plans as
> well.

Agreed. I suppose such authors read this list so will have plenty of 
time to catch up :)

>> Note that, if I implement pkg_trans, any tool that doesn't know
>> about it will, at best, generate useless single-package
>> transactions (and at worst break the system, but I'll try hard to
>> avoid this).
> 
> Thus my concern. :)
> 
>>> BTW, I thought of another problem scenario. The user installs
>>> port M, and it brings dependencies D1, D2, and D3. Then the user
>>> installs port N which also has port D2 as a dependency.
>>
>> Port N then won't install D2 as it already exists.
> 
> Right, but D2 is still part of the transaction for N. If I roll back M
> but leave N installed, then roll back N, D2 should be removed
> (assuming for this example that D2 is not relevant to any other port).
>> The user can rollback [N], then rollback [M+D1+D2+D3]. Trying to
>> roll back back [M+D1+D2+D3] before [N] will show the user a message
>> about dependencies.
> 
> I seriously doubt that users would put up with that. Trying to think as 
> a user here, I certainly would not want to be told that in order to 
> remove a port that I don't want I first have to remove one that I do. 
> But perhaps I'm misunderstanding you again.

This is a good point and I'm glad it's brought up. I think this will work:

* When user tries to roll back [M+D1+D2+D3], notice that D2 needs to 
stay because of N (I think I only need to notice that D2 is depended on 
by something that isn't in the transaction being removed)
* Remove M, D1, D3 from the transaction, leave only D2 in the 
transaction, as if only D2 was installed in it.

As you said, it would be best if D2 was then grouped with N so both get 
removed when N gets removed, but this is really out of scope for 
pkg_trans - I'm not trying to solve complex interdependencies here :) 
(or better said: I'm trying not to solve them...)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20080801/b1727feb/signature.pgp


More information about the freebsd-ports mailing list