X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from dal-a2.localdomain (unknown [74.117.189.115]) by mail.alpinelinux.org (Postfix) with ESMTP id 39B8BDC0091 for ; Fri, 28 Jun 2013 14:03:59 +0000 (UTC) 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: ncopa@tanael.org) by dal-a2.localdomain (Postfix) with ESMTPSA id 22CC3BC2AAE; Fri, 28 Jun 2013 14:03:57 +0000 (UTC) Date: Fri, 28 Jun 2013 16:03:54 +0200 From: Natanael Copa To: Timo Teras Cc: Dubiousjim , alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [PATCH 1/8] add logging infrastructure Message-ID: <20130628160354.669e129b@ncopa-desktop.alpinelinux.org> In-Reply-To: <20130628133531.35c9e507@vostro> References: <370646a3cbe979d2b309a44f86d06e50cc603f3c.1372372343.git.dubiousjim@gmail.com> <20130628133531.35c9e507@vostro> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.17; x86_64-unknown-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 Fri, 28 Jun 2013 13:35:31 +0300 Timo Teras wrote: > On Thu, 27 Jun 2013 18:35:42 -0400 > Dubiousjim wrote: > > > src/apk.c | 4 ++++ > > src/apk_database.h | 2 +- > > src/apk_defines.h | 1 + > > src/apk_print.h | 12 ++++++++---- > > src/database.c | 17 +++++++++++++++++ > > src/print.c | 36 ++++++++++++++++++++++++++++++------ > > 6 files changed, 61 insertions(+), 11 deletions(-) > > I do like the feature here, but not the implementation as-is. Nice indeed. I have also thought about a log-to-logfile feature so you have a history of what and when things were installed. > > diff --git a/src/apk.c b/src/apk.c > > index c3709e7..4bac0ba 100644 > > --- a/src/apk.c > > +++ b/src/apk.c > > @@ -46,6 +46,7 @@ static struct apk_option generic_options[] = { > > required_argument, "DIR" }, > > { 'X', "repository", "Use packages from REPO", > > required_argument, "REPO" }, > > + { 0x113, "no-log", "Don't write to log" }, > > { 0x101, "progress", "Show a progress bar" }, > > { 0x10f, "progress-fd", "Write progress to fd", > > This might have non-wanted implications on the tmpfs initramfs > bootstrap. > > I've been thinking that we need some flag for apk to indicate that it's > the tmpfs initial initramfs call to get proper defaults for flags like > these. I am generally against apk trying to be smart but one option is to check if --root is specified and if destination directory is a tmpfs. maybe add a --bootstrap option which would correspond to: --overlay-from-stdin --no-network --clean-protected --initdb I suppose the challenge here is that many of the options are conditional. For example, if there are no apkovl, there should be no --overlay-from-stdin (an be worked around with /dev/null tricks) and if there are PXE network repos we replace the --no-network with --update-cache. The --clean-protected is currently also optional with the boot option "keep_apk_new" > Also wondering if we need to support flags specially in the options > handling and always have both "foo" and "no-foo" long options. -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---