From: Chocimier <Chocimier@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] xbps-src: add XBPS_RINDEX_TARGET=stagedata option
Date: Tue, 24 May 2022 21:29:54 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37278@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
There is a new pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org stagedata
https://github.com/void-linux/void-packages/pull/37278
xbps-src: add XBPS_RINDEX_TARGET=stagedata option
<!-- 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 [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-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/37278.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-stagedata-37278.patch --]
[-- Type: text/x-diff, Size: 4214 bytes --]
From 55e5dbb44002638da81cfdef87892b18cbb7378a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 24 May 2022 21:26:42 +0200
Subject: [PATCH 1/2] common/: deduplicate selecting arguments for xbps-rindex
---
common/xbps-src/libexec/build.sh | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh
index 72432316e6ea..586bca773d84 100755
--- a/common/xbps-src/libexec/build.sh
+++ b/common/xbps-src/libexec/build.sh
@@ -106,21 +106,22 @@ cut -d: -f 1,2 ${XBPS_STATEDIR}/.${sourcepkg}_register_pkg | sort -u | \
while IFS=: read -r arch repo; do
paths=$(grep "^$arch:$repo:" "${XBPS_STATEDIR}/.${sourcepkg}_register_pkg" | \
cut -d : -f 2,3 | tr ':' '/')
+ additional_args=
if [ -z "$XBPS_PRESERVE_PKGS" ] || [ "$XBPS_BUILD_FORCEMODE" ]; then
- force=-f
+ additional_args+=" -f"
+ fi
+ if [ "$XBPS_REPO_COMPTYPE" ]; then
+ additional_args+=" --compression $XBPS_REPO_COMPTYPE"
fi
if [ -n "${arch}" ]; then
msg_normal "Registering new packages to $repo ($arch)\n"
- XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD \
- ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} ${force} -a ${paths}
+ XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD ${additional_args} -a ${paths}
else
msg_normal "Registering new packages to $repo\n"
if [ -n "$XBPS_CROSS_BUILD" ]; then
- $XBPS_RINDEX_XCMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \
- ${force} -a ${paths}
+ $XBPS_RINDEX_XCMD ${additional_args} -a ${paths}
else
- $XBPS_RINDEX_CMD ${XBPS_REPO_COMPTYPE:+--compression $XBPS_REPO_COMPTYPE} \
- ${force} -a ${paths}
+ $XBPS_RINDEX_CMD ${additional_args} -a ${paths}
fi
fi
done
From 0858db41ec24f384c2d53407ad0750a72a47f48f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Tue, 24 May 2022 21:26:42 +0200
Subject: [PATCH 2/2] xbps-src: add XBPS_RINDEX_TARGET=stagedata option
---
common/xbps-src/libexec/build.sh | 3 +++
etc/defaults.conf | 7 +++++++
xbps-src | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh
index 586bca773d84..ce0f7d2956bb 100755
--- a/common/xbps-src/libexec/build.sh
+++ b/common/xbps-src/libexec/build.sh
@@ -113,6 +113,9 @@ cut -d: -f 1,2 ${XBPS_STATEDIR}/.${sourcepkg}_register_pkg | sort -u | \
if [ "$XBPS_REPO_COMPTYPE" ]; then
additional_args+=" --compression $XBPS_REPO_COMPTYPE"
fi
+ if [ "$XBPS_RINDEX_TARGET" == stagedata ]; then
+ additional_args+=" --stage"
+ fi
if [ -n "${arch}" ]; then
msg_normal "Registering new packages to $repo ($arch)\n"
XBPS_TARGET_ARCH=${arch} $XBPS_RINDEX_CMD ${additional_args} -a ${paths}
diff --git a/etc/defaults.conf b/etc/defaults.conf
index e3876cdc7d28..482d17076e4f 100644
--- a/etc/defaults.conf
+++ b/etc/defaults.conf
@@ -158,3 +158,10 @@ XBPS_SUCMD="sudo /bin/sh -c"
# When unset, newly build package overwrites the older one.
#
#XBPS_PRESERVE_PKGS=yes
+
+# [OPTIONAL]
+# `stagedata` indexes into arch-stagedata, meant for publishing with repodata
+# later on.
+# When unset, indexes directly into repodata.
+#
+#XBPS_RINDEX_TARGET=stagedata
diff --git a/xbps-src b/xbps-src
index dfa059927cc2..88159b23d532 100755
--- a/xbps-src
+++ b/xbps-src
@@ -648,7 +648,7 @@ export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
XBPS_LIBEXECDIR XBPS_DISTDIR XBPS_DISTFILES_MIRROR XBPS_ALLOW_RESTRICTED \
XBPS_USE_GIT_COMMIT_DATE XBPS_PKG_COMPTYPE XBPS_REPO_COMPTYPE \
XBPS_BUILDHELPERDIR XBPS_USE_BUILD_MTIME XBPS_BUILD_ENVIRONMENT \
- XBPS_PRESERVE_PKGS XBPS_IGNORE_BROKENNESS
+ XBPS_PRESERVE_PKGS XBPS_IGNORE_BROKENNESS XBPS_RINDEX_TARGET
for i in REPOSITORY DESTDIR BUILDDIR SRCDISTDIR; do
eval val="\$XBPS_$i"
next reply other threads:[~2022-05-24 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-24 19:29 Chocimier [this message]
2022-08-25 2:14 ` github-actions
2022-11-24 2:05 ` github-actions
2022-12-08 2:32 ` [PR PATCH] [Closed]: " github-actions
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-37278@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).