From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Gibbons Subject: bug#36711: transformation 'with-source' had no effect on local git checkout directory Date: Wed, 17 Jul 2019 17:52:36 -0600 Message-ID: <20190717175236.25164eb9@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:55397) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hntjL-0003yZ-MY for bug-guix@gnu.org; Wed, 17 Jul 2019 19:53:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hntjK-0003MZ-9h for bug-guix@gnu.org; Wed, 17 Jul 2019 19:53:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hntjK-0003MS-5s for bug-guix@gnu.org; Wed, 17 Jul 2019 19:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hntjK-0005jr-3o for bug-guix@gnu.org; Wed, 17 Jul 2019 19:53:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:55343) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hntj2-0003vx-Dq for bug-guix@gnu.org; Wed, 17 Jul 2019 19:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hntj1-0003Bh-24 for bug-guix@gnu.org; Wed, 17 Jul 2019 19:52:44 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]:41449) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hntj0-00039L-RR for bug-guix@gnu.org; Wed, 17 Jul 2019 19:52:43 -0400 Received: by mail-pg1-x52f.google.com with SMTP id x15so1586675pgg.8 for ; Wed, 17 Jul 2019 16:52:42 -0700 (PDT) Received: from localhost ([199.68.53.171]) by smtp.gmail.com with ESMTPSA id r6sm17666286pgl.74.2019.07.17.16.52.39 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 17 Jul 2019 16:52:39 -0700 (PDT) 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: 36711@debbugs.gnu.org I could not find this bug in the archives. This bug seems a bit inconsistent. How to reproduce: Note that I use a variable after I discovered this does not happen with some packages. my_package=guile-git 1. clone any repository referenced by a package: git clone https://gitlab.com/guile-git/guile-git.git checkout 2. modify the repository. I use a harmless comment, but I initially saw this bug when I made a much greater change: cd checkout echo ";;;hello world" >> git/blob.scm 3. (optional) build the package with no flags: guix build $my_package 4. build the package with the flag "--with-source=$PWD": guix build --with-source=$PWD $my_package output result: guix build: warning: transformation 'with-source' had no effect on guile-git@0.2.0 /gnu/store/36vgw4w0dh49n5l5vmlnlmiryhay8i52-guile-git-0.2.0 5. check for the edit: grep ";;hello world" `guix build --with-source=$PWD \ $my_package`/share/guile/site/2.2/git/blob.scm; echo $? output: guix build: warning: transformation 'with-source' had no effect on guile-git@0.2.0 1 If the git repository was used to build anything grep would have found my comment and returned 0. If the file in question did not exist grep would have returned 2. Should I use --with-git-url instead? Probably not. That does not work either: guix build --with-git-url=$PWD $my_package guix build: error: /home/jesse/Documents/tmp/guile-git/checkout: invalid Git URL replacement specification Should I commit? Turns out that doesn't help: git add git/blob.scm git commit -m"message" guix build --with-source=$PWD $my_package guix build: warning: transformation 'with-source' had no effect on guile-git@0.2.0 /gnu/store/36vgw4w0dh49n5l5vmlnlmiryhay8i52-guile-git-0.2.0 Committing doesn't change the response to --with-git-url=$PWD either, which is logical given the error message: guix build --with-git-url=$PWD $my_package guix build: error: /home/jesse/Documents/tmp/guile-git/checkout: invalid Git URL replacement specification Finally I try to build after I delete the .git directory, which makes my working directory no longer a git checkout directory: rm -rf .git guix build --with-source=$PWD guile-gdbm-ffi gives me the same result: guix build: warning: transformation 'with-source' had no effect on guile-gdbm-ffi@20120209.fa1d5b6 /gnu/store/s5k6sc82ylbgxajdjvk7ns7i17dvx62r-guile-gdbm-ffi-20120209.fa1d5b6 I would expect this to be different, but I guess that's not the case. However, this does not happen when I use source from guix itself: cp --dereference --recursive `guix build --source \ $my_package` ./$my_package cd $my_package chmod --recursive u+w . guix build --with-source=$PWD $my_package ... successfully built /gnu/store/0vjqhdwv1rsa40naziy9prq8v1jgbyxr-guile-git-0.2.0.drv But it does not work when I use . instead of $PWD: guix build --with-source=. $my_package guix build: warning: transformation 'with-source' had no effect on guile-git@0.2.0 /gnu/store/36vgw4w0dh49n5l5vmlnlmiryhay8i52-guile-git-0.2.0 This bug not happen when I try it with the guile-readline package. Because of this bug, it can be very complicated to develop and install packages out of a local git clone directory. For example, it becomes frustrating to check that changes made to the installation process allow guix to install a package that guix previously couldn't build before the source is committed and pushed to a remote repository. I hope this issue has enough information to find a solution. -Jesse