Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] fix sort-dependencies to use checkdepends
Date: Tue, 26 Dec 2023 04:19:56 +0100	[thread overview]
Message-ID: <20231226031956.dcSd16Sm3GmjmBAzbb30Oy3ZR-2QHvvL-FC-S8raUx8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47888@inbox.vuxu.org>

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

There is an updated pull request by tornaria against master on the void-packages repository

https://github.com/tornaria/void-packages sort-deps
https://github.com/void-linux/void-packages/pull/47888

fix sort-dependencies to use checkdepends
As it is now, if `pkgA` checkdepends on `pkgB`, sort-dependencies will still print `pkgA` before `pkgB`. This causes CI to build `pkgB` twice: first build `pkgA` which forces implicit build of `pkgB`; then build of `pkgB` (explicit, so it will ignore the package is already built).

A concrete example:

```
$ ./xbps-src sort-dependencies python3-process-tests python3-pytest-cov
python3-pytest-cov
python3-process-tests
```
After this commit, the order above is the other way around.

The example above causes `python-process-tests` to be built twice, as shown in:
https://github.com/void-linux/void-packages/actions/runs/7107346278/job/19348602412?pr=47610

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


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

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

From 59506730e1ee1a495b6abcc70bf72418d8c48421 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Sat, 23 Dec 2023 19:40:53 -0300
Subject: [PATCH 1/6] have show-build-deps include checkdepends when using -Q
 or -K

This makes sort-dependencies take checkdepends into account when using -Q or -K.

As it is now, if pkgA checkdepends on pkgB, sort-dependencies will still
print pkgA before pkgB. This causes CI to build pkgB twice: first build
pkgA which forces implicit build of pkgB; then build of pkgB (explicit,
so it will ignore the package is already built).

A concrete example:

$ ./xbps-src sort-dependencies python3-process-tests python3-pytest-cov
python3-pytest-cov
python3-process-tests

After this commit:

$ ./xbps-src -Q sort-dependencies python3-process-tests python3-pytest-cov
python3-process-tests
python3-pytest-cov

Note that nothing is changed unless -Q or -K flag is passed.
---
 common/xbps-src/shutils/show.sh | 4 ++++
 xbps-src                        | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh
index 606396d2b4b1a..8af32295d25d5 100644
--- a/common/xbps-src/shutils/show.sh
+++ b/common/xbps-src/shutils/show.sh
@@ -120,6 +120,10 @@ show_pkg_build_deps() {
     show_pkg_build_depends "${makedepends} $(setup_pkg_depends '' 1 1)" "${hostmakedepends}"
 }
 
+show_pkg_check_deps() {
+    show_pkg_build_depends "${checkdepends}" ""
+}
+
 show_pkg_hostmakedepends() {
     show_pkg_build_depends "" "${hostmakedepends}"
 }
diff --git a/xbps-src b/xbps-src
index cdb5f8c6d643e..c7a4246c7f41f 100755
--- a/xbps-src
+++ b/xbps-src
@@ -91,6 +91,9 @@ show-avail <pkgname>
 show-build-deps <pkgname>
     Show required build dependencies for <pkgname>.
 
+show-check-deps <pkgname>
+    Show required check dependencies for <pkgname>.
+
 show-deps <pkgname>
     Show required run-time dependencies for <pkgname>. Package must be
     installed into destdir.
@@ -860,6 +863,11 @@ case "$XBPS_TARGET" in
     show-build-deps)
         read_pkg ignore-problems
         show_pkg_build_deps
+        [ -z "$XBPS_CHECK_PKGS" ] || show_pkg_check_deps
+        ;;
+    show-check-deps)
+        read_pkg ignore-problems
+        show_pkg_check_deps
         ;;
     show-hostmakedepends)
         read_pkg ignore-problems

From fbdc4313b6f05a22e5b5367949a34f795917404f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 25 Dec 2023 23:55:08 -0300
Subject: [PATCH 2/6] Fix show-build-deps for *-32bit deps

---
 common/xbps-src/shutils/show.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh
index 8af32295d25d5..6d71033c34d2c 100644
--- a/common/xbps-src/shutils/show.sh
+++ b/common/xbps-src/shutils/show.sh
@@ -75,7 +75,7 @@ show_avail() {
 
 show_eval_dep() {
     local f x _pkgname _srcpkg found
-    local _dep="$1"
+    local _dep="${1%-32bit}"
     local _host="$2"
     if [ -z "$CROSS_BUILD" ] || [ -z "$_host" ]; then
         # ignore dependency on itself
@@ -92,8 +92,7 @@ show_eval_dep() {
         [[ $_dep == $x ]] && found=1 && break
     done
     [[ $found ]] && return
-    _pkgname=${_dep/-32bit}
-    _srcpkg=$(readlink -f ${XBPS_SRCPKGDIR}/${_pkgname})
+    _srcpkg=$(readlink -f ${XBPS_SRCPKGDIR}/${_dep})
     _srcpkg=${_srcpkg##*/}
     echo $_srcpkg
 }

From 3fb6c003646dd7742b1c83034129bbdb2222f468 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 25 Dec 2023 19:09:51 -0300
Subject: [PATCH 3/6] python3-QtPy: fix one check dependency

---
 srcpkgs/python3-QtPy/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/python3-QtPy/template b/srcpkgs/python3-QtPy/template
index 5a77ca425b5d3..79e4016fb0236 100644
--- a/srcpkgs/python3-QtPy/template
+++ b/srcpkgs/python3-QtPy/template
@@ -16,7 +16,7 @@ _qt5check="${_qtcommon} :location :opengl :quick :x11extras :xmlpatterns
 _qt6check="${_qtcommon} :dbus :declarative :devel-tools :gui :network
  :opengl-widgets :printsupport :quick3d :remoteobjects :test :widgets :xml
  qt6-plugin-sqlite"
-checkdepends="python3-pytest-cov python3-pytest-qt font-liberation-ttf
+checkdepends="python3-pytest-cov python3-pytest-qt liberation-fonts-ttf
  ${_qt5check//:/python3-PyQt5-} ${_qt6check//:/python3-pyqt6-}"
 short_desc="Abstraction layer on top of various Python Qt bindings"
 maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"

From 4c9ce56910280ccbba2980a894ea98dabbc289d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 25 Dec 2023 22:43:07 -0300
Subject: [PATCH 4/6] bcachefs-tools: fix one make dependency

---
 srcpkgs/bcachefs-tools/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/bcachefs-tools/template b/srcpkgs/bcachefs-tools/template
index 35fa36d13a37e..5c67e9aa9f9fe 100644
--- a/srcpkgs/bcachefs-tools/template
+++ b/srcpkgs/bcachefs-tools/template
@@ -8,7 +8,7 @@ make_install_args="ROOT_SBINDIR=/usr/bin"
 make_use_env=yes
 hostmakedepends="pkg-config cargo clang liburcu-devel"
 makedepends="rust attr-devel keyutils-devel libaio-devel libblkid-devel
- liblz4-devel libscrypt-devel libsodium-devel libudev-devel liburcu-devel
+ liblz4-devel libscrypt-devel libsodium-devel eudev-libudev-devel liburcu-devel
  libuuid-devel libzstd-devel zlib-devel"
 short_desc="Userspace tools for bcachefs"
 maintainer="Leah Neukirchen <leah@vuxu.org>"

From 6cd04f21869916e9b387fff0c8f916fe5354d377 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 25 Dec 2023 22:44:02 -0300
Subject: [PATCH 5/6] qgis: don't makedepend on opencl-clhpp (removed pkg)

---
 srcpkgs/qgis/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/qgis/template b/srcpkgs/qgis/template
index 3c7edb573363e..f066720f06ea4 100644
--- a/srcpkgs/qgis/template
+++ b/srcpkgs/qgis/template
@@ -9,7 +9,7 @@ hostmakedepends="bison flex pkg-config protobuf python3 python3-sip-PyQt5 sip"
 makedepends="exiv2-devel draco-devel expat-devel freexl-devel geos-devel
  gsl-devel grass-devel hdf5-devel libgdal-devel libpdal-devel librttopo-devel
  libspatialindex-devel libspatialite-devel libxml2-devel libzip-devel
- minizip-devel netcdf-devel ocl-icd-devel opencl-clhpp postgresql-libs-devel
+ minizip-devel netcdf-devel ocl-icd-devel postgresql-libs-devel
  proj-devel protobuf-devel python3-devel python3-PyQt-builder
  python3-PyQt5-devel python3-PyQt5-devel-tools python3-PyQt5-multimedia
  python3-pyqt5-qsci-devel python3-PyQt5-webkit python3-sip-PyQt5 qca-qt5-devel

From 9c3fdec187a44c94057e7d7fca7950c70b81714e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 25 Dec 2023 22:44:42 -0300
Subject: [PATCH 6/6] python3-google-api-python-client: don't checkdepend on
 python3-Django (removed pkg)

---
 srcpkgs/python3-google-api-python-client/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/python3-google-api-python-client/template b/srcpkgs/python3-google-api-python-client/template
index b2f3f446d4489..dfca76ef2fc27 100644
--- a/srcpkgs/python3-google-api-python-client/template
+++ b/srcpkgs/python3-google-api-python-client/template
@@ -8,7 +8,7 @@ make_check_args="--deselect=tests/test__helpers.py::PositionalTests::test_usage
 hostmakedepends="python3-setuptools"
 depends="python3-httplib2 python3-google-auth python3-google-auth-httplib2
  python3-google-api-core python3-uritemplate"
-checkdepends="${depends} python3-Django python3-parameterized python3-openssl
+checkdepends="${depends} python3-parameterized python3-openssl
  python3-oauth2client python3-pytest-xdist"
 short_desc="Google API client library for Python3"
 maintainer="Orphaned <orphan@voidlinux.org>"

  parent reply	other threads:[~2023-12-26  3:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-23 22:56 [PR PATCH] " tornaria
2023-12-25  8:30 ` sgn
2023-12-25 14:41 ` tornaria
2023-12-25 14:52 ` tornaria
2023-12-25 15:18 ` [PR PATCH] [Updated] " tornaria
2023-12-25 15:34 ` tornaria
2023-12-26  3:19 ` tornaria [this message]
2023-12-26  3:37 ` tornaria
2023-12-26 15:48 ` [PR PATCH] [Updated] " tornaria
2023-12-26 16:10 ` Include checkdepends in show-build-deps / fix sort-dependencies for CI tornaria
2024-02-15 15:15 ` Accept -Q / -K in show-build-deps, sort-dependencies, xbps-cycles.py tornaria
2024-03-18  2:58 ` tornaria
2024-04-07 21:06 ` tornaria
2024-04-08  1:57 ` [PR PATCH] [Merged]: " sgn

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=20231226031956.dcSd16Sm3GmjmBAzbb30Oy3ZR-2QHvvL-FC-S8raUx8@z \
    --to=tornaria@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).