FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-14-2011, 06:03 PM
Dave Reisner
 
Default buildsys: remove existing symlinks before installing

This fixes build errors when performing a manual install straight to a
filesystem where the files already exist.

Reported-by: Sergej Pupykin <ml@sergej.pp.ru>
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
We probably could also just add in the -f flag to the ln/cp calls, but I feel
safer doing it this way. $(RM) will unconditionally expand to 'rm -f'.

doc/Makefile.am | 1 +
scripts/Makefile.am | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index a9aa78f..aa27b50 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -153,6 +153,7 @@ repo-remove.8: repo-add.8

install-data-hook:
cd $(DESTDIR)$(mandir)/man8 &&
+ $(RM) repo-remove.8 &&
( $(LN_S) repo-add.8 repo-remove.8 ||
ln repo-add.8 repo-remove.8 ||
cp repo-add.8 repo-remove.8 )
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 52a784a..d89fd30 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -106,10 +106,12 @@ repo-elephant: $(srcdir)/repo-add.sh.in

install-data-hook:
cd $(DESTDIR)$(bindir) &&
+ $(RM) repo-elephant &&
( $(LN_S) repo-add repo-elephant ||
ln repo-add repo-elephant ||
cp repo-add repo-elephant )
cd $(DESTDIR)$(bindir) &&
+ $(RM) repo-remove &&
( $(LN_S) repo-add repo-remove ||
ln repo-add repo-remove ||
cp repo-add repo-remove )
--
1.7.6.1
 

Thread Tools




All times are GMT. The time now is 03:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org