You are not logged in.

#1 2007-02-27 09:19:29

yurac
Member
Registered: 2007-01-24
Posts: 3

Building and maintaining modified packages

Is there some methodology for that ? I will explain exactly what I mean.

I don't build new packages, however, many times I want to customize an existing package.
I need mplayer with freebidi support - freebidi is not supported by default. So i want to add a corresponding flag in mplayer PKGBUILD and build it. Now I have the following questions:

1) I don't want mplayer to be upgraded each time I do system upgrade. The only solution I see is to name the package differently - for example mplayer-custom. I don't know exactly how to do that. I also guess that this solution is not very neat as it requires massive changes in the PKGBUILD and renaming the source tree. And what if I want to synchronize to the latest mplayer version in the abs each time - any way to automate that?

2) Instead of mplayer, suppose that we have some library that is required by other package. I tried to build a modified version of this library. I used the 'provides' and 'conflicts' variables in PKGBUILD to ensure that the new library name replaces the old one. However, when i tried to install the new library, neither 'pacman -A' nor 'pacman -U' worked for me - it complained that the old library is required by other packages and can not be removed. Is it a bug in pacman or I miss something here?

Offline

#2 2007-02-27 09:55:05

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

Re: Building and maintaining modified packages

yurac wrote:

I don't want mplayer to be upgraded each time I do system upgrade.

The simplest way to achieve this is to pu mplayer on an IgnorePkg line in /etc/pacman.conf.

yurac wrote:

The only solution I see is to name the package differently - for example mplayer-custom. I don't know exactly how to do that.

Change pkgname= as required in the PKGBUILD.

yurac wrote:

I also guess that this solution is not very neat as it requires massive changes in the PKGBUILD and renaming the source tree.

Renaming of the source tree is not required, and I wouldn't characterise the PKGBUILD changes as massive myself - pkgname as above, and the addition of provides= and conflicts=.

yurac wrote:

And what if I want to synchronize to the latest mplayer version in the abs each time - any way to automate that?

Write a script.

yurac wrote:

when i tried to install the new library, neither 'pacman -A' nor 'pacman -U' worked for me - it complained that the old library is required by other packages and can not be removed. Is it a bug in pacman or I miss something here?

It's not a bug - that's the way pacman works at present. Have a look in the bugtracker to see if this feature has already been requested - if not, post the request yourself. In the meantime the workaround is

pacman -Rd <standard_package> && pacman -A <custom_package>

Offline

Board footer

Powered by FluxBB