From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Quicklisp importer bug in tarball->extract->parse Date: Thu, 11 Apr 2019 16:31:06 +0200 Message-ID: <87mukwlil1.fsf@ambrevar.xyz> References: <874l7fzdbp.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:32915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEajT-0001EB-34 for guix-devel@gnu.org; Thu, 11 Apr 2019 10:31:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEajR-0003Sk-SN for guix-devel@gnu.org; Thu, 11 Apr 2019 10:31:15 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:37777) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEajR-0003Ra-IT for guix-devel@gnu.org; Thu, 11 Apr 2019 10:31:13 -0400 In-Reply-To: <874l7fzdbp.fsf@ambrevar.xyz> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: swedebugia , guix-devel --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi! I've had time to look at it a little. If you want to debug, you can, for instance, put a breakpoint in guess-requirements-from-source, then enter the following in your guile prompt: ,backtrace #:full? #t or shorter ,bt #:full? #t That will print the backtrace will all local variables. There is nothing wrong with find-files: the "dir" directory is empty. This is because the extraction failed:=20 check the exit-code of system* before proceeding, you'll see what happens ;) =2D-8<---------------cut here---------------start------------->8--- (system* "tar" "xf" tarball "-C" dir file-name) =2D-8<---------------cut here---------------end--------------->8--- The above will error out if "file-name" is not found. For 1am: Queried file-name: "1am.asd" Tarball actual file: "1am-20141106-git/1am.asd" I don't think we can predict the root folder, and more generally projects have different trees. So I suggest we extract the whole tarball and proceed from there. So your code should work by just removing "file-name": =2D-8<---------------cut here---------------start------------->8--- (system* "tar" "xf" tarball "-C" dir) =2D-8<---------------cut here---------------end--------------->8--- Makes sense? Unrelated comment: If I'm not mistaken, you are fetching the meta-file and the index-file on every query. I suggest you keep those in memories as soon as possible (memoize them), this will allow you to iterate much faster when developing. It seems that you are on the right track, great job! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlyvT6oACgkQm9z0l6S7 zH+fGwf/UJsGKrA2yJFSwglG39v9Th+0x6wjgg7AeCG57Z/i3LTVcGegNlADg5ep Xegz2+aMKt2xUXUJMSSzuQyF3mR31aDqNpoc9YZd97KFRsbw46cGa2fCzmnxZlSj TQtM5RDiBOfjwzso4lEl31+YH6EhSRHWivNlnKL63OOB70nrQvods2j2cOFB0WLo oqbMHG7yEwyYyiCfbxT8H1hnablPl4W3ax9eRLQTKsxDb6lq/axd89AuFw5XQtRu 1Co7gj/A/EbbwEeBzjhOMCO04HCgf76jOgq4L5DULtMPjjEEroQ2Mgwropz0c2EQ Vc0pgwm53CbJcCuRbwBGLitGfaruhQ== =EhLZ -----END PGP SIGNATURE----- --=-=-=--