eudev-project / eudev

Repository for eudev development
GNU General Public License v2.0
522 stars 147 forks source link

ln does not support -r #58

Closed bkauler closed 11 years ago

bkauler commented 11 years ago

beta4 compiled ok, but failed installation. There is a bug in src/udev/Makefile:

install-exec-hook: if test "$(bindir)" != "$(sbindir)"; then \ $(LN_S) -r $(DESTDIR)$(bindir)/udevadm $(DESTDIR)$(sbindir)/udevadm; \ fi

... -r should not be there, no such option for 'ln'.

bkauler commented 11 years ago

I found that it still fails if the symlink already exists, so it should be this:

$(LN_S) -n -f $(DESTDIR)$(bindir)/udevadm $(DESTDIR)$(sbindir)/udevadm; \

blueness commented 11 years ago

-r means relative to the current location. I agree that its not needed now because $(DESTDIR) should be a full path name, but I'm confused why you got that there is no such option.

The -n and -f are sane. Before I commit this, I'd like to make sure nothing funny is going on with -r. How did you hit the error that there is no such -r option for ln?

eroen commented 11 years ago

I believe (from #60) bkauler uses PuppyLinux, which I again believe (by default) uses BusyBox for its core tools. (Googling for puppylinux busybox coreutils reveals some ancient forum posts to that effect.)

$ busybox ln -sr a b
ln: invalid option -- 'r'
BusyBox v1.21.0 (2013-02-16 00:43:01 CET) multi-call binary.
...

BSD userlands (as brought by https://github.com/aharri/obase et. al.) don't have the -r option either.

bkauler commented 11 years ago

Puppy Linux uses ln from coreutils, not busybox.

I have just checked, Ubuntu Precise Pangolin has coreutils 8.13, in which ln does NOT support -r option. However, Ubuntu Raring (beta) has coreutils 8.20, which DOES have -r for ln.

So, -r is a recent thing. Even die.net does not show it: http://linux.die.net/man/1/ln

blueness commented 11 years ago

Eroen, good call! Okay I'll commit in a minute.

blueness commented 11 years ago

Okay committed, thanks for the report.