* [PR PATCH] xbps-src: simplify dbulk-dump output
@ 2021-03-10 21:07 Duncaen
2021-03-10 21:10 ` [PR PATCH] [Updated] " Duncaen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Duncaen @ 2021-03-10 21:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
There is a new pull request by Duncaen against master on the void-packages repository
https://github.com/Duncaen/void-packages dbulk-dump
https://github.com/void-linux/void-packages/pull/29387
xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing those is not important for the builder and
simplifies the output.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
A patch file from https://github.com/void-linux/void-packages/pull/29387.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dbulk-dump-29387.patch --]
[-- Type: text/x-diff, Size: 4160 bytes --]
From bc1e37a4645befa3d8192dced0dd963614330aa3 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 10 Mar 2021 22:01:35 +0100
Subject: [PATCH] xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing those is not important for the builder and
simplifies the output.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
---
common/xbps-src/shutils/build_dependencies.sh | 5 ++---
common/xbps-src/shutils/pkgtarget.sh | 2 +-
xbps-src | 21 +++++++------------
3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index ebf5a0bc131..d60ee556de2 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -32,19 +32,18 @@ setup_pkg_depends() {
if [ -z "$foo" ]; then
msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
else
foo="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
if [ -z "$foo" ]; then
foo="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)"
[ -z "$foo" ] && foo="${_depname}"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
fi
run_depends+="${_depname} "
done
- [[ $out && $_deps ]] && echo "$_deps"
return 0
}
diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh
index 6c6f03ff726..314dc5aeabe 100644
--- a/common/xbps-src/shutils/pkgtarget.sh
+++ b/common/xbps-src/shutils/pkgtarget.sh
@@ -21,7 +21,7 @@ check_pkg_arch() {
esac
done
if [ -z "$nonegation" -a -n "$match" ] || [ -n "$nonegation" -a -z "$match" ]; then
- msg_red "$pkgname: this package cannot be built for ${_arch}.\n"
+ msg_red "${pkgname}-${version}_${revision}: this package cannot be built for ${_arch}.\n"
exit 2
fi
fi
diff --git a/xbps-src b/xbps-src
index a488ed3f849..e2ecbf36e4f 100755
--- a/xbps-src
+++ b/xbps-src
@@ -891,33 +891,28 @@ case "$XBPS_TARGET" in
;;
dbulk-dump)
read_pkg
+ check_pkg_arch "$XBPS_CROSS_BUILD"
for x in pkgname version revision; do
printf '%s: %s\n' "$x" "${!x}"
done
for x in bootstrap; do
[[ ${!x} ]] && printf '%s: %s\n' "$x" "${!x}"
done
- for x in hostmakedepends makedepends depends; do
+ for x in hostmakedepends makedepends; do
arr=(${!x})
if [[ ${#arr} -gt 0 ]]; then
printf '%s:\n' "$x"
printf ' %s\n' "${arr[@]}"
fi
done
+ _cleandeps=$(setup_pkg_depends "" 1 1 | { grep -vF "$(printf "%s\n" $pkgname $subpackages)" || :; } | sort -u) || exit 1
+ if [[ $_cleandeps ]]; then
+ printf 'depends:\n'
+ printf ' %s\n' $_cleandeps
+ fi
if [[ $subpackages ]]; then
printf 'subpackages:\n'
- for x in ${subpackages}; do
- . ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
- ${x}_package
- printf ' %s\n' "$x"
- for x in depends; do
- arr=(${!x})
- if [[ ${#arr} -gt 0 ]]; then
- printf ' %s:\n' "$x"
- printf ' %s\n' "${arr[@]}"
- fi
- done
- done
+ printf ' %s\n' $subpackages
fi
;;
show-options)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: simplify dbulk-dump output
2021-03-10 21:07 [PR PATCH] xbps-src: simplify dbulk-dump output Duncaen
@ 2021-03-10 21:10 ` Duncaen
2021-03-10 21:11 ` Duncaen
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2021-03-10 21:10 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 852 bytes --]
There is an updated pull request by Duncaen against master on the void-packages repository
https://github.com/Duncaen/void-packages dbulk-dump
https://github.com/void-linux/void-packages/pull/29387
xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing those is not important for the builder and
simplifies the output.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
A patch file from https://github.com/void-linux/void-packages/pull/29387.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dbulk-dump-29387.patch --]
[-- Type: text/x-diff, Size: 4339 bytes --]
From b3fa625175d069001534df5dd716b80b23885089 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 10 Mar 2021 22:01:35 +0100
Subject: [PATCH] xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing those is not important for the builder and
simplifies the output.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
and nocross=, there shouldn't be the need to discover archs=
restrictions when attempting to build the package.
---
common/xbps-src/shutils/build_dependencies.sh | 5 ++---
common/xbps-src/shutils/pkgtarget.sh | 2 +-
xbps-src | 21 +++++++------------
3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index ebf5a0bc131..d60ee556de2 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -32,19 +32,18 @@ setup_pkg_depends() {
if [ -z "$foo" ]; then
msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
else
foo="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
if [ -z "$foo" ]; then
foo="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)"
[ -z "$foo" ] && foo="${_depname}"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
fi
run_depends+="${_depname} "
done
- [[ $out && $_deps ]] && echo "$_deps"
return 0
}
diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh
index 6c6f03ff726..314dc5aeabe 100644
--- a/common/xbps-src/shutils/pkgtarget.sh
+++ b/common/xbps-src/shutils/pkgtarget.sh
@@ -21,7 +21,7 @@ check_pkg_arch() {
esac
done
if [ -z "$nonegation" -a -n "$match" ] || [ -n "$nonegation" -a -z "$match" ]; then
- msg_red "$pkgname: this package cannot be built for ${_arch}.\n"
+ msg_red "${pkgname}-${version}_${revision}: this package cannot be built for ${_arch}.\n"
exit 2
fi
fi
diff --git a/xbps-src b/xbps-src
index a488ed3f849..e2ecbf36e4f 100755
--- a/xbps-src
+++ b/xbps-src
@@ -891,33 +891,28 @@ case "$XBPS_TARGET" in
;;
dbulk-dump)
read_pkg
+ check_pkg_arch "$XBPS_CROSS_BUILD"
for x in pkgname version revision; do
printf '%s: %s\n' "$x" "${!x}"
done
for x in bootstrap; do
[[ ${!x} ]] && printf '%s: %s\n' "$x" "${!x}"
done
- for x in hostmakedepends makedepends depends; do
+ for x in hostmakedepends makedepends; do
arr=(${!x})
if [[ ${#arr} -gt 0 ]]; then
printf '%s:\n' "$x"
printf ' %s\n' "${arr[@]}"
fi
done
+ _cleandeps=$(setup_pkg_depends "" 1 1 | { grep -vF "$(printf "%s\n" $pkgname $subpackages)" || :; } | sort -u) || exit 1
+ if [[ $_cleandeps ]]; then
+ printf 'depends:\n'
+ printf ' %s\n' $_cleandeps
+ fi
if [[ $subpackages ]]; then
printf 'subpackages:\n'
- for x in ${subpackages}; do
- . ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
- ${x}_package
- printf ' %s\n' "$x"
- for x in depends; do
- arr=(${!x})
- if [[ ${#arr} -gt 0 ]]; then
- printf ' %s:\n' "$x"
- printf ' %s\n' "${arr[@]}"
- fi
- done
- done
+ printf ' %s\n' $subpackages
fi
;;
show-options)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] xbps-src: simplify dbulk-dump output
2021-03-10 21:07 [PR PATCH] xbps-src: simplify dbulk-dump output Duncaen
2021-03-10 21:10 ` [PR PATCH] [Updated] " Duncaen
@ 2021-03-10 21:11 ` Duncaen
2021-03-10 21:23 ` ericonr
2021-03-12 23:33 ` [PR PATCH] [Merged]: " Vaelatern
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2021-03-10 21:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1034 bytes --]
There is an updated pull request by Duncaen against master on the void-packages repository
https://github.com/Duncaen/void-packages dbulk-dump
https://github.com/void-linux/void-packages/pull/29387
xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing those is not important for the builder and
simplifies the output.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
and nocross=, there shouldn't be the need to discover archs=
restrictions when attempting to build the package.
A patch file from https://github.com/void-linux/void-packages/pull/29387.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-dbulk-dump-29387.patch --]
[-- Type: text/x-diff, Size: 4440 bytes --]
From 087b6230789781e4031f8775516f6e66b6abada8 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Wed, 10 Mar 2021 22:01:35 +0100
Subject: [PATCH] xbps-src: simplify dbulk-dump output
* List dependencies of subpackages as part of the source packages
dependencies, knowing the subpackage they are coming from does
not matter to a build scheduler as long as xbps-src requires
those to exist in the same way to main depends= have to exist.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
and nocross=, there shouldn't be the need to discover archs=
restrictions when attempting to build the package.
---
common/xbps-src/shutils/build_dependencies.sh | 5 ++---
common/xbps-src/shutils/pkgtarget.sh | 2 +-
xbps-src | 21 +++++++------------
3 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index ebf5a0bc131..d60ee556de2 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -32,19 +32,18 @@ setup_pkg_depends() {
if [ -z "$foo" ]; then
msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
else
foo="$($XBPS_UHELPER_CMD getpkgdepname ${_depname} 2>/dev/null)"
if [ -z "$foo" ]; then
foo="$($XBPS_UHELPER_CMD getpkgname ${_depname} 2>/dev/null)"
[ -z "$foo" ] && foo="${_depname}"
fi
- _deps+="$foo "
+ [[ $out ]] && echo "$foo"
fi
run_depends+="${_depname} "
done
- [[ $out && $_deps ]] && echo "$_deps"
return 0
}
diff --git a/common/xbps-src/shutils/pkgtarget.sh b/common/xbps-src/shutils/pkgtarget.sh
index 6c6f03ff726..314dc5aeabe 100644
--- a/common/xbps-src/shutils/pkgtarget.sh
+++ b/common/xbps-src/shutils/pkgtarget.sh
@@ -21,7 +21,7 @@ check_pkg_arch() {
esac
done
if [ -z "$nonegation" -a -n "$match" ] || [ -n "$nonegation" -a -z "$match" ]; then
- msg_red "$pkgname: this package cannot be built for ${_arch}.\n"
+ msg_red "${pkgname}-${version}_${revision}: this package cannot be built for ${_arch}.\n"
exit 2
fi
fi
diff --git a/xbps-src b/xbps-src
index a488ed3f849..e2ecbf36e4f 100755
--- a/xbps-src
+++ b/xbps-src
@@ -891,33 +891,28 @@ case "$XBPS_TARGET" in
;;
dbulk-dump)
read_pkg
+ check_pkg_arch "$XBPS_CROSS_BUILD"
for x in pkgname version revision; do
printf '%s: %s\n' "$x" "${!x}"
done
for x in bootstrap; do
[[ ${!x} ]] && printf '%s: %s\n' "$x" "${!x}"
done
- for x in hostmakedepends makedepends depends; do
+ for x in hostmakedepends makedepends; do
arr=(${!x})
if [[ ${#arr} -gt 0 ]]; then
printf '%s:\n' "$x"
printf ' %s\n' "${arr[@]}"
fi
done
+ _cleandeps=$(setup_pkg_depends "" 1 1 | { grep -vF "$(printf "%s\n" $pkgname $subpackages)" || :; } | sort -u) || exit 1
+ if [[ $_cleandeps ]]; then
+ printf 'depends:\n'
+ printf ' %s\n' $_cleandeps
+ fi
if [[ $subpackages ]]; then
printf 'subpackages:\n'
- for x in ${subpackages}; do
- . ${XBPS_COMMONDIR}/environment/setup-subpkg/subpkg.sh
- ${x}_package
- printf ' %s\n' "$x"
- for x in depends; do
- arr=(${!x})
- if [[ ${#arr} -gt 0 ]]; then
- printf ' %s:\n' "$x"
- printf ' %s\n' "${arr[@]}"
- fi
- done
- done
+ printf ' %s\n' $subpackages
fi
;;
show-options)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: xbps-src: simplify dbulk-dump output
2021-03-10 21:07 [PR PATCH] xbps-src: simplify dbulk-dump output Duncaen
2021-03-10 21:10 ` [PR PATCH] [Updated] " Duncaen
2021-03-10 21:11 ` Duncaen
@ 2021-03-10 21:23 ` ericonr
2021-03-12 23:33 ` [PR PATCH] [Merged]: " Vaelatern
3 siblings, 0 replies; 5+ messages in thread
From: ericonr @ 2021-03-10 21:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/29387#issuecomment-796137766
Comment:
Do you think you could document it as well? See #29363
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src: simplify dbulk-dump output
2021-03-10 21:07 [PR PATCH] xbps-src: simplify dbulk-dump output Duncaen
` (2 preceding siblings ...)
2021-03-10 21:23 ` ericonr
@ 2021-03-12 23:33 ` Vaelatern
3 siblings, 0 replies; 5+ messages in thread
From: Vaelatern @ 2021-03-12 23:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 977 bytes --]
There's a merged pull request on the void-packages repository
xbps-src: simplify dbulk-dump output
https://github.com/void-linux/void-packages/pull/29387
Description:
* List dependencies of subpackages as part of the source packages
dependencies, knowing the subpackage they are coming from does
not matter to a build scheduler as long as xbps-src requires
those to exist in the same way to main depends= have to exist.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
and nocross=, there shouldn't be the need to discover archs=
restrictions when attempting to build the package.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-03-12 23:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 21:07 [PR PATCH] xbps-src: simplify dbulk-dump output Duncaen
2021-03-10 21:10 ` [PR PATCH] [Updated] " Duncaen
2021-03-10 21:11 ` Duncaen
2021-03-10 21:23 ` ericonr
2021-03-12 23:33 ` [PR PATCH] [Merged]: " Vaelatern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).