Prevent unnecessary builds #87

Closed
opened 2022-02-20 22:23:16 +01:00 by Jef Roosens · 1 comment
Owner

We currently always rebuild a package, even if it hasn't actually changed. This could be mitigated by figuring out a way to first run the pkgver() function without executing the rest of the PKGBUILD. With this information, we could send a HEAD request to the server (or maybe read the database) to check whether the package version is already present.

We currently always rebuild a package, even if it hasn't actually changed. This could be mitigated by figuring out a way to first run the `pkgver()` function without executing the rest of the PKGBUILD. With this information, we could send a HEAD request to the server (or maybe read the database) to check whether the package version is already present.
Jef Roosens added the
enhancement
label 2022-02-20 22:23:16 +01:00
Jef Roosens added this to the 0.2.0 milestone 2022-02-20 22:24:19 +01:00
Author
Owner

Running makepkg --nobuild --nodeps causes makepkg to download all sources & run the pkgver function, without actually starting the build. Makepkg also updates the PKGBUILD file with the new correct version. Because a PKGBUILD is just a Bash script, we could then source it & read the pkgver variable. To get the architecture, uname -m should suffice. With this info, we can send a HEAD request to the package file's endpoint to see whether it exists or not.

Running `makepkg --nobuild --nodeps` causes makepkg to download all sources & run the `pkgver` function, without actually starting the build. Makepkg also updates the `PKGBUILD` file with the new correct version. Because a `PKGBUILD` is just a Bash script, we could then source it & read the pkgver variable. To get the architecture, `uname -m` should suffice. With this info, we can send a HEAD request to the package file's endpoint to see whether it exists or not.
This repository is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: vieter-v/vieter#87
No description provided.