Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 764881 - media-video/aegisub: fails to configure when /bin/sh is a syslink to dash
Summary: media-video/aegisub: fails to configure when /bin/sh is a syslink to dash
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Nick Sarnie
Depends on:
Blocks: nonbash
  Show dependency tree
Reported: 2021-01-10 22:00 UTC by James McClain
Modified: 2021-01-11 02:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Make dash compatible. (dash.patch,934 bytes, patch)
2021-01-10 22:00 UTC, James McClain
Details | Diff
build.log + emerge --info.txt (build.log-emerge-info.txt,11.51 KB, text/plain)
2021-01-10 22:18 UTC, Ionen Wolkens
Make dash compatible (improved) (avoid-conveying-positional-parameters-to-source-builtin.patch,1.79 KB, patch)
2021-01-10 23:38 UTC, Kerin Millar
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James McClain 2021-01-10 22:00:30 UTC
Created attachment 682297 [details, diff]
Make dash compatible.

Aegisub's configure script fails at the "checking for version" configure
step, because the line '. $srcdir/build/ "$srcdir"' in
'' doesn't work in dash.

I've attached a patch that'll make it work by replacing this:

. $srcdir/build/ "$srcdir"

with this:

set -- "$srcdir"
. $srcdir/build/
set -- $old

Which saves the old configure arguments before modifying them with 'set --' and then restores them after sourcing ''.
Comment 1 Ionen Wolkens gentoo-dev 2021-01-10 22:18:01 UTC
Created attachment 682309 [details]
build.log + emerge --info.txt

Can confirm, attaching own logs/info for completeness.
Comment 2 Nick Sarnie gentoo-dev 2021-01-10 22:19:54 UTC
Thanks for the patch, can you make a PR please

Comment 3 Kerin Millar 2021-01-10 23:03:14 UTC
The given patch could, in principle, damage the original positional parameter list. There is actually no need to manipulate the positional parameter list at all. I shall attach a cleaner patch momentarily.
Comment 4 Kerin Millar 2021-01-10 23:38:41 UTC
Created attachment 682318 [details, diff]
Make dash compatible (improved)

Revised patch that works by simply allowing for the sourced file to leverage the fact that the needed variable is already set. The hunk that applies to could be rendered neater still by instead removing the srcdir="$1" line. However, I had it retain the ability to collect the value from $1 for the reason stated in the commit message.
Comment 5 Nick Sarnie gentoo-dev 2021-01-10 23:46:23 UTC
Thanks, can you make a github PR?
Comment 6 Kerin Millar 2021-01-10 23:55:01 UTC
(In reply to Nick Sarnie from comment #5)
> Thanks, can you make a github PR?

I cannot in this instance. I disapprove of GitHub increasingly becoming the bar for open-source participation and cancelled my account some time ago. That said, if anyone else would like to run with it then they are more than welcome to. Alternatively, I could try emailing it to someone involved with the project.
Comment 7 Nick Sarnie gentoo-dev 2021-01-10 23:57:46 UTC
Okay, do you give me your signed-off-by to push the patch to ::gentoo? I know it's in the patch yourself but I want to double check given your last comment about github. Note that Gentoo only uses github for mirroring and PRs and ::gentoo is not hosted by github.
Comment 8 Kerin Millar 2021-01-11 00:06:42 UTC
Yes, absolutely. Anyone is free to commit/submit the patch wherever/however they please. It's just that I won't personally interact with anyone in a manner that requires me to register at GitHub and to effectively use it as a communication medium.
Comment 9 Larry the Git Cow gentoo-dev 2021-01-11 00:24:04 UTC
The bug has been closed via the following commit(s):

commit 816dd08c61d368ee4f3e82a3bccde83a86bf9de6
Author:     Nick Sarnie <>
AuthorDate: 2021-01-11 00:22:15 +0000
Commit:     Nick Sarnie <>
CommitDate: 2021-01-11 00:23:43 +0000

    media-video/aegisub: Fix build with dash
    Package-Manager: Portage-3.0.12, Repoman-3.0.2
    Signed-off-by: Nick Sarnie <>

 .../aegisub/aegisub-3.2.2_p20160518-r101.ebuild    | 158 +++++++++++++++++++++
 ...g-positional-parameters-to-source-builtin.patch |  47 ++++++
 2 files changed, 205 insertions(+)
Comment 10 Kerin Millar 2021-01-11 01:25:05 UTC
Apparently, the original patch was submitted as a PR against an up and coming fork: See