On Thu, 9 Oct 2014 08:12:54 +0300
Timo Teras <timo.teras_at_iki.fi> wrote:
> On Wed, 8 Oct 2014 09:06:41 -0500
> Jeff Pohlmeyer <yetanothergeek_at_gmail.com> wrote:
> > On Wed, Oct 8, 2014 at 5:17 AM, Timo Teras <timo.teras_at_iki.fi> wrote:
> > > If you have new patchsets, old ones that are rebased, something I
> > > missed or just other ideas for apk-tools, please reply to this mail.
> > But what about this?
> > # apk del no-such-package
> > OK: 1264 MiB in 519 packages
> > # echo $?
> > 0
> Should be simple to fix. Though, should we differentiate the following
> scenarios when a package is not removed?
> 1) no-such-package or package-not-installed are trivial and should flag
I'd like this to be error. You thought it was installed but it was not,
or you spelled wrong something.
> 2) package can be implicitly installed as dependency. apk del does not
> do anything with it.
I'd like this to be error.
> 3) package is in 'world' but also a dependency. apk del updates world
> but still does not remove the package.
This is the only candidate for not returning error. I think what would
be nice is if this situation also returns error, unless a flag for
'i-am-just-interested-in-removing-it from-world' was specified.
apk del --world pkg # returns success if it was removed from
# world. no error message since the desired
# operation was sucess.
apk del pkg # remove from work but return error. give
# current error msg
> Are these all error conditions, or not?
I'd say yes, all 3 are error conditions, unless if --world is specified
for case #3.
You asked for it to be removed but it was not, so the problem you tried
to solve by removing it is probably still there.
For example, you have a package that is causing problems, lets say a
shell called 'bash' have ever returning sec issues so you want it
remove. The stressed sysadmin types: 'apk del bach' and does not notice
he spelled it wrong. He just sees 'OK' and goes on to next box...
> One option would be to return the number of packages names specified
> that were not removed.
We could also have specific error code for the different causes of
> Any comments?
> Unsubscribe: alpine-devel+unsubscribe_at_lists.alpinelinux.org
> Help: alpine-devel+help_at_lists.alpinelinux.org
Received on Fri Oct 10 2014 - 09:14:25 GMT