You are not logged in.

#1 2013-05-29 07:51:06

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

[solved]Unable to edit PKGBUILD when updating the official repo

Hi,

  When I update my system using yaourt, I find one cannot edit the PKGBUILD file if the package is in official repository.
  Maybe I can build the package manually like this ABS wiki, but if I update the system using yaourt -Syua, my own PKGBUILD will be overriden.
  And I didn't find the manual metion this.

  So I wrote a shell script to help myself.
  But I also didn't find how to specify PKGBUILD when using makepkg. So I had to copy my own PKGBUILD into the directory to override the original PKGBUILD.

  I think there must be some good methods.
  Thx in advance;)

// edit

if the package updates --> if I update the system using yaourt -Syua,

Last edited by JasonZhang (2013-05-29 09:33:11)

Offline

#2 2013-05-29 08:08:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Unable to edit PKGBUILD when updating the official repo

If I understand you correctly, you can add a field to the official PKGBUILDs called 'modified' and then in pacman.conf add that group to the IgnoreGroup array.

Your customizations wil not get overwritten then.


As for yaourt not letting you edit PKGBUILDs from the official repos, use pacman--that is its job.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-05-29 08:17:30

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

Re: [solved]Unable to edit PKGBUILD when updating the official repo

But if I add the package into the IgnoreGroup, can the package be updated?

Offline

#4 2013-05-29 08:23:47

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Unable to edit PKGBUILD when updating the official repo

Of course; when you update your ABS PKGBUILD and install with makepkg, the package will get updated. It's just that pacman won't do it automatically.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-05-29 08:36:47

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

Re: [solved]Unable to edit PKGBUILD when updating the official repo

Emm, so the user still has to build the package himself if the package is in official repos?
Can pacman update the package (which we modified the PKGBUILD and build with ABS) without overwritten the user's PKGBUILD?

Last edited by JasonZhang (2013-05-30 06:19:55)

Offline

#6 2013-05-29 08:41:25

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [solved]Unable to edit PKGBUILD when updating the official repo

You have to build the package yourself if you want to modify it...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2013-05-29 08:42:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved]Unable to edit PKGBUILD when updating the official repo

JasonZhang wrote:

Emm, so the user still has to build the package himself if the package is in official repos?
Can pacman update the package (which we modified the PKGBUILD and build with ABS) without overwritten the user's PKGBUILD?

No, pacman can't patch the official PKGBUILD and whatever was modified by the user, but have a look at srcpac.

Offline

#8 2013-05-29 09:32:47

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

Re: [solved]Unable to edit PKGBUILD when updating the official repo

karol wrote:
JasonZhang wrote:

Emm, so the user still has to build the package himself if the package is in official repos?
Can pacman update the package (which we modified the PKGBUILD and build with ABS) without overwritten the user's PKGBUILD?

No, pacman can't patch the official PKGBUILD and whatever was modified by the user, but have a look at srcpac.

En, maybe srcpac can do this though I still didn't make it work.(It cannot find PKGBUILD in /var/abs)

Anyway, thank you all very much.

Last edited by JasonZhang (2013-05-29 09:33:50)

Offline

#9 2013-05-29 09:39:41

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved]Unable to edit PKGBUILD when updating the official repo

JasonZhang wrote:

En, maybe srcpac can do this though I still didn't make it work.(It cannot find PKGBUILD in /var/abs)

Please tell us what you did, post the commands you run and their output.

Offline

#10 2013-05-29 10:00:05

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

Re: [solved]Unable to edit PKGBUILD when updating the official repo

$ srcpac --version
srcpac v0.10.9
$ cat /etc/srcpac.d/vim
s#--disable-pythoninterp#--enable-pythoninterp#
$ sudo srcpac -So vim
// the pager less prints out nothing
sed: can't read /var/abs//vim/vim/PKGBUILD: No such file or directory

I followed the manual, but it didn't work.

Last edited by JasonZhang (2013-05-29 10:01:36)

Offline

#11 2013-05-29 10:26:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved]Unable to edit PKGBUILD when updating the official repo

I get the same error, the path is wrong:

sed: can't read /var/abs//vim/vim/PKGBUILD: No such file or directory

The correct one is /var/abs/extra/vim/PKGBUILD.

I also found https://bugs.archlinux.org/task/26573 and it looks like srcpac is practically unmaintained.

Offline

#12 2013-05-29 10:34:55

JasonZhang
Member
From: Shanghai, P.R.C
Registered: 2013-02-01
Posts: 21

Re: [solved]Unable to edit PKGBUILD when updating the official repo

karol wrote:

I get the same error, the path is wrong:

sed: can't read /var/abs//vim/vim/PKGBUILD: No such file or directory

The correct one is /var/abs/extra/vim/PKGBUILD.

I also found https://bugs.archlinux.org/task/26573 and it looks like srcpac is practically unmaintained.

Thanks.
Maybe it should be removed from extra:)

Offline

Board footer

Powered by FluxBB