[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Reimplement using

From: Robert Millan
Subject: Re: [PATCH] Reimplement using
Date: Wed, 19 Aug 2009 17:31:42 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Mon, Aug 17, 2009 at 04:27:51PM +0200, Vladimir 'phcoder' Serbinenko wrote:
> >> 1) stat and readlink are different. Does anyone have an idea how to
> >> make scripts always use right syntax?
> >
> > AFAIK a custom autoconf snippet is the only way.
> I would prefer it to be done on runtime if possible.


> >  Do you know how to reliably
> > identify GNU-incompatible readlink?
> Perhaps "readlink --version | head -n 1 |grep GNU" ?

It's better to check for features, but if we have to check for vendor, there's

> > I'm not sure what "readlink -f /" will do
> > on FreeBSD.
> >
> It complains about unknown option.

Does it exit non-zero?  Then the check is simple.

> >> -  if path=`readlink -f $path` ; then : ; else
> >> +  if path=`realpath $path` ; then : ; else
> >
> > Note that this introduces an external dependency on GNU systems (readlink is
> > part of coreutils), which better be avoided (specially since the version of
> > realpath commonly used there has a problematic license).
> >
> On FreeBSD it's a part of base system AFAIR. GNU readlink is available
> through ports but is named greadlink. Perhaps we should try in script
> first realpath and if it's not found try readlink?

I was concerned about the other realpath, usually found in GNU/Linux
distributions.  Anyway, we could check greadlink, then readlink and
then realpath.

> >> 3) Version isn't detected correctly.
> >
> > Since this part is not in your patch, can you explain the problem?
> >
> I haven't looked in it but I guess the problem is that the kernel is
> named just "kernel" with no version string.

Oh, right.

Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]