[pacman-dev] make install fails to replace repo-add

Dave Reisner d at falconindy.com
Tue Sep 13 07:48:18 EDT 2011


On Tue, Sep 13, 2011 at 01:33:08PM +0200, Lukas Fleischer wrote:
> On Tue, Sep 13, 2011 at 07:25:29AM -0400, Dave Reisner wrote:
> > On Tue, Sep 13, 2011 at 07:00:27AM -0400, Dan McGee wrote:
> > > On Tue, Sep 13, 2011 at 6:54 AM, Sergej Pupykin <ml at sergej.pp.ru> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I have got following from "make install DESTDIR=..."
> > > >
> > > > cd /home/sergej/extent/pacman.git/PKG/usr/bin && \
> > > >        ( ln -s repo-add repo-elephant || \
> > > >        ln repo-add repo-elephant || \
> > > >        cp repo-add repo-elephant )
> > > > ln: failed to create symbolic link `repo-elephant': File exists
> > > > ln: failed to create hard link `repo-elephant': File exists
> > > > cp: `repo-add' and `repo-elephant' are the same file
> > > > make[4]: *** [install-data-hook] Error 1
> > > > make[4]: Leaving directory `/home2/home/sergej/pacman.git/scripts'
> > > > make[3]: *** [install-data-am] Error 2
> > > > make[3]: Leaving directory `/home2/home/sergej/pacman.git/scripts'
> > > > make[2]: *** [install-am] Error 2
> > > > make[2]: Leaving directory `/home2/home/sergej/pacman.git/scripts'
> > > > make[1]: *** [install-recursive] Error 1
> > > > make[1]: Leaving directory `/home2/home/sergej/pacman.git/scripts'
> > > > make: *** [install-recursive] Error 1
> > > >
> > > > Problem probably here:
> > > >
> > > > scripts/Makefile.am
> > > >
> > > > install-data-hook:
> > > >        cd $(DESTDIR)$(bindir) && \
> > > >                ( $(LN_S) repo-add repo-elephant || \
> > > >                ln repo-add repo-elephant || \
> > > >                cp repo-add repo-elephant )
> > > >        cd $(DESTDIR)$(bindir) && \
> > > >                ( $(LN_S) repo-add repo-remove || \
> > > >                ln repo-add repo-remove || \
> > > >                cp repo-add repo-remove )
> > > 
> > > This probably wasn't tested with existing files in the way since none
> > > of us have done that. Dave, I think we just need to add a `rm -f
> > > <foobar>` call in this command?
> > > 
> > > -Dan
> > > 
> > 
> > Either that or add an -f flag to ln/cp. Not sure if that's portable.
> 
> I think we should go with rm(1) [1].
> 
> [1] http://mailman.archlinux.org/pipermail/pacman-dev/2011-June/013562.html
> 

This means that we need to hope that the $(RM) macro does the right
thing on systems where the -f flag doesn't exist for rm.

d


More information about the pacman-dev mailing list