You are not logged in.

#1 2024-03-10 19:15:51

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Update PKGBUILD package version without building package

By considering a PKGBUILD with a git source, like the following:

pkgname=name
pkgver=165.8f9bd4a
pkgrel=1
pkgdesc="Some descr."
arch=('x86_64' 'aarch64')
url="https://github.com/owner/${pkgname}"
license=('GPL3')
depends=()
makedepends=('git')
source=("git+https://github.com/owner/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
...

is there a way to just update the "pkgver" to the latest git commit value without running the package building by makepkg?

I tried to use "updpkgsums" but not working for this purpose.

Offline

#2 2024-03-10 19:20:11

progandy
Member
Registered: 2012-05-17
Posts: 5,259

Re: Update PKGBUILD package version without building package

You can use the ..nobuild / -o option, maybe with --nodeps / -d

makepkg -do

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2024-03-10 19:26:11

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: Update PKGBUILD package version without building package

progandy wrote:

You can use the ..nobuild / -o option, maybe with --nodeps / -d

makepkg -do

Thank you for the answer. The command seems to update the pkgver, but it still downloads the source from git repo. Is there an option to prevent to download the source?

Offline

#4 2024-03-10 19:30:21

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

Re: Update PKGBUILD package version without building package

If you don't acquire the source, there'd be no git repo from which to derive the pkgver.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-03-10 19:33:06

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: Update PKGBUILD package version without building package

Oh yes. True. Since makepkg downloads the git source, is there a way to automatically delete this downloaded folder after the process finishes?

Last edited by D3vil0p3r (2024-03-10 19:35:25)

Offline

#6 2024-03-10 20:00:16

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

Re: Update PKGBUILD package version without building package

That depends.  Is there a way for you to read the man page?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2024-03-10 21:36:53

progandy
Member
Registered: 2012-05-17
Posts: 5,259

Re: Update PKGBUILD package version without building package

Why would you want to do that anyways? If you are an AUR maintainer for that PKGBUILD, then you should not push mere pkgver updates to the AUR and if more has changed you should run a test build first.

https://wiki.archlinux.org/title/AUR_su … ge_content

Do not commit mere pkgver bumps for VCS packages. They are not considered out of date when the upstream has new commits. Only do a new commit when other changes are introduced, such as changing the build process.

Last edited by progandy (2024-03-10 21:37:23)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#8 2024-03-10 21:38:00

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 194

Re: Update PKGBUILD package version without building package

Trilby wrote:

That depends.  Is there a way for you to read the man page?

Already done and no useful info about that. Tried with clean argument with no result.

Last edited by D3vil0p3r (2024-03-10 21:38:19)

Offline

Board footer

Powered by FluxBB