From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#27820: guix package -u: order of argument is significant Date: Tue, 25 Jul 2017 15:40:45 -0400 Message-ID: <87fudkb8zm.fsf@netris.org> References: <5977294D.1020304@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1da5ha-0000Xm-HJ for bug-guix@gnu.org; Tue, 25 Jul 2017 15:41:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1da5hW-0000V5-Jd for bug-guix@gnu.org; Tue, 25 Jul 2017 15:41:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1da5hW-0000Uy-FW for bug-guix@gnu.org; Tue, 25 Jul 2017 15:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1da5hW-0007MD-39 for bug-guix@gnu.org; Tue, 25 Jul 2017 15:41:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <5977294D.1020304@crazy-compilers.com> (Hartmut Goebel's message of "Tue, 25 Jul 2017 13:19:41 +0200") 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" To: Hartmut Goebel Cc: 27820@debbugs.gnu.org Hartmut Goebel writes: > I'm try upgrading from guix-0.12.0-10.ba2260d but the profile is not updated. > > I used "guix pull" to get the latest version. > > "guix package -u" is loading substitutes, fails with this and recommends > using --fallback. > > "guix package -u --fallback" when run the first time did compile some > packages, but did not update the profile. That's because "--fallback" was treated as the argument to -u, i.e. the regexp specifying which packages to upgrade. The few compiled packages were needed to run the profile hooks. > "guix package -u --fallback" when run another time does *nothing*. "guix > package -l" still show the old generation. See above. It did nothing this time because the packages needed to run the profile hooks were already up-to-date. > So I updated only guix "guix package -u guix", which gave me guix-0.13.0-4.f1ddfe4. > > > "guix package -u --fallback" when run another time again did nothing. > > BUT: > > "guix package --fallback -u" did upgrade the packages. In this case, since there's no argument after -u, it implicitly upgrades all packages. When I want to add more options after -u, I add "." as the argument after -u. I agree that this is quite confusing. Perhaps we should issue a warning if the regexp begins with "-". Also, perhaps we should *always* require an argument after "-u", even if "-u" is at the end of the command line, failing otherwise. Users would then learn to always pass an argument to "-u", and thus would be less likely to fall into this trap when adding more options after the "-u". Thoughts? Mark