You are not logged in.

#1 2019-09-29 10:20:31

ugluk
Member
Registered: 2012-12-07
Posts: 18

PKGBUILD replaces problem

I have a problem with my fastgcc PKGBUILD (you can find it in the AUR).

The PKGBUILD contains:

provides=('gcc' 'gcc-libs')
replaces=('gcc' 'gcc-libs')

but pacman refuses to replace either gcc or gcc-libs. What am I doing wrong? Should I put the lines in the package_fastgcc section?

Offline

#2 2019-09-29 10:32:06

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: PKGBUILD replaces problem

Re-read https://wiki.archlinux.org/index.php/PK … _relations .


Should I put the lines in the package_fastgcc section?

That does seem like a better place, yes.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2019-09-29 10:50:38

ugluk
Member
Registered: 2012-12-07
Posts: 18

Re: PKGBUILD replaces problem

Can you just tell me what's wrong? I'm a C++ programmer, not an arch dev. I hacked the official PKGBUILD so I can enjoy faster compilations.

Offline

#4 2019-09-29 11:06:16

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: PKGBUILD replaces problem

If I understand this correctly, fastgcc is meant as an alternative to the regular gcc. So it should be conflicts=(), not replaces=().

I think it might have been less confusing if replaces=() was named deprecates=() (because a package A can "replace" a package B for at least two reasons). But maybe I'm just getting the terminology wrong.

but pacman refuses to replace either gcc or gcc-libs. What am I doing wrong?

What's the error message?


pkgshackscfgblag

Offline

#5 2019-09-29 11:25:57

ugluk
Member
Registered: 2012-12-07
Posts: 18

Re: PKGBUILD replaces problem

I long suspected gcc compiled with -Ofast and with ld disabled would run faster and fastgcc is a test to see if that was true. And it is and not only that. The standard libraries compiled with -Ofast make my system feel faster somehow. In other words, I am happy, even if it costs an occasional crash - most of the other programs, including the kernel, are not compiled as -Ofast after all.

The error: it just lists all the conflicting files from gcc and gcc-libs and does not want to replace them.

Offline

#6 2019-09-29 11:33:04

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: PKGBUILD replaces problem

ugluk wrote:

The error: it just lists all the conflicting files from gcc and gcc-libs and does not want to replace them.

Yes, that's because the two packages do not conflict (as in: fastgcc does not state that it conflicts with gcc and gcc-libs), so pacman has no reason to remove those packages, leading to the file conflicts.

--edit: So again, put conflicts=(gcc gcc-libs), not replaces=(gcc gcc-libs)

Last edited by ayekat (2019-09-29 11:33:55)


pkgshackscfgblag

Offline

#7 2019-09-29 11:45:00

ugluk
Member
Registered: 2012-12-07
Posts: 18

Re: PKGBUILD replaces problem

I did so, now testing. I really need the faster compile speeds. Waiting takes all fun from programming.

Offline

Board footer

Powered by FluxBB