You are not logged in.

#1 2012-09-08 13:34:47

wims
Member
Registered: 2009-05-26
Posts: 15

Overwriting existing files and the .install scripts

Good day,
I am building my first PKGBUILD and I have run into a problem. The package I'm building is trying overwriting files in /usr/lib/crda. At first I put the file copy instructions in the build() function of my PKGBUILD. However, it complained about existing files and aborted the installation. So I tried to get around this existing file restriction, and built an .install script. However, I needed access to the $srcdir, $pkgver and $USER variables, and those are not passed on to the install script.

I'm guessing I got the concepts wrong somehow, and that overwriting of existing files is done through some other mechanism. Exactly how would I go about creating a PKGBUILD that was able to overwrite existing files?

-Wim

Offline

#2 2012-09-08 16:04:27

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: Overwriting existing files and the .install scripts

Do these files belong to a package or are they generated some other way?


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2012-09-08 20:27:37

gemma
Banned
Registered: 2012-07-11
Posts: 98

Re: Overwriting existing files and the .install scripts

a new package should never overwrite files from other packages, if your package contains files that would overwrite files from another package, then it [ conflicts ] with the other package, and you should put a conflicts=() into your PKGBUILD to ensure the conflicting package is removed before your package is installed

Offline

#4 2012-09-08 22:02:19

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Overwriting existing files and the .install scripts

wims wrote:

At first I put the file copy instructions in the build() function of my PKGBUILD. However, it complained about existing files and aborted the installation.

There are no existing files before you build a package, so either you're not using $pkgdir, and your PKGBUILD is attempting to install directly into the installed system, or else you're on your Nth build attempt and you haven't cleaned out the build directory after the last attempt.

Offline

Board footer

Powered by FluxBB