[Github-comments] [geany/geany] write absolute path to geany bin in desktop file (#2728)

Andy Alt notifications at xxxxx
Wed Jan 20 05:00:14 UTC 2021


> This has a few issues IMO:
> 
>     * The way you modify the file _changes the whole line_, meaning that if that rule and the source file are not in sync, it's super hard to diagnose weird content in the installed file (as it ignores the content of the source file).
> 
>     * I don't like modifying a file at install time.  Not only this means you get another set of files before and after installation, this also means that for a lot of people it'll modify build files _as root_ (if they install as root), which is awfully annoying (you get root-owned files you can't modify in a user directory).
> 
>     * The [documentation](https://www.gnu.org/software/automake/manual/automake.html#Extending-Installation) doesn't actually say whether or not `install-data-local` is performed before or after the Automake rules, so it's not guaranteed modifying a file will install it.  In practice it's probably the case if it currently works (and I guess the implementation is straightforward and guarantees it), but it's undocumented.
> 

Hmm.. well points 2 and 3 are easily solved by moving the change so that it happens when 'make' is run without 'install'. I definitely agree that we can't have root modifying the file during install after it's been created by someone else when just 'make' is run. Though

> it'll modify build files as root (if they install as root), which is awfully annoying (you get root-owned files you can't modify in a user directory).

I don't think the file would ever be owned by root if created by someone else, and it's just changed during 'make install'. But still, it would be better to have the modification done during 'make' w/o install.

I only kind of understood your first point.

>     * The way you modify the file _changes the whole line_, meaning that if that rule and the source file are not in sync, it's super hard to diagnose weird content in the installed file (as it ignores the content of the source file)

If I understood it right, that's easy enough to fix by changing the Exec line to something like `Exec=DEST_BIN_PATH` and then have sed look for that exact line and do a replacement, and throw an error if the match isn't found at all.

> I'll abuse of my dictatorship here and say that if we want this we'll use my set of changes ([b4n at 884309b](https://github.com/b4n/geany/commit/884309bd6e7969f7b2d01592fa6741cd76b1580b)), unless of course anybody has specific concerns about it.

That's fine by me, whatever works and you find satisfactory. :) Thank you for explaining your reasoning.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2728#issuecomment-763332831
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210119/7ce7bb81/attachment.htm>


More information about the Github-comments mailing list