Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 409811

Summary: app-text/rarian-0.8.1-r1: scrollkeeper-update needs update for Darwin getopt
Product: Gentoo/Alt Reporter: Stuart Shelton <srcshelton>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal CC: bsd+disabled, gnome
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: OS X   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=53264
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: rarian-sk-update.patch

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 (RETIRED) 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).