Gentoo Archives: gentoo-osx

From: Grobian <grobian@g.o>
To: gentoo-osx@l.g.o
Subject: Re: [gentoo-osx] Re: sys-apps/findutils (GNU)
Date: Thu, 10 Nov 2005 06:33:16
Message-Id: 4372E992.9050900@gentoo.org
In Reply to: Re: [gentoo-osx] Re: sys-apps/findutils (GNU) by Nathan
1 Nathan wrote:
2 >> Doesn't that mean that new code that comes to depend on the gfind and
3 >> gxargs usage will also have to be changed at that later date? If you avoid
4 >> this policy now, you avoid that problem later. No-one has yet come up with
5 >> an inadequacy of BSD xargs and find, so why do it? Just for the sake of a
6 >> misguided policy?
7 >
8 > A lack of examples on your part does not a misguided policy make.
9 > Have you ever used both BSD and GNU utils extensively? Even something
10 > as simple as 'ls' doesn't have the same behaviour and flags between
11 > them, not to mention that each version can have changes introduced
12 > upstream without warning. What do you have to gain from using a BSD
13 > util? Saving 100KB in disk space? There's a lot to gain by
14 > installing what Gentoo expects: it may actually work.
15 >
16 > As for xargs specifically, take a peek at the synopsis from the BSD &
17 > Gentoo man pages:
18 >
19 > (BSD/OS X) xargs SYNOPSIS
20 > xargs [-0pt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
21 > [-L number] [-n number [-x]] [-s size] [utility [argument ...]]
22 >
23 > (Gentoo) xargs SYNOPSIS
24 > xargs [-0prtx] [-e[eof-str]] [-i[replace-str]]
25 > [-l[max-lines]] [-n max-args] [-s
26 > max-chars] [-P max-procs] [--null] [--eof[=eof-str]]
27 > [--replace[=replace-str]]
28 > [--max-lines[=max-lines]] [--interactive]
29 > [--max-chars=max-chars] [--verbose]
30 > [--exit] [--max-procs=max-procs] [--max-args=max-args]
31 > [--no-run-if-empty] [--ver-
32 > sion] [--help] [command [initial-arguments]]
33 >
34 > See any potential problems?
35
36 The real problem is -E/-e in this example or when flags don't do exactly
37 the same. Additions by GNU don't have to be a problem.
38
39 >> But, it seems to me that there is a good compromise, along the lines of
40 >> Diego's eselect proposal (similar to Debian's /etc/alternatives). We could
41 >> use eselect or similar to maintain a "symlink farm" of g-prefixed symlinks
42 >> to the GNU binaries. A baselayout revision could safely permit a
43 >> Gentoo-wide policy whereby such gfoo binaries could be called from any
44 >> boot script, tool script etc. In this way, you can avoid having to special
45 >> case the distro in ebuilds and scripts, and you can avoid pulling in
46 >> redundant deps on systems that ship the same binaries without g-prefixes.
47 >> On those systems, the vendor package could just be "eselected" to create
48 >> the symlinks, and indeed the baselayout for such systems could ship with
49 >> the symlinks already in place.
50 >
51 > Assuming I understand your point correctly (which is debatable), that
52 > is an awfully complicated solution whose primary aim seems to ensure
53 > that you don't confuse /some/prefix/bin/someutil with
54 > /usr/bin/someutil by turning one into a symlink to the other. If you
55 > need to figure out which util is called by default in your shell
56 > session, try using 'which'. If you need to _ensure_ that you use OS X
57 > utils while in a shell, a simpler solution would be to not put the
58 > gentoo directories in $PATH in the first place.
59
60 eselect is a nice idea, but only useful for the user. Portage will
61 always prefer to use it's 'own' tools, IMHO. If a user wants to use
62 OSX/xargs instead of GNU/xargs, that user should fiddle with his/her
63 path, don't source the Gentoo prefix script or place a symlink to
64 OSX/xargs in his/her ~/bin (and make that one come first in the path).
65
66 >> That is the only way I can see for compatibility both with the variety of
67 >> Darwin distros, and with the variety of Gentoo OS's.
68 >
69 > Why would Gentoo need to stay compatible with "Darwin distros"? OS X
70 > isn't going anywhere if you install Gentoo in a prefix. The whole
71 > idea is to have a Gentoo package manager installing Gentoo stuff in
72 > it's own little corner of the filesystem. We DO want to keep
73 > gentoo-osx as compatible as possible with all the __other gentoo
74 > arch's__ so that we can leverage all the good work being done for
75 > those arches.
76
77 I think that the first target will be to have maximum compatability with
78 other Gentoo projects, then we can examine which tools we can use from
79 the OS without causing trouble (to minimise the install). I'd like to
80 get it functionally working first. I don't think we kill an alternative
81 path by doing so.
82
83
84 --
85 Fabian Groffen
86 Gentoo for Mac OS X Project -- Interim Lead
87 --
88 gentoo-osx@g.o mailing list

Replies

Subject Author
Re: [gentoo-osx] Re: sys-apps/findutils (GNU) Finn Thain <fthain@××××××××××××××××.au>