[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Next upload 2007-05-03 (dpkg 1.14.0)

On Thu, 2007-05-03 at 15:14:14 +0100, Ian Jackson wrote:
> Guillem Jover writes ("Re: Next upload 2007-05-03 (dpkg 1.14.0)"):
> > With 1.13.25 u-a:
> ...
> >   0
> I think there's an argument that some of these are more correct.

> In particular, you don't want something like
> >   pulsar:~# update-alternatives --auto foo; echo $?
> to fail just because it happens between update-alternatives --install
> and --remove.

If it happens between an --install and --remove it should not fail
with the mentioned change, if it does then it's an error we want to
see anyway. Also this command should be run by the admin and not by
maintainer scripts in the general case.

> >   pulsar:~# update-alternatives --remove foo /bin/foo; echo $?
> >   0
> And ought to be idempotent so it shouldn't fail the second time.

Ok, I'll make this one for now not «exit 1» in case there is no
link-group file on --remove on the grounds that it's not consistent
with the case when this command is trying to remove a non-existing
path on an existing link-group file.

But I disagree with the argument that not returning a proper error
code is more correct. The commands are idempotent regarding the
internal state, they are not regarding their execution state, and I
think the idempotency of the latter is less important than losing
valuable information which can be discarded if needed with stuff
like '|| true', also it would be consistent with commands like rm(1),
once you've removed something you don't expect it to work again
(except with -f, of course).

Sorry for the delay on the release, will do this change and the
final testing and releasing later today.


Reply to: