On Mon, Apr 20, 2009 at 11:54:43PM +0200, frantisek holop wrote:
> hi there,
> 
> it is time for another of my biweekly snapshot upgrade.
> 
> this is what i see this time during the update process:
> 
> Candidates for updating php5-gd-5.2.9 -> php5-gd-5.2.9 php5-gd-5.2.9-no_x11
> Ambiguous: choose package for php5-gd-5.2.9
>          0: <None>
>          1: php5-gd-5.2.9
>          2: php5-gd-5.2.9-no_x11
> Your choice: 1
> 
> i can undarstand the point of these questions when installing
> a new package as it is really ambiguous what i might want.
> but during the upgrade i think it is quite obvious what is my choice.
> 
> i know that doing the version number parsing dance is difficult,
> but would it be difficult to teach pkg_add to pick the same flavour
> of a particular package when doing the upgrade?  is this feasable?

Yes, it is difficult.

Look at the latest commits to pkg_add, the changes to the Search module
are rather complicated, even though almost nothing changes from a user
point of view.

I have similar changes in progress to other parts of pkg_add.  This basically
entails taking a lot of stuff apart and putting it back together in the right
order.

The very hard thing you are missing is that we have to be careful not to open
packages when we don't need to (because this entails a network connection,
possibly), to cache results when we need, and to not cache too much stuff
because the memory footprint of pkg_add shouldn't grow too much, even
for full updates.

As mentioned several times, pkg_add has grown piece by piece, as it was
reasonably hard to see what the next step was in some cases.

For once, I'm in an interesting situation: I know where I need to go, but
there are quite substantial changes that need to happen.

I know precisely how updates should work, it's just very different from the
approximation we're currently using. Doing it right without sacrificing the
current robustness is a difficult problem.

Reply via email to