You are not logged in.

#1 2007-09-22 21:59:56

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

creating pacsave/pcnew files

I'm building a package which will probably be overwriting an existing file in /etc . How to I tell the package to create the pacnew or pacsave file if the filed does exist. Also, which one should be created?

Offline

#2 2007-09-22 22:09:21

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

Re: creating pacsave/pcnew files

Use the backup array - man PKGBUILD for details.

However... reading your post again, it sounds like you may want your package to overwrite an /etc file belonging to a different package. This is a package conflict, and it is handled using the conflicts/provides arrays.

Offline

#3 2007-09-22 22:13:09

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: creating pacsave/pcnew files

i think u need an eg. backup=(etc/pacman.conf) line

edit: tomk beat me to it

Last edited by dolby (2007-09-22 22:14:21)


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#4 2007-09-22 22:15:46

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: creating pacsave/pcnew files

I'm installing an app that needs to overwrite a config file.

It isn't provides as my package depends on the one that creates the file I want to overwrite

For the same reason I don't think it is conflicts.

I think it should be backup then as my version of the config file is newer/better than the one already there.

Does that sound ok?

Offline

#5 2007-09-22 22:25:33

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: creating pacsave/pcnew files

I've put the backup line in the PKGBUILD file and rebuilt the package but I'm still getting this error:

error: failed to prepare transaction (conflicting files)
carwhisperer: /etc/bluetooth/hcid.conf exists in filesystem

errors occurred, no packages were upgraded.

My PKGBUILD line is:

backup=(etc/bluetooth/hcid.conf)

I've tried it with and without quotes. Have I missed something else?

Offline

#6 2007-09-23 10:40:13

dolby
Member
From: 1992
Registered: 2006-08-08
Posts: 1,581

Re: creating pacsave/pcnew files

tomk wrote:

However... reading your post again, it sounds like you may want your package to overwrite an /etc file belonging to a different package. This is a package conflict, and it is handled using the conflicts/provides arrays.

the above


There shouldn't be any reason to learn more editor types than emacs or vi -- mg (1)
[You learn that sarcasm does not often work well in international forums.  That is why we avoid it. -- ewaller (arch linux forum moderator)

Offline

#7 2007-09-23 11:31:37

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: creating pacsave/pcnew files

It won't work. Your best bet is to rename that file in your package. Or put it somewhere else and use an .install message with instructions on how to use it.


1000

Offline

Board footer

Powered by FluxBB