Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: build depends of subpackages
@ 2020-04-14 19:59 Chocimier
  2020-04-15  9:16 ` xtraeme
  2020-04-15  9:17 ` [PR PATCH] [Merged]: " xtraeme
  0 siblings, 2 replies; 3+ messages in thread
From: Chocimier @ 2020-04-14 19:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

There is a new pull request by Chocimier against master on the void-packages repository

https://github.com/Chocimier/void-packages-org build_sub_deps
https://github.com/void-linux/void-packages/pull/20990

xbps-src: build depends of subpackages
resolves #20508

A patch file from https://github.com/void-linux/void-packages/pull/20990.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build_sub_deps-20990.patch --]
[-- Type: text/x-diff, Size: 2669 bytes --]

From d8d1dc231093c34e5f680c511a80cc6a7d312520 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 14 Apr 2020 21:57:26 +0200
Subject: [PATCH] xbps-src: build depends of subpackages

resolves #20508
---
 common/xbps-src/shutils/build_dependencies.sh | 16 +++++++++++++---
 common/xbps-src/shutils/show.sh               |  2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/common/xbps-src/shutils/build_dependencies.sh b/common/xbps-src/shutils/build_dependencies.sh
index b5b61616019..2eb8b8ad204 100644
--- a/common/xbps-src/shutils/build_dependencies.sh
+++ b/common/xbps-src/shutils/build_dependencies.sh
@@ -1,13 +1,21 @@
 # vim: set ts=4 sw=4 et:
 #
 setup_pkg_depends() {
-    local pkg="$1" out="$2" j _rpkgname _depname _pkgname foo _deps
+    local pkg="$1" out="$2" with_subpkgs="$3" j _rpkgname _depname _pkgname foo _deps collected
 
     if [[ $pkg ]]; then
         # subpkg
         if declare -f ${pkg}_package >/dev/null; then
             ${pkg}_package
         fi
+    elif [[ $with_subpkgs ]]; then
+        collected="${depends}"
+        for pkg in $subpackages; do
+            [[ $pkg ]] || continue
+            ${pkg}_package
+            collected+=" ${depends}"
+        done
+        depends="${collected}"
     fi
 
     for j in ${depends}; do
@@ -296,9 +304,9 @@ install_pkg_deps() {
     #
     # Target run time dependencies
     #
-    if [[ ${depends} ]]; then
+    local _cleandeps=$(setup_pkg_depends "" 1 1) || exit 1
+    if [[ ${_cleandeps} ]]; then
         templates=""
-        local _cleandeps=$(setup_pkg_depends "" 1) || exit 1
         for f in ${_cleandeps}; do
             if [ -f $XBPS_SRCPKGDIR/$f/template ]; then
                 templates+=" $f"
@@ -334,6 +342,8 @@ install_pkg_deps() {
                     echo "   [runtime] ${_vpkg}: not found"
                     missing_rdeps+=("$_vpkg")
                 fi
+            elif [[ ${_depname} == ${pkgname} ]]; then
+                    echo "   [runtime] ${_vpkg}: not found (self, ignored)"
             else
                 echo "   [runtime] ${_vpkg}: not found"
                 missing_rdeps+=("$_vpkg")
diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh
index d0c260ed0ae..22c24ec56ff 100644
--- a/common/xbps-src/shutils/show.sh
+++ b/common/xbps-src/shutils/show.sh
@@ -89,7 +89,7 @@ show_pkg_build_depends() {
 }
 
 show_pkg_build_deps() {
-    show_pkg_build_depends "${hostmakedepends} ${makedepends} $(setup_pkg_depends '' 1)"
+    show_pkg_build_depends "${hostmakedepends} ${makedepends} $(setup_pkg_depends '' 1 1)"
 }
 
 show_pkg_hostmakedepends() {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xbps-src: build depends of subpackages
  2020-04-14 19:59 [PR PATCH] xbps-src: build depends of subpackages Chocimier
@ 2020-04-15  9:16 ` xtraeme
  2020-04-15  9:17 ` [PR PATCH] [Merged]: " xtraeme
  1 sibling, 0 replies; 3+ messages in thread
From: xtraeme @ 2020-04-15  9:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

New comment by xtraeme on void-packages repository

https://github.com/void-linux/void-packages/pull/20990#issuecomment-613921256

Comment:
It's ok! I confused the arg order between funcs in my previous review. Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: xbps-src: build depends of subpackages
  2020-04-14 19:59 [PR PATCH] xbps-src: build depends of subpackages Chocimier
  2020-04-15  9:16 ` xtraeme
@ 2020-04-15  9:17 ` xtraeme
  1 sibling, 0 replies; 3+ messages in thread
From: xtraeme @ 2020-04-15  9:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

There's a merged pull request on the void-packages repository

xbps-src: build depends of subpackages
https://github.com/void-linux/void-packages/pull/20990

Description:
resolves #20508

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-15  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 19:59 [PR PATCH] xbps-src: build depends of subpackages Chocimier
2020-04-15  9:16 ` xtraeme
2020-04-15  9:17 ` [PR PATCH] [Merged]: " xtraeme

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).