From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH] package: allow users to upgrade the whole system by not providing a regexp. Date: Tue, 16 Apr 2013 00:17:11 +0200 Message-ID: <1366064231-14031-1-git-send-email-tipecaml@gmail.com> References: <8738urihto.fsf@gnu.org> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38310) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrsa-0004bi-A1 for bug-guix@gnu.org; Mon, 15 Apr 2013 18:28:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URrsZ-0004YY-88 for bug-guix@gnu.org; Mon, 15 Apr 2013 18:28:04 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:35173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrsZ-0004YR-29 for bug-guix@gnu.org; Mon, 15 Apr 2013 18:28:03 -0400 Received: by mail-we0-f174.google.com with SMTP id u12so4005269wey.33 for ; Mon, 15 Apr 2013 15:28:02 -0700 (PDT) In-Reply-To: <8738urihto.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: bug-guix@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