[Pm-utils] symlinks not relative

Victor Lowther victor.lowther at gmail.com
Wed Apr 30 16:38:32 PDT 2008

On Wed, 2008-04-30 at 15:22 -0700, Dan Nicholson wrote:
> On Wed, Apr 30, 2008 at 3:00 PM, Till Maas <opensource at till.name> wrote:
> >
> >  currently the symlinks that are created in pm-utils (pm-suspend ->
> >  pm-action, ...) are not relative,. Is it easily possible to change these to
> >  be relative symlinks? This would have the advantage, that they would also
> >  work, when the root file system is mounted somewhere else than /.

Indeed, it would.  To do it nicely would take some shell script hackery
that I have not taken the time to seriously think about (especially the
bit about making it play nice with automake, which is what we would need
to do to make it elegant).

Having the live root file system mounted somewhere other than / is a bit
non-sequitorial to me -- can you flesh out your scenario a bit more?

> I don't know if it's appropriate to add a perl build dependency to
> pm-utils, but I recently stumbled upon this in doing some RPM
> packaging:
> $ perl -e 'use File::Spec; print
> File::Spec->abs2rel("/usr/lib/pm-utils/bin","/usr/sbin"),"\n"'
> ../lib/pm-utils/bin

I would really rather avoid perl if we can.  Any idea how other projects
solve this (if they even try)?  It seems like a common enough
requirement that the autotools probably have some sort of evil hack that
implements it.

> --
> Dan
> _______________________________________________
> Pm-utils mailing list
> Pm-utils at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pm-utils
Victor Lowther
Ubuntu Certified Professional

More information about the Pm-utils mailing list