X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id C3384DC0097 for ; Mon, 1 Jul 2013 14:57:30 +0000 (UTC) Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id D4F8E20F25 for ; Mon, 1 Jul 2013 10:57:29 -0400 (EDT) Received: from frontend2.nyi.mail.srv.osa ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 01 Jul 2013 10:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=sTlh8ORBkdXPgZEJVma0ULjKurE=; b=G+GYBRydbSUIcVv1VytLNP3n1t44 exBTJH7kkVyN1ah/ZpBcyx7060ZGekln82cdbK+LHdnJ0jjY470iBaEyQhHDUffv yjPgWy76vnKuQgoRXeyzaA/gW2rE7TQCejKi8ZI6HRyiJY2yvlIo6Nx6sqrOS+/d bWZWVy0Icb3RF6A= X-Sasl-enc: AUDmI0tQkY0zVT7Szj2Zok0CodyH6BQZcaAA5JuwCQwq 1372690649 Received: from localhost (unknown [69.86.161.244]) by mail.messagingengine.com (Postfix) with ESMTPA id 9822468024A for ; Mon, 1 Jul 2013 10:57:29 -0400 (EDT) Date: Mon, 1 Jul 2013 10:57:29 -0400 From: Dubiousjim To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] futher apk ideas Message-ID: <20130701145729.GC1550@zen> Mail-Followup-To: alpine-devel@lists.alpinelinux.org References: <20130628154631.4d18107d@ncopa-desktop.alpinelinux.org> <20130628163747.GB1712@zen.nyu.edu> <20130628171945.GD1712@zen.nyu.edu> <20130701151533.079b3256@ncopa-desktop.alpinelinux.org> 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-Disposition: inline In-Reply-To: <20130701151533.079b3256@ncopa-desktop.alpinelinux.org> User-Agent: Mutt/1.5.21 (2010-09-15) On Mon, Jul 01, 2013 at 03:15:33PM +0200, Natanael Copa wrote: > On Fri, 28 Jun 2013 13:19:45 -0400 > Dubiousjim wrote: > > > > Again, I'm not especially fond of the particular choice -N/--needed. > > Just using it because I don't have something better. > > agree. Not too fond of -N/--needed either. 'needed' sounds like a synonym for 'depends' Whoops, I meant it to be --needers, which is even uglier but less likely to be misinterpreted. > > maybe -b/--required-by or some combination of -b and --needed-by/--required-by. > > for recursing the reverse deps (apk del/apk info) maybe > --recurse-required-by or --recurse-needed-by > > I think -b and -B are 'free'. 'B' as in required-'B'y/needed-'B'y or > 'B'ackwards. I like this idea. I was regretting that -U was unavailable, for --upwards, but something like -B/--needed-by scratches the same itch. Hadn't considered that. Concerning -r/--rdepends: well, in the first place I hanker for consistency, and if this is the way to get it, ok. Though I'm not enthusiastic about using -r or --rdepends. Maybe it's just a bad association I have with MacPorts, who do use that, and every time I go back to using MacPorts for something, after months away, I get all the option names confused with each other. If we're using something -R-like for "recurse", I'd prefer something un-R-like for reverse dependencies. The -B or -b options look more appealing. > > > I think recursive operation makes no sense for apk info, but for apk > > > search, yes. > > > > No, I've several times had to hand-script recursive operations for "apk > > info". If you're just going downwards, then you could use apk search > > too; but you might want to go recursively upwards, limited just to > > installed packages. > > When and why would you need something like that? Machine A had gradually accumulated a lot of unorganized entries in /etc/apk/world. Now I'm setting up machine B (another Alpine machine) and machine C (an OS X machine, using MacPorts). I want to clean up the world on machine A so as to be able to more clearly review which of the entries there are redundant (i.e., it's required by some other packages), and in which cases where there's a redundancy do I want to leave it in place, and in which other cases do I want to remove the entry from /etc/apk/world, though leaving the package installed. This is all so that I can have the cleanest view of what's on machine A, so as to make it easier to decide what I want and what I don't want on machines B and C. Stuff like that. Perhaps I could have just used `apk del --simulate`. That option hadn't occurred to me. Instead I crafted a complex, ad hoc shell command. > > Options for fix command: > > -R, --recursive Recursively fix all dependencies too > > -d Synonym for -R (deprecated) > > Those are good IMHO. > > > -r, --reinstall Reinstall the package (default) <--- would > > prefer not to have "apk del -r" be canonical, to avoid confusion with > > other uses of "-r" like this > > We could maybe remove (or mark as deprecated) -r/--reinstall for apk > fix, since it is the default now anyways. +1 > > Options for info command: (or "apk info --world", if we go that route) > > -d, --description Print description for PACKAGE > > -D, --depends List packages that the PACKAGE (directly) depends on > > -R Synonym for -D (deprecated) > > I'm ok with those. (But i think I'd be ok to keep -R too for --depends) > > > -N, --needed List all installed packages (directly) depending on PACKAGE > > -r Synonym for -N (deprecated) > > > > Except we might introduce breakage here and have -R combine with -D and > > -N to make them recursive. > > I understand what you mean, and, yes you definitively have a point > here. > > But, lets say that you want figure the total size (including > depends). Now, you'd want run 'apk info --recursive -s' but you'd don't > want print the --depends. (specially if we fix 'apk info -q -s pkg' to > print ' ' so it could be sort -n, or similar) > > So, basically, we need differ 'print depends' and 'run recursively on > depends'. I don't think we can use -R in combination with > --depends/--needed/--rdepends. That's a good point. -- Dubiousjim dubiousjim@gmail.com --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---