Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Prefer flags over config file, again
@ 2020-09-09 21:21 Chocimier
  2020-09-09 21:42 ` q66
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Chocimier @ 2020-09-09 21:21 UTC (permalink / raw)
  To: ml

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

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

https://github.com/Chocimier/void-packages-org make_jobs_order
https://github.com/void-linux/void-packages/pull/24790

Prefer flags over config file, again
In reply to https://github.com/void-linux/void-packages/commit/52781a35fe92b19c833f6e809f033b471e391e53#commitcomment-42165452 .

> why was this committed without prior discussion?

@q66: I thought awaiting comments in PR of xbps-src changes for over week suffices. What do you propose to do additionally?

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

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

From c43a0419029a3a3731a64b1c7d42ca88abfb9f3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Wed, 9 Sep 2020 23:20:27 +0200
Subject: [PATCH] Prefer flags over config file, again

---
 common/xbps-src/shutils/common.sh | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh
index db97a212354..4e5e83f416a 100644
--- a/common/xbps-src/shutils/common.sh
+++ b/common/xbps-src/shutils/common.sh
@@ -162,11 +162,14 @@ set_build_options() {
     fi
 
     for f in ${build_options}; do
-        _pkgname=${pkgname//[^A-Za-z0-9_]/_}
-        eval pkgopts="\$XBPS_PKG_OPTIONS_${_pkgname}"
-        if [ -z "$pkgopts" -o "$pkgopts" = "" ]; then
-            pkgopts=${XBPS_PKG_OPTIONS}
-        fi
+        # Select build options from conf
+        export XBPS_CURRENT_PKG=${pkgname}
+        pkgopts="$(
+            . $XBPS_CONFIG_FILE 2>/dev/null
+            var="XBPS_PKG_OPTIONS_${XBPS_CURRENT_PKG//[^A-Za-z0-9_]/_}"
+            echo ${!var:-${XBPS_PKG_OPTIONS}}
+        )"
+        unset XBPS_CURRENT_PKG
 
         # If pkg options were set in config(s), merge them with command line
         if [ -n "$XBPS_ARG_PKG_OPTIONS" ]; then
@@ -336,8 +339,6 @@ setup_pkg() {
 
     unset_package_funcs
 
-    . $XBPS_CONFIG_FILE 2>/dev/null
-
     if [ -n "$cross" ]; then
         source_file $XBPS_CROSSPFDIR/${cross}.sh
 

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
@ 2020-09-09 21:42 ` q66
  2020-09-11 18:25 ` Chocimier
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-09 21:42 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-689837350

Comment:
ping involved people on IRC? it's just impossible to track every single pull request with the influx we get

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
  2020-09-09 21:42 ` q66
@ 2020-09-11 18:25 ` Chocimier
  2020-09-14 21:49 ` q66
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Chocimier @ 2020-09-11 18:25 UTC (permalink / raw)
  To: ml

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

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-691246367

Comment:
Involved, this is who? People who already seen and responded? Random void members?

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
  2020-09-09 21:42 ` q66
  2020-09-11 18:25 ` Chocimier
@ 2020-09-14 21:49 ` q66
  2020-09-14 21:52 ` q66
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:49 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-692332628

Comment:
obviously people who work on those parts of the code, who else?

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
                   ` (2 preceding siblings ...)
  2020-09-14 21:49 ` q66
@ 2020-09-14 21:52 ` q66
  2020-09-14 21:52 ` q66
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:52 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-692333712

Comment:
also, i quite fail to see what this code is supposed to achieve, it doesn't revert the previous change, it just sources the config file in yet another place

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
                   ` (3 preceding siblings ...)
  2020-09-14 21:52 ` q66
@ 2020-09-14 21:52 ` q66
  2020-09-14 21:53 ` q66
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:52 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-692333712

Comment:
also, i quite fail to see what this PR is supposed to achieve, it doesn't revert the previous change, it just sources the config file in yet another place

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
                   ` (4 preceding siblings ...)
  2020-09-14 21:52 ` q66
@ 2020-09-14 21:53 ` q66
  2020-09-14 21:55 ` [PR PATCH] [Merged]: " q66
  2020-09-14 21:55 ` q66
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:53 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-692333712

Comment:
also, i quite fail to see what this PR is supposed to achieve, ~~it doesn't revert the previous change, it just sources the config file in yet another place~~nevermind, github's JS (or something else) messed up and didn't fully load the diff

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

* Re: [PR PATCH] [Merged]: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
                   ` (5 preceding siblings ...)
  2020-09-14 21:53 ` q66
@ 2020-09-14 21:55 ` q66
  2020-09-14 21:55 ` q66
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:55 UTC (permalink / raw)
  To: ml

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

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

Prefer flags over config file, again
https://github.com/void-linux/void-packages/pull/24790

Description:
In reply to https://github.com/void-linux/void-packages/commit/52781a35fe92b19c833f6e809f033b471e391e53#commitcomment-42165452 .

> why was this committed without prior discussion?

@q66: I thought awaiting comments in PR of xbps-src changes for over week suffices. What do you propose to do additionally?

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

* Re: Prefer flags over config file, again
  2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
                   ` (6 preceding siblings ...)
  2020-09-14 21:55 ` [PR PATCH] [Merged]: " q66
@ 2020-09-14 21:55 ` q66
  7 siblings, 0 replies; 9+ messages in thread
From: q66 @ 2020-09-14 21:55 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/24790#issuecomment-692335113

Comment:
let's take it for now, in longer term we should probably rework this whole thing, the current config file system has way too many issues

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

end of thread, other threads:[~2020-09-14 21:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 21:21 [PR PATCH] Prefer flags over config file, again Chocimier
2020-09-09 21:42 ` q66
2020-09-11 18:25 ` Chocimier
2020-09-14 21:49 ` q66
2020-09-14 21:52 ` q66
2020-09-14 21:52 ` q66
2020-09-14 21:53 ` q66
2020-09-14 21:55 ` [PR PATCH] [Merged]: " q66
2020-09-14 21:55 ` q66

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