Hi!
I've upgraded to pacman3 and did this: [root@server ~]# pacman -Sc Do you want to remove old packages from cache? [Y/n] removing old packages from cache... done. [root@server ~]# pacman -Scc Do you want to remove all packages from cache? [Y/n] n
IMO -Scc default choice should be N, because it's easy to do -Scc instead of -Sc and hit Enter as usual.
On 3/28/07, Roman Kyrylych roman.kyrylych@gmail.com wrote:
Hi!
I've upgraded to pacman3 and did this: [root@server ~]# pacman -Sc Do you want to remove old packages from cache? [Y/n] removing old packages from cache... done. [root@server ~]# pacman -Scc Do you want to remove all packages from cache? [Y/n] n
IMO -Scc default choice should be N, because it's easy to do -Scc instead of -Sc and hit Enter as usual.
Cleaning the email inbox. Submit a patch (against GIT) if you want this, and I'd like to see what a few other people think about it.
-Dan
2007/4/23, Dan McGee dpmcgee@gmail.com:
On 3/28/07, Roman Kyrylych roman.kyrylych@gmail.com wrote:
Hi!
I've upgraded to pacman3 and did this: [root@server ~]# pacman -Sc Do you want to remove old packages from cache? [Y/n] removing old packages from cache... done. [root@server ~]# pacman -Scc Do you want to remove all packages from cache? [Y/n] n
IMO -Scc default choice should be N, because it's easy to do -Scc instead of -Sc and hit Enter as usual.
Cleaning the email inbox. Submit a patch (against GIT) if you want this, and I'd like to see what a few other people think about it.
From 3775b9031181d72ab4c63b5cd166f6af3bf714c4 Mon Sep 17 00:00:00 2001 From: Roman Kyrylych roman@archlinux.org Date: Sun, 3 Jun 2007 21:12:26 +0300 Subject: [PATCH] changed default -Scc answer to N
Signed-off-by: Roman Kyrylych roman@archlinux.org --- src/pacman/sync.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 7d7de52..9102a9a 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -163,7 +163,7 @@ static int sync_cleancache(int level) FREELIST(clean); } else { /* full cleanup */ - if(!yesno(_("Do you want to remove all packages from cache? [Y/n] "))) + if(yesno(_("Do you want to remove all packages from cache? [y/N] "))) return(0); printf(_("removing all packages from cache... "));
On 6/3/07, Roman Kyrylych roman.kyrylych@gmail.com wrote:
/* full cleanup */
if(!yesno(_("Do you want to remove all packages from cache? [Y/n] ")))
if(yesno(_("Do you want to remove all packages from cache? [y/N] "))) return(0); printf(_("removing all packages from cache... "));
This change doesn't work quite as you intended, Roman. yesno() returns a 1 on three conditions- a 'Y' or 'YES' is entered, or nothing at all was entered. Thus, there is no easy way to change the default answer from Y. yesno() will need to be rewritten to support a parameter saying which answer should be the default.
-Dan
On Monday 04 June 2007 03:51:38 Dan McGee wrote:
On 6/3/07, Roman Kyrylych roman.kyrylych@gmail.com wrote:
/* full cleanup */
if(!yesno(_("Do you want to remove all packages from
cache? [Y/n] "))) + if(yesno(_("Do you want to remove all packages from cache? [y/N] "))) return(0); printf(_("removing all packages from cache... "));
This change doesn't work quite as you intended, Roman. yesno() returns a 1 on three conditions- a 'Y' or 'YES' is entered, or nothing at all was entered. Thus, there is no easy way to change the default answer from Y. yesno() will need to be rewritten to support a parameter saying which answer should be the default.
Can't it simply return 1 for a yes, 0 for a nothing-at-all and -1 for a no, or something like it? I think it would be cleaner.
pacman-dev@lists.archlinux.org