You are not logged in.

#1 2017-11-13 10:25:30

vsilv
Member
Registered: 2013-11-13
Posts: 13

Modifying the sourcecode of libraries - retaining the depencency tree

Hi there,
I found a bug in a package (in community). I want to (1) work in the cloned git directory to fix the bug and (2) keep the dependencies to the library alive, i.e. that the other packages know the package is still installed. I know that ABS is the way to go but I have no idea how I can at the same time work in the cloned sourcecode of the file and keep the dependencies. It is a python package, so the easiest way would be to rename it and install it using python setup.py develop. The problem is that the other package will not use that library. If I keep the same name as the original (unmodified one), I have to remove the old one and then the dependencies are lost. If I just change the sourcecode of the original directory, it is not the original cloned git repository (since it was copied by makepkg) and I cannot even commit my changes to the repository. How do people normally deal with these problems?

Offline

#2 2017-11-13 11:17:55

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: Modifying the sourcecode of libraries - retaining the depencency tree

`makepkg -e` see `man makepkg` or Patching_in_ABS or clone the upstream repo,  commit a fix to the cloned repo,  adjust the PKGBUILD to use that commit from the cloned repo.
If the change causes ABI or API breakage you will need to fix the affected packages as well.

Offline

#3 2017-11-13 15:14:49

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Modifying the sourcecode of libraries - retaining the depencency tree

vsilv wrote:

If I keep the same name as the original (unmodified one), I have to remove the old one and then the dependencies are lost.

This is incorrect, you are building a new version of the same package -- it has the same pkgname= and therefore it is the same package as far as pacman is concerned.

The fact that it contains different or additional source=() array elements does not matter.

If I just change the sourcecode of the original directory, it is not the original cloned git repository (since it was copied by makepkg) and I cannot even commit my changes to the repository. How do people normally deal with these problems?

You can change the sourcecode (to download your git clone instead of the upstream git repository) and build a new package that has the same name as the old one, and as far as pacman is concerned it is the same package.

Or you can add your changes as .patch files created by `git format-patch`, and apply each change via the `patch`utility as described by the "Patching in ABS" wiki article.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB