From: Cyril Roelandt <tipecaml@gmail.com>
To: bug-guix@gnu.org
Subject: [PATCH] package: allow users to upgrade the whole system by not providing a regexp.
Date: Tue, 16 Apr 2013 00:17:11 +0200 [thread overview]
Message-ID: <1366064231-14031-1-git-send-email-tipecaml@gmail.com> (raw)
In-Reply-To: <8738urihto.fsf@gnu.org>
'guix package --upgrade' is now the same as "guix package --upgrade=''".
---
doc/guix.texi | 7 ++++---
guix/scripts/package.scm | 6 +++---
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index c91bc20..d69b7d0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -537,9 +537,10 @@ multiple-output package.
@itemx -r @var{package}
Remove @var{package}.
-@item --upgrade=@var{regexp}
-@itemx -u @var{regexp}
-Upgrade all the installed packages matching @var{regexp}.
+@item --upgrade[=@var{regexp}]
+@itemx -u [@var{regexp}]
+Upgrade all the installed packages. When @var{regexp} is specified, upgrade only
+installed packages whose name matches @var{regexp}.
Note that this upgrades package to the latest version of packages found
in the distribution currently installed. To update your distribution,
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index ac99d16..5b340c6 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -328,7 +328,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
(display (_ "
-r, --remove=PACKAGE remove PACKAGE"))
(display (_ "
- -u, --upgrade=REGEXP upgrade all the installed packages matching REGEXP"))
+ -u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP"))
(display (_ "
--roll-back roll back to the previous generation"))
(newline)
@@ -379,7 +379,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
(option '(#\r "remove") #t #f
(lambda (opt name arg result)
(alist-cons 'remove arg result)))
- (option '(#\u "upgrade") #t #f
+ (option '(#\u "upgrade") #f #t
(lambda (opt name arg result)
(alist-cons 'upgrade arg result)))
(option '("roll-back") #f #f
@@ -602,7 +602,7 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
(let* ((installed (manifest-packages (profile-manifest profile)))
(upgrade-regexps (filter-map (match-lambda
(('upgrade . regexp)
- (make-regexp regexp))
+ (make-regexp (or regexp "")))
(_ #f))
opts))
(upgrade (if (null? upgrade-regexps)
--
1.7.10.4
next prev parent reply other threads:[~2013-04-15 22:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-15 21:27 [PATCH] package: allow users to upgrade the whole system by not providing a regexp Cyril Roelandt
2013-04-15 21:50 ` Ludovic Courtès
2013-04-15 22:17 ` Cyril Roelandt [this message]
2013-04-16 18:57 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1366064231-14031-1-git-send-email-tipecaml@gmail.com \
--to=tipecaml@gmail.com \
--cc=bug-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.