You are not logged in.

#1 2016-06-14 11:21:57

FillFeile
Member
Registered: 2013-08-07
Posts: 21

[SOLVED] Using "replaces" in an AUR PKGBUILD

Hey there,

I started maintaining a new GTK theme in the AUR. The developer of the theme published a beta version for the new changes that were necessary to get it working with GTK 3.2.

To make testing easier for users I created a "beta" package beside the stable one in the AUR. Now there are two packages:

https://aur.archlinux.org/packages/gtk-theme-numix-sx
https://aur.archlinux.org/packages/gtk- … ix-sx-beta

Meanwhile the beta version is stable and both packages contain the same content.

Now my question: I want to get users that currently use the beta package away from it and towards the stable package. Is there a way to do this without manual intervention for the users?

I read in the wiki that there is the "replaces" option for PKGBUILDs. But it can't be used for AUR packages right?

Thanks in advance and Cheers,

FillFeile

Last edited by FillFeile (2016-06-14 16:12:53)

Offline

#2 2016-06-14 11:40:08

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,667
Website

Re: [SOLVED] Using "replaces" in an AUR PKGBUILD

No, users will have to manually migrate to the different package, "replaces" only works for built packages, i.e. from a repository.

EDIT: Reading the man page suggests that "replaces" is only used during a sysupgrade, so even installing a built package with -U won't take "replaces" into account.

Last edited by WorMzy (2016-06-14 11:43:42)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-06-14 11:52:03

FillFeile
Member
Registered: 2013-08-07
Posts: 21

Re: [SOLVED] Using "replaces" in an AUR PKGBUILD

@WorMzy thanks for your fast answer!

Is there a way to write out some text to the console while installing or upgrading the package to inform users about that change?

Offline

#4 2016-06-14 12:05:12

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,667
Website

Re: [SOLVED] Using "replaces" in an AUR PKGBUILD

You can use post_install and post_upgrade scriptlets in an install file. See the 'INSTALL/UPGRADE/REMOVE SCRIPTING' section in 'man PKGBUILD'. Posting and pinning a comment on the AUR page for the package might help notify users too.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-06-14 12:15:15

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

Re: [SOLVED] Using "replaces" in an AUR PKGBUILD

If they know about the change, there is no need for the post install message.  If they don't know about the change, why would they update?

Just remove the beta package and/or merge it with the main one.


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

Offline

#6 2016-06-14 16:13:22

FillFeile
Member
Registered: 2013-08-07
Posts: 21

Re: [SOLVED] Using "replaces" in an AUR PKGBUILD

Thanks for your feedback! I applied the changes in the AUR.

Offline

Board footer

Powered by FluxBB