Commit d8591dd3 authored by Eli Schwartz's avatar Eli Schwartz Committed by Allan McRae
Browse files

makepkg --packagelist: just list the built package files we will build

Currently this seems to be only theoretically useful. The most likely
reason for wanting a packagelist is in order to script makepkg and
derive the filenames for the packages we want to install or repo-add,
but in the current implementation this requires a lot of additional
post-processing which must be duplicated in every utility to wrap

- It is of minimal use to know what packages might get created on some
  other device utilizing a different CPU/OS architecture, so don't list
- It is non-trivial to reimplement makepkg's logic for sourcing any of
  several makepkg.conf configuration files, then applying environment
  overrides in order to get the PKGDEST and PKGEXT, so include them
  directly in the returned filenames.
- Output is delimited by newlines, for readability. For maximum
  parsing reliability, libmakepkg needs to learn how to lint the PKGDEST
  and PKGEXT variables to ensure they do not contain newlines, which
  will be submitted in a separate patch.

Signed-off-by: Eli Schwartz's avatarEli Schwartz <>
Signed-off-by: Allan McRae's avatarAllan McRae <>
parent a100cd6b
......@@ -200,8 +200,8 @@ Options
useful if you are redirecting makepkg output to file.
List the packages that would be produced without building. Listed
package names do not include PKGEXT.
List the package filenames that would be produced without building. Listed
package filenames include PKGDEST and PKGEXT.
Generate and print the SRCINFO file to stdout.
......@@ -149,14 +149,12 @@ print_all_package_names() {
local version=$(get_full_version)
local architecture pkg opts a
for pkg in ${pkgname[@]}; do
get_pkgbuild_attribute "$pkg" 'arch' 1 architecture
architecture=$(get_pkg_arch $pkg)
get_pkgbuild_attribute "$pkg" 'options' 1 opts
for a in ${architecture[@]}; do
printf "%s-%s-%s\n" "$pkg" "$version" "$a"
if in_opt_array "debug" ${opts[@]} && in_opt_array "strip" ${opts[@]}; then
printf "%s-%s-%s-%s\n" "$pkg" "@DEBUGSUFFIX@" "$version" "$a"
printf "%s/%s-%s-%s%s\n" "$PKGDEST" "$pkg" "$version" "$architecture" "$PKGEXT"
if in_opt_array "debug" ${opts[@]} && in_opt_array "strip" ${opts[@]}; then
printf "%s/%s-%s-%s-%s%s\n" "$PKGDEST" "$pkg" "@DEBUGSUFFIX@" "$version" "$architecture" "$PKGEXT"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment