Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#57719 - [publicsuffix-list] pkgver is not based on the source code version

Attached to Project: Arch Linux
Opened by Erich Eckner (deepthought) - Monday, 05 March 2018, 11:05 GMT
Last edited by Levente Polyak (anthraxx) - Wednesday, 21 March 2018, 00:55 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:

During the execution of archbuild, makepkg is called at least once w/o the arguments passed by the user via the command line. This makes "--holdver" ineffective.

Steps to Reproduce:
> asp export publicsuffix-list
> cd publicsuffix-list
> grep 'pkgver=' PKGBUILD
> extra-x86_64-build -- -- --holdver
> grep 'pkgver=' PKGBUILD

The log of the above commands is attached.
   log (4.3 KiB)
This task depends upon

Closed by  Levente Polyak (anthraxx)
Wednesday, 21 March 2018, 00:55 GMT
Reason for closing:  Implemented
Additional comments about closing:  20180320.657.a39f111
Comment by Eli Schwartz (eschwartz) - Monday, 05 March 2018, 13:20 GMT
This terrible PKGBUILD calls in pkgver()

printf "%s.%s.%s" "$(date +%Y%m%d --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}")"

holdver does not prevent the pkgver() from running, it just prevents downloading new source commits, so if you checkout git master and use holdver, then you don't download new versions (but if you had them already then you *do* get an updated PKGBUILD).
Comment by Eli Schwartz (eschwartz) - Monday, 05 March 2018, 15:53 GMT
  • Field changed: Summary (archbuild: makepkg called (at least once) without user passed arguments → [publicsuffix-list] pkgver is not based on the source code version)
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Scripts & Tools → Packages: Extra)
  • Field changed: Architecture (All → All)
  • Task assigned to Levente Polyak (anthraxx)
Please use, instead,

date +%Y%m%d --date="@$(git log -1 --format=%ct)"

Which will create a version based on the date for the built commit, which is far more interesting to users than the date that the package was built with potentially a really old version. I'm not really sure what the motivation for this pkgver() function is but it seems quite unfortunate.
Comment by loqs (loqs) - Monday, 05 March 2018, 16:04 GMT
Are there any advantages to
date +%Y%m%d --date="@$(git log -1 --format=%ct)"
over
TZ=UTC git show -s --pretty=%cd --date=format-local:%Y%m%d HEAD
as used by linux-firmware?
Comment by Eli Schwartz (eschwartz) - Tuesday, 06 March 2018, 14:38 GMT
Actually, yeah, that looks a lot nicer.
Comment by Levente Polyak (anthraxx) - Tuesday, 06 March 2018, 15:00 GMT
sounds good, gonna pick that

Loading...