You are not logged in.

#1 2021-08-04 22:04:39

MountainX
Member
Registered: 2016-02-08
Posts: 360

[SOLVED] How to use package versions in pkg.install script?

The pre_upgrade function in an install script has the option to use these two arguments.

- arg 1:  the new package version
- arg 2:  the old package version

gitlab.archlinux.org/pacman/pacman/raw/master/proto/proto.install

What are the format specifications for the version strings?

It would help me a lot to see several different examples of these arguments being used. I haven't been able to locate any AUR packages yet that use these args in an install script.

Last edited by MountainX (2021-08-04 22:44:04)

Offline

#2 2021-08-04 22:40:01

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

Re: [SOLVED] How to use package versions in pkg.install script?

What do you mean?  The versions strings are just literally the version of the package:
https://wiki.archlinux.org/title/Arch_p … versioning


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

Offline

#3 2021-08-04 22:43:37

MountainX
Member
Registered: 2016-02-08
Posts: 360

Re: [SOLVED] How to use package versions in pkg.install script?

Trilby wrote:

What do you mean?  The versions strings are just literally the version of the package:
https://wiki.archlinux.org/title/Arch_p … versioning

OK, thanks.

EDIT: I was probably too quick to mark this solved because I still have a couple questions after reading your link:

1. will arg 1 ($1) be exactly the string value of $pkgver from the current PKGBUILD?
2. are pkgrel numbers included or not? I assume not, but please confirm.

Last edited by MountainX (2021-08-04 22:50:10)

Offline

#4 2021-08-05 01:21:59

MountainX
Member
Registered: 2016-02-08
Posts: 360

Re: [SOLVED] How to use package versions in pkg.install script?

it turns out that the parameter $1 includes the pkgrel too.

Offline

Board footer

Powered by FluxBB