Github messages for voidlinux
 help / color / mirror / Atom feed
From: meator <meator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: New package: xremap-0.4.4
Date: Wed, 20 Jul 2022 17:15:04 +0200	[thread overview]
Message-ID: <20220720151504.BEEZfkgDLOS7bucZ7MYFgEHXU_R9EaW4xcH42EBqyZ8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-38149@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2957 bytes --]

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/38149#issuecomment-1190414781

Comment:
> Also, please generate and install shell completions

This won't look pretty when you take cross compiling into consideration. I know, I have dealt with these issues before. There are four ways this can be solved (sorted by their usefulness):
1. Ask upstream to distribute completion scripts in their own files in the repo instead of embedding them into the program (it seems that they're using some automatic system that generates the completions but distributing the files separately is way more practical in my opinion). You could then simply `vcompletion` these files in `post_install()`.

2. Add `xremap` to `hostmakedepends` when `$CROSS_BUILD`ing. I know, this seems strange. `xremap` depending on `xremap`? This won't create an infinite loop because this dependency is active only if `$CROSS_BUILD` is defined. This dependency means that the cross compiled version (the version that's in `$XBPS_TARGET_MACHINE` and that `xbps-src` can't directly execute) depends on the natively compiled version (the `$XBPS_MACHINE` architecture which can be executed) of `xremap`. There are two things you can do with the native version of `xremap`:
   1. Steal the completion from the native version.

      You could generate the completions normally when you aren't cross compiling and then "steal" these completions from the native package when you are cross compiling (copy them from `/usr/share/<the three shell dependent completion directories>` which was populated by the native package into `$DESTDIR`). I do not know how would the Void maintainers think of this but this seems like the simplest solution. This would normally be unacceptable, but since shell completions aren't architecture dependent, this shouldn't matter.

   2. Generate the completions with the native version.

      You could run `xremap --completions <the shells>` with the **native** version and put the completions in the appropriate locations in `$DESTDIR` (this would probably require some temporary files if you would want to use `vcompletion`). This is a bit similar to 3a9aeacde03485588f78984c4baf040ab003dd32.

   This solution is good because the completions would be automatically retrieved when an update changes them (which isn't true for the third solution).
3. Make a `srcpkgs/xremap/files` (i.e. `$FILESDIR`) directory, manually generate the files and put them there (and add them to this PR). Then `post_install()` would `vcompletion` these files.

   I don't really like this solution because every time the completions would change, the files in `$FILESDIR` would have to be updated.
4. Do not include the completions in the package. You might not call this a "solution" but it is the simplest thing to do.

If you have any questions than please comment on this.

What do you think @tranzystorek-io?

  parent reply	other threads:[~2022-07-20 15:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20  7:16 [PR PATCH] " akhiljalagam
2022-07-20  7:28 ` [PR REVIEW] " meator
2022-07-20  7:29 ` [PR PATCH] [Updated] " akhiljalagam
2022-07-20  7:30 ` akhiljalagam
2022-07-20 13:22 ` tranzystorek-io
2022-07-20 15:15 ` meator [this message]
2022-07-20 15:20 ` tranzystorek-io
2022-07-20 15:38 ` meator
2022-07-21  2:51 ` gbrlsnchs
2022-07-21 10:48 ` [PR PATCH] [Updated] " akhiljalagam
2022-07-21 10:48 ` akhiljalagam
2022-07-21 10:49 ` akhiljalagam
2022-07-21 10:58 ` [PR REVIEW] " tranzystorek-io
2022-07-21 11:02 ` akhiljalagam
2022-07-21 11:02 ` akhiljalagam
2022-07-21 11:03 ` tranzystorek-io
2022-07-21 11:04 ` [PR PATCH] [Updated] " akhiljalagam
2022-07-21 11:14 ` meator
2022-10-20  2:14 ` github-actions
2022-11-04  2:13 ` [PR PATCH] [Closed]: " github-actions

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

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

  git send-email \
    --in-reply-to=20220720151504.BEEZfkgDLOS7bucZ7MYFgEHXU_R9EaW4xcH42EBqyZ8@z \
    --to=meator@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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.
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 NNTP newsgroup(s).