makepkg: fix .PKGINFO/.BUILDINFO files swallowing status printing
The respective write_* functions are low-level and shouldn't be
outputting statuses; move these to the logic flow where they are used.
This ensures the functions can be used in the future wherever, and also
solves an issue where, as fallout from the message.sh retrofitting in
commit 882e707e40
, the statuses got
redirected to the actual files.
The resulting package was technically correct, except that it contained
useless lines which pacman ignored, and repo-add also ignored but at the
same time generated an error message:
/usr/bin/repo-add: line 335: declare: `=-> Generating .PKGINFO file...': not a valid identifier
Thirdparty package tools with stricter parsers may abort with errors,
and "repose" is known to do so.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
635a9c911c
commit
3dfec574a3
1 changed files with 2 additions and 3 deletions
|
@ -634,7 +634,6 @@ write_pkginfo() {
|
||||||
|
|
||||||
merge_arch_attrs
|
merge_arch_attrs
|
||||||
|
|
||||||
msg2 "$(gettext "Generating %s file...")" ".PKGINFO"
|
|
||||||
printf "# Generated by makepkg %s\n" "$makepkg_version"
|
printf "# Generated by makepkg %s\n" "$makepkg_version"
|
||||||
printf "# using %s\n" "$(fakeroot -v)"
|
printf "# using %s\n" "$(fakeroot -v)"
|
||||||
|
|
||||||
|
@ -672,8 +671,6 @@ write_pkginfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
write_buildinfo() {
|
write_buildinfo() {
|
||||||
msg2 "$(gettext "Generating %s file...")" ".BUILDINFO"
|
|
||||||
|
|
||||||
write_kv_pair "format" "1"
|
write_kv_pair "format" "1"
|
||||||
|
|
||||||
write_kv_pair "pkgname" "$pkgname"
|
write_kv_pair "pkgname" "$pkgname"
|
||||||
|
@ -728,7 +725,9 @@ create_package() {
|
||||||
msg "$(gettext "Creating package \"%s\"...")" "$pkgname"
|
msg "$(gettext "Creating package \"%s\"...")" "$pkgname"
|
||||||
|
|
||||||
pkgarch=$(get_pkg_arch)
|
pkgarch=$(get_pkg_arch)
|
||||||
|
msg2 "$(gettext "Generating %s file...")" ".PKGINFO"
|
||||||
write_pkginfo > .PKGINFO
|
write_pkginfo > .PKGINFO
|
||||||
|
msg2 "$(gettext "Generating %s file...")" ".BUILDINFO"
|
||||||
write_buildinfo > .BUILDINFO
|
write_buildinfo > .BUILDINFO
|
||||||
|
|
||||||
# check for changelog/install files
|
# check for changelog/install files
|
||||||
|
|
Loading…
Add table
Reference in a new issue