X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from ncopa-desktop.alpinelinux.org (3.203.202.84.customer.cdi.no [84.202.203.3]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: n@tanael.org) by mail.alpinelinux.org (Postfix) with ESMTPSA id 82149DC02A8; Fri, 10 Oct 2014 07:14:29 +0000 (UTC) Date: Fri, 10 Oct 2014 09:14:25 +0200 From: Natanael Copa To: Timo Teras Cc: Jeff Pohlmeyer , Alpine Subject: Re: [alpine-devel] apk-tools work-in-progress Message-ID: <20141010091425.571b93b2@ncopa-desktop.alpinelinux.org> In-Reply-To: <20141009081254.2a09944c@vostro> References: <20141008131721.747fcc9d@vostro> <20141009081254.2a09944c@vostro> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.23; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 9 Oct 2014 08:12:54 +0300 Timo Teras wrote: > On Wed, 8 Oct 2014 09:06:41 -0500 > Jeff Pohlmeyer wrote: > > > On Wed, Oct 8, 2014 at 5:17 AM, Timo Teras 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 > error 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. maybe: 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 error. > Any comments? > > > --- > Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org > Help: alpine-devel+help@lists.alpinelinux.org > --- > --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---