Github messages for voidlinux
 help / color / mirror / Atom feed
From: Chocimier <Chocimier@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: build depends of subpackages
Date: Tue, 14 Apr 2020 21:59:46 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20990@inbox.vuxu.org> (raw)

[-- 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() {

             reply	other threads:[~2020-04-14 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14 19:59 Chocimier [this message]
2020-04-15  9:16 ` xtraeme
2020-04-15  9:17 ` [PR PATCH] [Merged]: " xtraeme

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-20990@inbox.vuxu.org \
    --to=chocimier@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).