You are not logged in.

#1 2020-07-23 15:47:19

realh
Member
Registered: 2016-12-02
Posts: 13

Adding a patched version of an official package to AUR

I want to add a patched version of vte3 to the AUR, but I've got a problem interpreting or following submission guidelines. I adapted the PKGBUILD for the official package, by changing:

pkgbase=vte3
pkgname=(vte3 vte-common)
pkgver=0.60.3
pkgrel=1

to

pkgbase=vte3-kinetic
pkgname=(vte3 vte-common)
pkgver=0.61.0+kinetic
pkgrel=1

and also changed `source` to my fork on gitlab. This works perfectly locally, but I'm not sure it's suitable for submission, because the guidelines say I should change pkgname, and don't mention pkgbase. Is that just an oversight in the guidelines? I can't get it to work by changing pkgname, because provides and conflicts are both broken.

I tried doing this:

pkgbase=vte3-kinetic
pkgname=(vte3-kinetic vte-kinetic-common)
provides=(vte3 vte-common)
conflicts=(vte3 vte-common)
pkgrel=1

and also changed other things like package_vte3() accordingly. This version can't be installed because it puts vte3-kinetic and vte-kinetic-common in conflict (with each other? with vte3 and vte-common?). Removing "vte-common" from the conflicts line doesn't help either.

If I remove the conflicts line altogether I can install the packages, but only if I manually remove the official vte3 and vte-common first. But then when I try to reinstall gnome-terminal it insists on the official vte3, which can't be installed now because its files clash with mine. roxterm-git also depends on vte3, not "vte3-kinetic", but roxterm-git is happy to use vte3-kinetic. And so is gnome-terminal if pkgname is vte3, but it isn't satisfied with "provides vte3" for some reason. What's going on?

Although my first solution is the only one that works, I can foresee a problem with it. If someone builds roxterm-git against vte3-kinetic, but its dependency is a generic vte3, it won't be able to load if vte3-kinetic gets replaced with the official one missing my patch because it adds to the API. Is there a way to make the depends line of PKGBUILD dynamic/conditional?

I looked at how vte3-ng approached the problem, and saw that they only replace the vte3 physical package and depend on the official vte-common. I guess I could do that, but to be on the safe side I would probably have to keep my vte3 in sync with extra/vte-common, which means I'd have to backport my patch from HEAD to 0.60.3 to start with, and generally cause more work.

Offline

#2 2020-07-23 15:59:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: Adding a patched version of an official package to AUR

You need to put the conflicts and provides in the package functions, providing and conflicting only with that specfic package.

Online

#3 2020-07-23 16:01:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Adding a patched version of an official package to AUR

The 'conflicts' should be placed inside the appropriate package functions rather than globally.  (edit: too slow)

Last edited by Trilby (2020-07-23 16:01:42)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2020-07-23 16:27:59

realh
Member
Registered: 2016-12-02
Posts: 13

Re: Adding a patched version of an official package to AUR

Thanks. That got it working, but I also had to add "=${pkgver}" to my provides to get gnome-terminal to accept it.

Offline

Board footer

Powered by FluxBB