You are not logged in.

#1 2014-03-22 07:22:24

davideb01
Member
Registered: 2014-03-13
Posts: 1

makepkg -i causes duplicate target error on split packages

I thought about filing this as a bug but I figured I'd ask here first since I'm new at this.

I'm using makepkg in a script to automatically build and install a custom kernel split package. The PKGBUILD builds the most current tag from a git repository and updates the pkgver. The problem is that this causes the makepkg function update_pkgver() to re source the PKGBUILD file. Normally wouldn't be a problem, except that the additional packages are added using the BASH += operator:

pkgname+=("${pkgbase}-headers" "${pkgbase}-docs" "${pkgbase}-gummiboot")

So instead of three additions there are now six. pkgname is eventually passed to pacman and the duplicates cause 'duplicate target' errors.

Yes, since I know what the problem is, I fixed it on my machine. I added 'unset pkgname' right before the source call in update_pkgver(). But it seems hackish. It took me a while to find out what was wrong. I thought for sure that someone else has had this problem. Surely I can't be the only one unless I'm going about the package build the wrong way.

The full command btw is:

 makepkg -s -i -c -f --needed --noconfirm 

-- Dave

Offline

#2 2014-03-22 08:38:32

progandy
Member
Registered: 2012-05-17
Posts: 5,317

Re: makepkg -i causes duplicate target error on split packages

Can you show use the PKGBUILD? I guess you do something a bit wrong.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2014-03-22 10:38:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: makepkg -i causes duplicate target error on split packages

Why do you += the pkgname array?

Offline

Board footer

Powered by FluxBB