coreutils ls color (was: another question...)
Rodolfo Aramayo
raramayo at gmail.com
Tue May 10 08:04:31 PDT 2011
On Tue, May 10, 2011 at 09:47, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On May 10, 2011, at 09:31, Rodolfo Aramayo wrote:
>
> > On Tue, May 10, 2011 at 09:03, Alexander Skwar wrote:
> >
> >> are you really sure?
> >
> > It works of that I am sure
> >
> >> Why should PS1 (the prompt value)
> >> have anything to do with ls showing color (or not)? There's
> >> no connection between those two settings and your, how
> >> you call it, "rationale" doesn't explain this.
> >
> > Again. It works.
>
> Not as far as I can see. Setting PS1 sets your shell prompt; that's all. It
> has nothing to do with how the ls program or any other program functions.
> Perhaps there's another line in your profile that you've added that's
> relevant.
>
>
> >> Oh, and BTW: What you discovered is IMO *the* prime
> >> reason, why it's a BAD idea to have GNU stuff "too early"
> >> in the $PATH. Other ("system") tools might expect a certain
> >> behaviour after having figured out the operating system. Hence
> >> it's bad to have ls/tar/… way up front, if your not really on a GNU
> >> system (which you aren't, when you're on OS X).
> >>
> >
> > You might be right. I am making the assumption that "system" tools will
> use Apple paths whereas MacPorts-installed software will use port paths. The
> fact that Apple uses PS1 call for example in /etc/bashrc file to control
> Bash behavior gave me the courage to add PS1 calls to my /etc/profile file.
> Remember this is only controlling terminal behavior. But even if it were
> not, I can see how things could go wrong if I were forcing the system to
> JUST use ports compilers, but this is not the case. The programs, ls/tar/
> and so on should not really affect system behavior as in they have the same
> function from those in the system. But again, you might be absolutely
> right....and if you are, you shall be the first one to know
>
> This thread should have demonstrated to you that GNU ls and BSD ls have
> differences which can affect how you use them. Perhaps it's unlikely that
> any build scripts will use ls, or if they do, then they won't use advanced
> features that might differ. But GNU tar and BSD tar might also have subtle
> differences that might cause problems for programs that expect the one but
> find the other. Ideally, programs would check to see what version of these
> programs are available, but some might make the assumption that, on Mac OS
> X, the BSD versions are being used, and then might fail oddly if the GNU
> versions are there instead.
>
> MacPorts used to optionally allow users to install GNU programs without
> their "g" prefix, thus making them override the BSD versions provided by Mac
> OS X. This caused many problems within MacPorts so we removed this
> possibility and changed it to install the unprefixed versions in a separate
> directory. Users are now welcome to add that unprefixed directory to their
> PATH if they wish, which at least means that software built using MacPorts
> will not be affected (because MacPorts does not use your PATH). You can read
> more about the problem here if you're interested:
>
> https://trac.macports.org/ticket/20748
>
>
I agree and you are right GNU and BSD can be very different
Now if MacPorts does not use my PATH certainly Apple will not either, so the
problem will be restricted to programs not installed by either Apple or
MacPorts, which is a minority..??
Interestingly I was not aware of that you guys had run into problems
before...which begs the question: why did you? you just told me that
MacPorts does not use my paths so why was MacPorts software compilation
affected by the PATH set by the user??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110510/c225b158/attachment.html>
More information about the macports-users
mailing list