~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
7 3

[alpine-devel] [PATCH] Add "-s" short option for "--simulate"

Isaac Dunham <ibid.ag@gmail.com>
Details
Message ID
<1404009591-1984-1-git-send-email-ibid.ag@gmail.com>
Sender timestamp
1404009591
DKIM signature
missing
Download raw message
Patch: +5 -5
Typing the long option gets old.
---
 src/apk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/apk.c b/src/apk.c
index 970bbb1..8e3ae7c 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -50,6 +50,8 @@ static struct apk_option generic_options[] = {
	{ 'V', "version",	"Print program version and exit" },
	{ 'f', "force",		"Do what was asked even if it looks dangerous" },
	{ 'U', "update-cache",	"Update the repository cache" },
	{ 's', "simulate",	"Show what would be done without actually "
				"doing it" },
	{ 0x101, "progress",	"Show a progress bar" },
	{ 0x10f, "progress-fd",	"Write progress to fd", required_argument, "FD" },
	{ 0x110, "no-progress",	"Disable progress bar even for TTYs" },
@@ -59,8 +61,6 @@ static struct apk_option generic_options[] = {
				"package removal" },
	{ 0x103, "allow-untrusted", "Blindly install packages with untrusted "
				"signatures or no signature at all" },
	{ 0x104, "simulate",	"Show what would be done without actually "
				"doing it" },
	{ 0x105, "wait",	"Wait for TIME seconds to get an exclusive "
				"repository lock before failing",
				required_argument, "TIME" },
@@ -409,6 +409,9 @@ int main(int argc, char **argv)
		case 'U':
			apk_flags |= APK_UPDATE_CACHE;
			break;
		case 's':
			apk_flags |= APK_SIMULATE;
			break;
		case 0x101:
			apk_flags |= APK_PROGRESS;
			break;
@@ -424,9 +427,6 @@ int main(int argc, char **argv)
		case 0x103:
			apk_flags |= APK_ALLOW_UNTRUSTED;
			break;
		case 0x104:
			apk_flags |= APK_SIMULATE;
			break;
		case 0x106:
			apk_flags |= APK_PURGE;
			break;
-- 
2.0.1



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Isaac Dunham <ibid.ag@gmail.com>
Details
Message ID
<20140630071323.GA9193@newbook>
In-Reply-To
<20140630085556.297136e7@ncopa-desktop.alpinelinux.org> (view parent)
Sender timestamp
1404112404
DKIM signature
missing
Download raw message
On Mon, Jun 30, 2014 at 08:55:56AM +0200, Natanael Copa wrote:
> On Sat, 28 Jun 2014 19:39:51 -0700
> Isaac Dunham <ibid.ag@gmail.com> wrote:
> 
> > Typing the long option gets old.
> > ---
> >  src/apk.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Have you checked that it does not break apk info -s <package>? (for displaying size usage)

I had not.
And it does break it.

My apologies.

Thanks,
Isaac Dunham


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20140630085556.297136e7@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1404009591-1984-1-git-send-email-ibid.ag@gmail.com> (view parent)
Sender timestamp
1404111356
DKIM signature
missing
Download raw message
On Sat, 28 Jun 2014 19:39:51 -0700
Isaac Dunham <ibid.ag@gmail.com> wrote:

> Typing the long option gets old.
> ---
>  src/apk.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Have you checked that it does not break apk info -s <package>? (for displaying size usage)

-nc

> 
> diff --git a/src/apk.c b/src/apk.c
> index 970bbb1..8e3ae7c 100644
> --- a/src/apk.c
> +++ b/src/apk.c
> @@ -50,6 +50,8 @@ static struct apk_option generic_options[] = {
>  	{ 'V', "version",	"Print program version and exit" },
>  	{ 'f', "force",		"Do what was asked even if it looks dangerous" },
>  	{ 'U', "update-cache",	"Update the repository cache" },
> +	{ 's', "simulate",	"Show what would be done without actually "
> +				"doing it" },
>  	{ 0x101, "progress",	"Show a progress bar" },
>  	{ 0x10f, "progress-fd",	"Write progress to fd", required_argument, "FD" },
>  	{ 0x110, "no-progress",	"Disable progress bar even for TTYs" },
> @@ -59,8 +61,6 @@ static struct apk_option generic_options[] = {
>  				"package removal" },
>  	{ 0x103, "allow-untrusted", "Blindly install packages with untrusted "
>  				"signatures or no signature at all" },
> -	{ 0x104, "simulate",	"Show what would be done without actually "
> -				"doing it" },
>  	{ 0x105, "wait",	"Wait for TIME seconds to get an exclusive "
>  				"repository lock before failing",
>  				required_argument, "TIME" },
> @@ -409,6 +409,9 @@ int main(int argc, char **argv)
>  		case 'U':
>  			apk_flags |= APK_UPDATE_CACHE;
>  			break;
> +		case 's':
> +			apk_flags |= APK_SIMULATE;
> +			break;
>  		case 0x101:
>  			apk_flags |= APK_PROGRESS;
>  			break;
> @@ -424,9 +427,6 @@ int main(int argc, char **argv)
>  		case 0x103:
>  			apk_flags |= APK_ALLOW_UNTRUSTED;
>  			break;
> -		case 0x104:
> -			apk_flags |= APK_SIMULATE;
> -			break;
>  		case 0x106:
>  			apk_flags |= APK_PURGE;
>  			break;



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20140702021030.2e1623c4@ncopa-laptop>
In-Reply-To
<20140702115212.6837f148@vostro> (view parent)
Sender timestamp
1404259830
DKIM signature
missing
Download raw message
On Wed, 2 Jul 2014 11:52:12 +0300
Timo Teras <timo.teras@iki.fi> wrote:

> On Wed, 2 Jul 2014 09:26:03 +0200
> Natanael Copa <ncopa@alpinelinux.org> wrote:
> 
> > On Mon, 30 Jun 2014 00:13:24 -0700
> > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > 
> > > On Mon, Jun 30, 2014 at 08:55:56AM +0200, Natanael Copa wrote:
> > > > On Sat, 28 Jun 2014 19:39:51 -0700
> > > > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > > > 
> > > > > Typing the long option gets old.
> > > > > ---
> > > > >  src/apk.c | 10 +++++-----
> > > > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > > 
> > > > Have you checked that it does not break apk info -s <package>?
> > > > (for displaying size usage)
> > > 
> > > I had not.
> > > And it does break it.
> > > 
> > > My apologies.
> > 
> > I must admit that I like the idea though.
> > 
> > I dont think 'apk info -s --simulate' makes much sense.
> > 
> > Timo, are there some way to fix this, that is, disable or override
> > global options for some applets.
> > 
> > I am not sure we want do that though...
> 
> Currently no, could probably be done with little changes. Though, I'd
> prefer not to do it.

Ok. Lets leave it.

> Though having '-s' short for --simulate sounds like a good idea. I have
> missed that, and I believe apt-get does that too.
> 
> Perhaps we should rename info -s to something else?

info -S?

But I don't like breaking compatibility. It always causes unexpected
breakages which requires nasty fixes. 

-nc

> /Timo



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20140702092603.4a8dc91f@ncopa-desktop.alpinelinux.org>
In-Reply-To
<20140630071323.GA9193@newbook> (view parent)
Sender timestamp
1404285963
DKIM signature
missing
Download raw message
On Mon, 30 Jun 2014 00:13:24 -0700
Isaac Dunham <ibid.ag@gmail.com> wrote:

> On Mon, Jun 30, 2014 at 08:55:56AM +0200, Natanael Copa wrote:
> > On Sat, 28 Jun 2014 19:39:51 -0700
> > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > 
> > > Typing the long option gets old.
> > > ---
> > >  src/apk.c | 10 +++++-----
> > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > Have you checked that it does not break apk info -s <package>? (for displaying size usage)
> 
> I had not.
> And it does break it.
> 
> My apologies.

I must admit that I like the idea though.

I dont think 'apk info -s --simulate' makes much sense.

Timo, are there some way to fix this, that is, disable or override
global options for some applets.

I am not sure we want do that though...

-nc

> 
> Thanks,
> Isaac Dunham
> 
> 
> ---
> 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
---
Timo Teras <timo.teras@iki.fi>
Details
Message ID
<20140702115212.6837f148@vostro>
In-Reply-To
<20140702092603.4a8dc91f@ncopa-desktop.alpinelinux.org> (view parent)
Sender timestamp
1404291132
DKIM signature
missing
Download raw message
On Wed, 2 Jul 2014 09:26:03 +0200
Natanael Copa <ncopa@alpinelinux.org> wrote:

> On Mon, 30 Jun 2014 00:13:24 -0700
> Isaac Dunham <ibid.ag@gmail.com> wrote:
> 
> > On Mon, Jun 30, 2014 at 08:55:56AM +0200, Natanael Copa wrote:
> > > On Sat, 28 Jun 2014 19:39:51 -0700
> > > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > > 
> > > > Typing the long option gets old.
> > > > ---
> > > >  src/apk.c | 10 +++++-----
> > > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > 
> > > Have you checked that it does not break apk info -s <package>?
> > > (for displaying size usage)
> > 
> > I had not.
> > And it does break it.
> > 
> > My apologies.
> 
> I must admit that I like the idea though.
> 
> I dont think 'apk info -s --simulate' makes much sense.
> 
> Timo, are there some way to fix this, that is, disable or override
> global options for some applets.
> 
> I am not sure we want do that though...

Currently no, could probably be done with little changes. Though, I'd
prefer not to do it.

Though having '-s' short for --simulate sounds like a good idea. I have
missed that, and I believe apt-get does that too.

Perhaps we should rename info -s to something else?

/Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Isaac Dunham <ibid.ag@gmail.com>
Details
Message ID
<20140705011605.GA5982@newbook>
In-Reply-To
<20140702021030.2e1623c4@ncopa-laptop> (view parent)
Sender timestamp
1404522966
DKIM signature
missing
Download raw message
On Wed, Jul 02, 2014 at 02:10:30AM +0200, Natanael Copa wrote:
> On Wed, 2 Jul 2014 11:52:12 +0300
> Timo Teras <timo.teras@iki.fi> wrote:
> 
> > On Wed, 2 Jul 2014 09:26:03 +0200
> > Natanael Copa <ncopa@alpinelinux.org> wrote:
> > 
> > > On Mon, 30 Jun 2014 00:13:24 -0700
> > > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > > 
> > > > On Mon, Jun 30, 2014 at 08:55:56AM +0200, Natanael Copa wrote:
> > > > > On Sat, 28 Jun 2014 19:39:51 -0700
> > > > > Isaac Dunham <ibid.ag@gmail.com> wrote:
> > > > > 
> > > > > > Typing the long option gets old.
> > > > > > ---
> > > > > >  src/apk.c | 10 +++++-----
> > > > > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > > > 
> > > > > Have you checked that it does not break apk info -s <package>?
> > > > > (for displaying size usage)
> > > > 
> > > > I had not.
> > > > And it does break it.
> > > > 
> > > > My apologies.
> > > 
> > > I must admit that I like the idea though.
> > > 
> > > I dont think 'apk info -s --simulate' makes much sense.
> > > 
> > > Timo, are there some way to fix this, that is, disable or override
> > > global options for some applets.
> > > 
> > > I am not sure we want do that though...
> > 
> > Currently no, could probably be done with little changes. Though, I'd
> > prefer not to do it.
> 
> Ok. Lets leave it.
> 
> > Though having '-s' short for --simulate sounds like a good idea. I have
> > missed that, and I believe apt-get does that too.
> > 
> > Perhaps we should rename info -s to something else?
> 
> info -S?
> 
> But I don't like breaking compatibility. It always causes unexpected
> breakages which requires nasty fixes. 

The obvious approach is to instead alias --simulate to -S; as far as I can tell,
there are no collisions.
I would find that satisfactory.

Anything I'm missing?

Thanks,
Isaac Dunham


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---

[alpine-devel] [PATCH] apk-tools: Add "-S" short option for "--simulate"

Isaac Dunham <ibid.ag@gmail.com>
Details
Message ID
<1404530162-6387-1-git-send-email-ibid.ag@gmail.com>
In-Reply-To
<20140702021030.2e1623c4@ncopa-laptop> (view parent)
Sender timestamp
1404530162
DKIM signature
missing
Download raw message
Patch: +5 -5
Typing the long option gets old.
---
 src/apk.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/apk.c b/src/apk.c
index 970bbb1..fd752dd 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -50,6 +50,8 @@ static struct apk_option generic_options[] = {
	{ 'V', "version",	"Print program version and exit" },
	{ 'f', "force",		"Do what was asked even if it looks dangerous" },
	{ 'U', "update-cache",	"Update the repository cache" },
	{ 'S', "simulate",	"Show what would be done without actually "
				"doing it" },
	{ 0x101, "progress",	"Show a progress bar" },
	{ 0x10f, "progress-fd",	"Write progress to fd", required_argument, "FD" },
	{ 0x110, "no-progress",	"Disable progress bar even for TTYs" },
@@ -59,8 +61,6 @@ static struct apk_option generic_options[] = {
				"package removal" },
	{ 0x103, "allow-untrusted", "Blindly install packages with untrusted "
				"signatures or no signature at all" },
	{ 0x104, "simulate",	"Show what would be done without actually "
				"doing it" },
	{ 0x105, "wait",	"Wait for TIME seconds to get an exclusive "
				"repository lock before failing",
				required_argument, "TIME" },
@@ -409,6 +409,9 @@ int main(int argc, char **argv)
		case 'U':
			apk_flags |= APK_UPDATE_CACHE;
			break;
		case 'S':
			apk_flags |= APK_SIMULATE;
			break;
		case 0x101:
			apk_flags |= APK_PROGRESS;
			break;
@@ -424,9 +427,6 @@ int main(int argc, char **argv)
		case 0x103:
			apk_flags |= APK_ALLOW_UNTRUSTED;
			break;
		case 0x104:
			apk_flags |= APK_SIMULATE;
			break;
		case 0x106:
			apk_flags |= APK_PURGE;
			break;
-- 
2.0.1



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)