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-13-2011, 11:48 AM
Dave Reisner
 
Default make install fails to replace repo-add

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@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
 
Old 09-13-2011, 12:13 PM
Lukas Fleischer
 
Default make install fails to replace repo-add

On Tue, Sep 13, 2011 at 07:48:18AM -0400, Dave Reisner wrote:
> 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@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.

I actually just double-checked and I can't find any document pointing
out that `ln -f` isn't POSIX'ish [1], [2]. *BSD [3], [4] and BusyBox [5]
support it as well, so I'm not sure about the rationale behind [6].

[1] http://pubs.opengroup.org/onlinepubs/000095399/utilities/ln.html
[2] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ln.html
[3] http://www.openbsd.org/cgi-bin/man.cgi?query=ln
[4] http://www.freebsd.org/cgi/man.cgi?query=ln
[5] http://busybox.net/downloads/BusyBox.html#ln
[6] http://projects.archlinux.org/pacman.git/commit/?id=51ed7dff
 

Thread Tools




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

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