Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id E43DD781B5F for <~alpine/devel@lists.alpinelinux.org>; Thu, 22 Aug 2019 08:02:03 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 930F69E276F; Thu, 22 Aug 2019 08:02:01 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 084909E2343; Thu, 22 Aug 2019 08:01:59 +0000 (UTC) Date: Thu, 22 Aug 2019 10:01:52 +0200 From: Natanael Copa To: Cosmo Borsky Cc: Rasmus Thomsen , "~alpine/devel@lists.alpinelinux.org" <~alpine/devel@lists.alpinelinux.org> Subject: Re: APKBUILD Optional/Recommended Dependencies Message-ID: <20190822100152.01a072b5@ncopa-desktop.copa.dup.pw> In-Reply-To: References: <883dca1a-b7f3-6137-059d-f561ef22c126@cosmoborsky.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 12 Aug 2019 06:24:49 -0400 Cosmo Borsky wrote: > > To build off my initial idea, it may be nice to have optional > dependencies listed with apk info , and then perhaps just a flag for > apk add as a convenience. > > apk info --depends pkg Should the optional dependencies be listed or not? How should it display which deps are hard dependencies and which are optional? Wouldnt it be better with something like: apk info --depends pkg apk info --optional-depends What about listing reverse dependencies? > apk add --install-optional pkg What should happen when you do `apk del pkg`? should it keep the optional deps installed or should they be deleted? What should happen if you do: apk add --install-optional pkg apk del optdep-to-pkg Should it give an error or should it delete it? Lets say you install "pkg" with optional depends as above, and then the package maintainer adds another optional depends. What should happen when you do the `apk upgrade`? Should the introduced optional depends also be installed? What if a package maintainer removes an optional dep, should it be deleted when user do `apk upgrade` or should it be kept? > The above should be straight forward to implement, and package > maintainers should not be required to add optional dependencies. It is a can of worms and I don't think its worth it. Currently you can "clone" an install (or restore a a backup) by copying over /etc/apk/world and run `apk fix`. What should happen with optional depends? > --- > cosmo