From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 17 06:04:10 2018 Received: (at 33238) by debbugs.gnu.org; 17 Dec 2018 11:04:10 +0000 Received: from localhost ([127.0.0.1]:50917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYqgz-0006ZF-Os for submit@debbugs.gnu.org; Mon, 17 Dec 2018 06:04:10 -0500 Received: from mx1.riseup.net ([198.252.153.129]:52294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYqgw-0006Z5-H7 for 33238@debbugs.gnu.org; Mon, 17 Dec 2018 06:04:08 -0500 Received: from cotinga.riseup.net (cotinga-pn.riseup.net [10.0.1.164]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 6FE531A0204; Mon, 17 Dec 2018 03:04:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1545044645; bh=/4G+N14o/Qn23Gu2sfqWOCKoM6zS/syZk+qlmn1wuZQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YLNmzioCTArrZsrUVAjhaUGieS9ffOq3K8pXfxZGL2wN7YhU1M2xU0qZi2Jrdtsim vpvET2494jOj58+H99Y6x+fdSitFO5/Al71U43OPQ/Np8LHRCv1OnQpz8tBHiTo3AR nxfjFarNsN+dGDTIa/earqrHo04MPe1GPtEl6r6A= X-Riseup-User-ID: 2AB0DED7EAE64C538BA13F603607B689FEB828638F29E873FEE6788FBD41C8FA Received: from [127.0.0.1] (localhost [127.0.0.1]) by cotinga.riseup.net with ESMTPSA id E5324C0384; Mon, 17 Dec 2018 03:04:04 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Mon, 17 Dec 2018 03:04:04 -0800 From: swedebugia@riseup.net To: 33238@debbugs.gnu.org Subject: Re: bug#33238: Fail nicely when profile is not found In-Reply-To: <3c9c7b9e-90ce-a70e-2850-b4e32d719f04@riseup.net> References: <3c9c7b9e-90ce-a70e-2850-b4e32d719f04@riseup.net> Message-ID: <8eb75951106df8ab37ad625d05dfc365@riseup.net> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33238 Cc: bug-Guix X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2018-11-02 09:00, swedebugia wrote: > Hi > > I installed guix from AUR and ran into this: > > $ guix pull -l > Backtrace: >            8 (apply-smob/1 #) > In ice-9/boot-9.scm: >     705:2  7 (call-with-prompt _ _ #) > In ice-9/eval.scm: >     619:8  6 (_ #(#(#))) > In guix/ui.scm: >   1578:12  5 (run-guix-command _ . _) > In ice-9/boot-9.scm: >     829:9  4 (catch srfi-34 # …) >     829:9  3 (catch system-error # …) >     829:9  2 (catch git-error # …) >     829:9  1 (catch system-error # …) > In unknown file: >            0 (raise #) > > ERROR: In procedure raise: > Wrong type (expecting exact integer): # &profile-not-found-error [profile: "/home/egil/.config/guix/current"] > 55dd9ac9a240> > > The install went fine but guix is not working :/ so I will do a manual > binary install instead. > > I could try crafting a patch testing if the directory exist if > somebody is willing to point me to the right file (and perhaps an > example of a procedure that can check this) > > Cheers > Swedebugia > > $ guix --version > guix (GNU Guix) 0.15.0 > Copyright (C) 2018 the Guix authors > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. This is still present: sdb@antelope ~/src/guix$ ./pre-inst-env guix describe Git checkout: repository: /home/sdb/src/guix branch: HEAD commit: c4cc1b9d20212369d485a7b3788160117926ea3b sdb@antelope ~/src/guix$ ./pre-inst-env guix pull -l Backtrace: 8 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 7 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 6 (_ #(#(#))) In guix/ui.scm: 1603:12 5 (run-guix-command _ . _) In ice-9/boot-9.scm: 829:9 4 (catch srfi-34 # …) 829:9 3 (catch system-error # …) 829:9 2 (catch git-error # …) 829:9 1 (catch system-error # …) In unknown file: 0 (raise #) ERROR: In procedure raise: Wrong type (expecting exact integer): # The relevant code from pull.scm is this: (define (process-query opts profile) "Process any query on PROFILE specified by OPTS." (match (assoc-ref opts 'query) (('list-generations pattern) (define (list-generations profile numbers) (match numbers ((first rest ...) (display-profile-content profile first) (let loop ((numbers numbers)) (match numbers ((first second rest ...) (display-profile-content-diff profile first second) (loop (cons second rest))) ((_) #t) (() #t)))))) (leave-on-EPIPE (cond ((not (file-exists? profile)) ; XXX: race condition (raise (condition (&profile-not-found-error (profile profile))))) ((string-null? pattern) (list-generations profile (profile-generations profile))) ((matching-generations pattern profile) => (match-lambda (() (exit 1)) ((numbers ...) (list-generations profile numbers))))))))) -- Cheers Swedebugia