Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409811 - app-text/rarian-0.8.1-r1: scrollkeeper-update needs update for Darwin getopt
Summary: app-text/rarian-0.8.1-r1: scrollkeeper-update needs update for Darwin getopt
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-27 00:06 UTC by Stuart Shelton
Modified: 2012-08-08 18:37 UTC (History)
2 users (show)

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


Attachments
rarian-sk-update.patch (rarian-sk-update.patch,534 bytes, text/plain)
2012-03-27 00:06 UTC, Stuart Shelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stuart Shelton 2012-03-27 00:06:22 UTC
Created attachment 306805 [details]
rarian-sk-update.patch

usr/bin/scrollkeeper-update (a symlink to 'rarian-sk-update') requires GNU getopt, but doesn't check that this is present.

The attached patch allows the script to work with Darwin getopt.

(Bug 286793, which it looks as if I also raised back in 2009, covers the same issue - there I suggested making getopt-long a dependency and changing 'getopt' to 'getopt-long'.  Still a possibility?)
Comment 1 Fabian Groffen gentoo-dev 2012-04-30 18:59:25 UTC
This looks a lot like rarian-0.6.0-posix-getopt.patch that was introduced in 2007, and dropped in 2009.  It is necessary for FreeBSD and Darwin indeed.

@gnome: any chance we could get back the posix-getopt patch back, possibly conditional patch-time, or runtime (as stuart's patch) for those platforms who really need it?
Comment 2 Pacho Ramos gentoo-dev 2012-05-01 09:16:30 UTC
I would apply it only for prefix affected arches :-/
Comment 3 Fabian Groffen gentoo-dev 2012-05-01 09:21:04 UTC
fine with me, that would be (IMO):

[[ ${CHOST} != *-linux-gnu ]] && epatch posix-thing.patch
Comment 4 Fabian Groffen gentoo-dev 2012-05-01 09:22:56 UTC
@bsd: do you guys ship with GNU getopt or a GNU-compatible getopt these days?  If so, the check would indeed have to only match on Prefix, e.g. if use prefix && [[ ${CHOST} != *-linux-gnu ]] ; then epatch posix-thing.patch; fi
Comment 5 Naohiro Aota gentoo-dev 2012-05-02 02:29:23 UTC
(In reply to comment #4)
> @bsd: do you guys ship with GNU getopt or a GNU-compatible getopt these
> days?  If so, the check would indeed have to only match on Prefix, e.g. if
> use prefix && [[ ${CHOST} != *-linux-gnu ]] ; then epatch posix-thing.patch;
> fi

/usr/bin/getopt is FreeBSD's one. We also have /usr/bin/getopt-long from app-misc/getopt
Comment 6 Naohiro Aota gentoo-dev 2012-06-02 04:05:33 UTC
How is this going?
Comment 7 Gilles Dartiguelongue gentoo-dev 2012-08-08 15:41:03 UTC
I'd rather not have such a simple patch optional based on whatever criteria. Was a an upstream report for this yet ?
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-08-08 18:37:56 UTC
IMHO the correct solution is to just use getopt-long on non-linux systems.

I've submitted a patch upstream at https://bugs.freedesktop.org/show_bug.cgi?id=53264 to allow the getopt command to be set at configure time. In the ebuild, it's simpler to just use a sed and avoid autoreconf.

>*rarian-0.8.1-r2 (08 Aug 2012)
>
>  08 Aug 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
>  +rarian-0.8.1-r2.ebuild:
>  Use getopt-long on non-linux systems (bug #409811, thanks to Stuart Shelton,
>  Fabian Groffen, Naohiro Aota).