install: Fix failed to create symbolic link hwlatdetect file exists
RFC PATCH 1/1 install: Fix failed to create symbolic link hwlatdetect file exists
The following build error can occur if you have done a previous make install
if test -n "/usr/lib/python2.7/site-packages" ; then \ install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \ ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \
fi
ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists
make: *** [install] Error 1
Fix the error by removing the symbolic link.
--- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Makefile +1 -0
@@ -125,6 +125,7 @@ install: all cp $(TARGETS) "$(DESTDIR)$(bindir)" if test -n "$(PYLIB)" ; then \ install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \ + rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \ ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \ fi install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
Signature · 1 line
1.7.7.6
Quoted 3 lines · John Kacur
install -D -m 755
src/hwlatdetect/hwlatdetect.py$(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
+ rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
Why an additional command?
Just change "ln -s" to "ln -sf"...
Signature · 6 lines
Thanks, //richard -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · richard -rw- weinberger
Quoted 3 lines · John Kacur
install -D -m 755
src/hwlatdetect/hwlatdetect.py$(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
+ rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \Why an additional command?
Just change "ln -s" to "ln -sf"...--
Yup, that's better, but Andrew beat you to it.
Thanks!
John
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html