Isaac Dunham: 2 Add "-s" short option for "--simulate" apk-tools: Add "-S" short option for "--simulate" 2 files changed, 10 insertions(+), 10 deletions(-)
Copy & paste the following snippet into your terminal to import this patchset into git:
curl -s https://lists.alpinelinux.org/~alpine/devel/patches/507/mbox | git am -3Learn more about email & git
Typing the long option gets old. --- src/apk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Natanael Copa <ncopa@alpinelinux.org>Have you checked that it does not break apk info -s <package>? (for displaying size usage)Isaac Dunham <ibid.ag@gmail.com>I had not. And it does break it. My apologies.Natanael Copa <ncopa@alpinelinux.org>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...Timo Teras <timo.teras@iki.fi>Currently no, could probably be done with little changes. Though, I'd prefer not to do it.Natanael Copa <ncopa@alpinelinux.org>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?Natanael Copa <ncopa@alpinelinux.org>info -S? But I don't like breaking compatibility. It always causes unexpected breakages which requires nasty fixes.Isaac Dunham <ibid.ag@gmail.com>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 ----nc/TimoNatanael Copa <ncopa@alpinelinux.org>--- 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 ----ncThanks, Isaac Dunham --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ----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;
Natanael Copa <ncopa@alpinelinux.org>--- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---
-- 2.0.1 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---
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 ---