Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#34974 - [pacman] makepkg substitutes error message if pkgver() fails, causing subsequent builds to fail
Attached to Project:
Pacman
Opened by Alain Kalker (ackalker) - Friday, 26 April 2013, 16:33 GMT
Last edited by Allan McRae (Allan) - Tuesday, 30 April 2013, 11:38 GMT
Opened by Alain Kalker (ackalker) - Friday, 26 April 2013, 16:33 GMT
Last edited by Allan McRae (Allan) - Tuesday, 30 April 2013, 11:38 GMT
|
DetailsDescription:
When pkgver() produces an error, makepkg substitutes the error message in place of the previous version. This causes any future builds (even after fixing pkgver() ) to fail unless the pkgver= is cleaned up manually to remove the trailing garbage left by previous failing attempts. Additional info: * package version(s) * config and/or log files etc. Steps to reproduce: - Try to build an SVN package from AUR using a faulty pkgver() - Fix the pkgver() - Try to build the package again. In a -git package I'm testing, this resulted in the following in PKGBUILD, after two failed attempts, then a fix: pkgver=0.0 No names found, cannot describe anything. No names found, cannot describe anything. |
This task depends upon
Closed by Allan McRae (Allan)
Tuesday, 30 April 2013, 11:38 GMT
Reason for closing: Fixed
Additional comments about closing: git commit c5a4b355
Tuesday, 30 April 2013, 11:38 GMT
Reason for closing: Fixed
Additional comments about closing: git commit c5a4b355
/usr/bin/makepkg:790:sed --follow-symlinks -i "s/^pkgver=[^ ]*/pkgver=$newpkgver/" "$BUILDFILE"
should be something like:
/usr/bin/makepkg:790:sed --follow-symlinks -i "s/^pkgver=[^#]*/pkgver=$newpkgver/" "$BUILDFILE"
in order to remove any error message while preserving any comment after the package version. (I'm not aware of any VCS producing error messages with '#'s in them.)
Would be nice to actually see the PKGBUILD... the error message you cite is written to stderr, not stdout. makepkg does not capture stderr from pkgver().
The pkgver() contains two commands as they occur "in the wild" in the AUR. The first one fails for this Git repo, as it has no tags at all, whether annotated or not.
I've left my (slightly modified from the Wiki) 'working' command commented out, so you can try them both.
The complete log I get from trying to build using this PKGBUILD is:
$ makepkg
==> Making package: testpkg-git 0-1 (Sat Apr 27 01:32:51 CEST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning testpkg git repo...
Cloning into bare repository '/home/miki/pkg/export/testpkg'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 0), reused 5 (delta 0)
Receiving objects: 100% (5/5), done.
==> Validating source files with md5sums...
testpkg ... Skipped
==> Extracting sources...
-> Creating working copy of testpkg git repo...
Cloning into 'testpkg'...
done.
==> Starting pkgver()...
/home/miki/pkg/wip/testpkg-git/PKGBUILD: line 3: No: command not found
==> Updated version: testpkg-git 0-1
==> ERROR: pkgver is not allowed to contain colons, hyphens or whitespace.
and the PKGBUILD on disk is changed as I've explained in the original report.
Additional info:
* package version(s)
pacman 4.1.0-2
to the original report. Sorry for that :)
/usr/bin/makepkg:1454: $pkgfunc 2>&1