unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brendan Tildesley <mail@brendan.scot>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: pratheblackdiamond@gmail.com, 43249@debbugs.gnu.org
Subject: [bug#43249]
Date: Thu, 10 Sep 2020 22:46:33 +1000	[thread overview]
Message-ID: <330470a6-e6d2-e679-32ac-a308d89a5e92@brendan.scot> (raw)
In-Reply-To: <87d02wca8d.fsf@elephly.net>

On 9/9/20 5:57 am, Ricardo Wurmus wrote:
> Prafulla Giri <pratheblackdiamond@gmail.com> writes:
>
>> I wonder.... perhaps it'd be better altogether if the (wrap-program)
>> procedure could be re-written to not make ..*.real.real programs...? That
>> would save us a lot of code-duplication...
> Looking at the definition of wrap-program in (guix build utils) there is
> code that checks if the wrapper already exists; if it does it should
> append the new environment variable definitions to the existing
> wrapper.  It looks like this doesn’t work reliably.
>
> If someone could figure out why that is we could fix this in the next
> core-updates cycle.
>
When given "foo", wrap-program checks if ".foo-real" exists and thus 
concludes that "foo" is a wrapper and appends, however, despite the fact 
that the wrapper? procedure exists, it is not actually used at any time 
to check if ".foo-real" its self was passed to wrap-program. Therefore 
it happily wraps wrappers if it is given one. For example 
glib-or-gtk-build-system uses (find-files bindir ".*") to find files to 
pass to wrap-program. This ".*" regular expression matches hidden 
dotfiles. I copy-pasted everything to make a new build system and added 
an error for (wrapper? prog) and it exposed this. changingI guess then 
we should patch wrap-program to add

(when (wrapper? prog)
     (error (string-append prog " is a wrapper. Refusing to wrap.")))

at the start.

Then fix all uses of wrap-program so that they dont recieve -real files.

In glib-or-gtk-build-system.scm, chanding bin-list to:

(bin-list     (filter (lambda (file) (not (wrapper? file)))
                                      (append (find-files bindir ".*")
                                              (find-files libexecdir 
".*"))))

seems to fix it, at least in the case of gedit, a program that currently 
produces a nested wrapper. Ill play with it more tomorrow.





  reply	other threads:[~2020-09-10 12:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 18:32 [bug#43249] Resolve Calibre run-time dependency Prafulla Giri
2020-09-06 20:09 ` Jonathan Brielmaier
2020-09-07  8:12 ` Brendan Tildesley
     [not found]   ` <6492c3cc-07e0-b56b-ea72-99d403770755@brendan.scot>
     [not found]     ` <20200908201144.GA25269@jurong>
2020-09-09  8:38       ` [bug#43249] bug#43151: " Prafulla Giri
2020-09-08 12:22 ` [bug#43249] Prafulla Giri
2020-09-08 13:38   ` [bug#43249] Brendan Tildesley
2020-09-08 19:57   ` [bug#43249] Ricardo Wurmus
2020-09-10 12:46     ` Brendan Tildesley [this message]
2020-09-10 13:22       ` [bug#43249] Ricardo Wurmus
2020-09-11  8:18         ` [bug#43249] Brendan Tildesley
2020-09-11  8:38           ` [bug#43249] Ricardo Wurmus
2020-09-12 11:33             ` [bug#43249] Brendan Tildesley
2020-09-12 12:21               ` [bug#43249] Ricardo Wurmus
2020-09-13 12:43   ` [bug#43249] Brendan Tildesley
2020-09-15 11:50     ` [bug#43249] Prafulla Giri
2020-09-18 13:26       ` [bug#43249] Prafulla Giri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=330470a6-e6d2-e679-32ac-a308d89a5e92@brendan.scot \
    --to=mail@brendan.scot \
    --cc=43249@debbugs.gnu.org \
    --cc=pratheblackdiamond@gmail.com \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).