X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 88AD8DC00EC for ; Fri, 30 Nov 2012 13:45:16 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id je9so258360bkc.13 for ; Fri, 30 Nov 2012 05:45:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=DqmoyjvSH05CgUlvB4l4gpSEGoBK8oCS9sIOy5zL9gw=; b=MbQEVOU2SInd19Asmc+lNErvNsVelSiW/avJxlDCAS8vrF17MDl7ApQAu1UhyBh3ae 7xrSmRSuxBKEd8pcD0pEuHgMJlqswWf4QGTnTM7TWD0o0Rs08SLqZH+pXQMn3YhGsvot 5EzBQC14fC7k4Q2llpVLbzUBLARuOVt93JfPJGK9sVcDYpvFDMaywL8wzunGA3cXgFHV qttCKIh3P7IZPxM527c2J29fWp4usYKC5BsdZx7LEvBT7jH1EDloIeMnQTbZDasPuCzb kvapqNeLbd9G86IQYiRSn3DBzr98pfE/AtpbuZaBJMEmFpJ0Kb1/lwD90VvD0a7asOCr roaQ== Received: by 10.204.148.7 with SMTP id n7mr386222bkv.76.1354283114672; Fri, 30 Nov 2012 05:45:14 -0800 (PST) Received: from vostro ([2001:1bc8:101:f402:21c:23ff:fefc:bf0b]) by mx.google.com with ESMTPS id 1sm3420265bks.3.2012.11.30.05.45.12 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 05:45:14 -0800 (PST) Sender: =?UTF-8?Q?Timo_Ter=C3=A4s?= Date: Fri, 30 Nov 2012 15:44:04 +0200 From: Timo Teras To: Dubiousjim Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] Some questions about apk-tools Message-ID: <20121130154404.68b4de2a@vostro> In-Reply-To: <20121129124028.GE2390@vaio.jimpryor.net> References: <20121128234406.GD2390@vaio.jimpryor.net> <20121129084044.29515fc1@vostro> <20121129124028.GE2390@vaio.jimpryor.net> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.13; i686-pc-linux-gnu) 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, 29 Nov 2012 07:40:28 -0500 Dubiousjim wrote: > On Thu, Nov 29, 2012 at 08:40:44AM +0200, Timo Teras wrote: > > > What exactly is the difference between `apk add ...` and `apk > > > fix ...`? > > > > "add" will record in the '/etc/apk/world' that the package is > > something user wanted explicitly to be installed. > > > > "fix" will just re-install it only if it is already installed. "fix" > > will always also re-install the package, "add" will only do things > > if it was not installed. > > > > > What is the difference between `apk add -u ...` and `apk fix > > > -u ...` and `apk fix -r ...` and `apk upgrade` (except for the > > > fact that the last operates on a broader set of packages)? > > > > "add -u" will record the package in world. "fix -u" will do almost > > same thing except not record the package in world. > > Ok, but I'm still unclear on the difference between the without "-u" > and the with "-u" version of each of these. > > Suppose I've got these packages installed: > > alpha-1.0 > beta-1.0 > > And that these packages are available in my repositories: > > alpha-1.0 > beta-2.0 > gamma-2.0 > > The handling of /etc/apk/world aside, will there be any difference in > the behavior of "apk add _", "apk add -u _", "apk fix _" and "apk fix > -u _", when each of alpha,beta,gamma are substituted for _: If gamma-2.0 depends on "beta" (without any version requirement). "apk add gamma" would just install "gamma-2.0" and do nothing else. "apk add -u gamma" would install "gamma-2.0" and also upgrade the dependency "beta" from 1.0 to 2.0. Basically on add, the -u means "prefer upgraded versions of all mentioned packages and their dependencies". Without -u minimum changes to installed packages are attempted, that is the installed package is always preferred. Same applies to fix. "fix" alone will re-install the same package currently installed if available. With -u it will be instead upgraded if such upgrade is available. > Trying to get a handle on why the "-u" option is there. > > > With "fix -r" will operate on the specified package list, and can > > re-install most of the package. > > So "fix -r foo" reinstalls foo and all of foo's dependencies? I'm not > sure if I'm understanding rightly? with "fix" -r is actually reinstall, the default behaviour. with -d you get the fix action propagated to all dependencies. With -d it would reinstall the named package and all it's dependencies. > > "upgrade" works with world - it > > upgrades all packages. "upgrade -a" is also notable, and in > > addition to regular "upgrade" it also resets all versioned world > > dependencies, and tries to make sure all packages come from some > > active repository. > > Right, I understand the broad outlines of upgrade and upgrade -a. But > let's say that beta is the only installed package I have that's out of > date (as in the above examples). In that situation, would "apk > upgrade" have the same net effect as "apk add beta"? Or "apk add -u > beta"? or some form of "apk fix"? "apk upgrade" is roughly equivalent to "apk fix -u -d `cat /etc/apk/world`" "apk add" always adds the package names to 'world'. If you know the named package is already there, then "fix -u" and "add -u" do not really have any functional difference. So yes, the functionality is slightly overlapping. -Timo --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---