* [PR PATCH] xbps-src: implement per-architecture repocache
@ 2020-01-28 0:25 voidlinux-github
2020-01-28 17:25 ` [PR PATCH] [Merged]: " voidlinux-github
0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2020-01-28 0:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
There is a new pull request by q66 against master on the void-packages repository
https://github.com/void-ppc/void-packages repocache-per-arch
https://github.com/void-linux/void-packages/pull/18595
xbps-src: implement per-architecture repocache
That means instead of having a single `hostdir/repocache`, there is now `hostdir/repocache-$XBPS_TARGET_MACHINE`.
This solves multiple problems:
1) When cross-compiling for different architectures and the repos for host and target differ, you will not get signature/checksum conflicts for noarch packages.
2) The `clean-repocache` command will not delete noarch packages that don't belong to that architecture.
3) Clean mixing of glibc and musl masterdirs with the same `hostdir` is now possible; even when building natively, the musl `masterdir` will use its `repocache-foo-musl`, while the `glibc` `masterdir` will use `repocache-foo`.
A patch file from https://github.com/void-linux/void-packages/pull/18595.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-repocache-per-arch-18595.patch --]
[-- Type: text/x-diff, Size: 5637 bytes --]
From 501231640a9524620a2741cd6fad818ba774365e Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Mon, 27 Jan 2020 03:48:07 +0100
Subject: [PATCH] xbps-src: implement per-architecture repocache
That means instead of having a single hostdir/repocache, there
is now hostdir/repocache-$XBPS_TARGET_MACHINE.
This solves multiple problems:
1) When cross-compiling for different architectures and the repos
for host and target differ, you will not get signature/checksum
conflicts for noarch packages.
2) The clean-repocache command will not delete noarch packages that
don't belong to that architecture.
3) Clean mixing of glibc and musl masterdirs with the same hostdir
is now possible; even when building natively, the musl masterdir
will use its repocache-foo-musl, while the glibc masterdir will
use repocache-foo.
[ci skip]
---
common/xbps-src/shutils/common.sh | 4 +--
xbps-src | 50 +++++++++++++++----------------
2 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh
index 5ca4d7132de..cfe097f364c 100644
--- a/common/xbps-src/shutils/common.sh
+++ b/common/xbps-src/shutils/common.sh
@@ -334,8 +334,8 @@ setup_pkg() {
export XBPS_CROSS_BASE=/usr/$XBPS_CROSS_TRIPLET
export XBPS_TARGET_QEMU_MACHINE
- XBPS_INSTALL_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_INSTALL_CMD -c /host/repocache -r $XBPS_CROSS_BASE"
- XBPS_QUERY_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_QUERY_CMD -c /host/repocache -r $XBPS_CROSS_BASE"
+ XBPS_INSTALL_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_INSTALL_CMD -c /host/repocache-$XBPS_TARGET_MACHINE -r $XBPS_CROSS_BASE"
+ XBPS_QUERY_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_QUERY_CMD -c /host/repocache-$XBPS_TARGET_MACHINE -r $XBPS_CROSS_BASE"
XBPS_RECONFIGURE_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_RECONFIGURE_CMD -r $XBPS_CROSS_BASE"
XBPS_REMOVE_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_REMOVE_CMD -r $XBPS_CROSS_BASE"
XBPS_RINDEX_XCMD="env XBPS_TARGET_ARCH=$XBPS_TARGET_MACHINE $XBPS_RINDEX_CMD"
diff --git a/xbps-src b/xbps-src
index 1ba52432707..6eaca002821 100755
--- a/xbps-src
+++ b/xbps-src
@@ -476,30 +476,6 @@ readonly XBPS_BUILDSTYLEDIR=$XBPS_COMMONDIR/build-style
readonly XBPS_LIBEXECDIR=$XBPS_COMMONDIR/xbps-src/libexec
readonly XBPS_BUILDHELPERDIR=$XBPS_COMMONDIR/build-helper
-if [ "$IN_CHROOT" ]; then
- readonly XBPS_UHELPER_CMD="xbps-uhelper"
- readonly XBPS_INSTALL_CMD="xbps-install -c /host/repocache"
- readonly XBPS_QUERY_CMD="xbps-query -c /host/repocache"
- readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure"
- readonly XBPS_REMOVE_CMD="xbps-remove"
- readonly XBPS_CHECKVERS_CMD="xbps-checkvers"
- readonly XBPS_DESTDIR=/destdir
- readonly XBPS_BUILDDIR=/builddir
-else
- readonly XBPS_UHELPER_CMD="xbps-uhelper -r $XBPS_MASTERDIR"
- readonly XBPS_INSTALL_CMD="xbps-install -c $XBPS_HOSTDIR/repocache -r $XBPS_MASTERDIR"
- readonly XBPS_QUERY_CMD="xbps-query -c $XBPS_HOSTDIR/repocache -r $XBPS_MASTERDIR"
- readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure -r $XBPS_MASTERDIR"
- readonly XBPS_REMOVE_CMD="xbps-remove -r $XBPS_MASTERDIR"
- readonly XBPS_CHECKVERS_CMD="xbps-checkvers -r $XBPS_MASTERDIR"
- readonly XBPS_DESTDIR=$XBPS_MASTERDIR/destdir
- readonly XBPS_BUILDDIR=$XBPS_MASTERDIR/builddir
-fi
-readonly XBPS_RINDEX_CMD="xbps-rindex"
-readonly XBPS_FETCH_CMD="xbps-fetch"
-readonly XBPS_DIGEST_CMD="xbps-digest"
-readonly XBPS_CMPVER_CMD="xbps-uhelper cmpver"
-
readonly XBPS_TARGET="$1"
if [ "$2" ]; then
XBPS_TARGET_PKG="${2##*/}"
@@ -548,6 +524,30 @@ if [ -z "$XBPS_TARGET_MACHINE" ]; then
export XBPS_TARGET_MACHINE=$XBPS_MACHINE
fi
+if [ "$IN_CHROOT" ]; then
+ readonly XBPS_UHELPER_CMD="xbps-uhelper"
+ readonly XBPS_INSTALL_CMD="xbps-install -c /host/repocache-$XBPS_MACHINE"
+ readonly XBPS_QUERY_CMD="xbps-query -c /host/repocache-$XBPS_MACHINE"
+ readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure"
+ readonly XBPS_REMOVE_CMD="xbps-remove"
+ readonly XBPS_CHECKVERS_CMD="xbps-checkvers"
+ readonly XBPS_DESTDIR=/destdir
+ readonly XBPS_BUILDDIR=/builddir
+else
+ readonly XBPS_UHELPER_CMD="xbps-uhelper -r $XBPS_MASTERDIR"
+ readonly XBPS_INSTALL_CMD="xbps-install -c $XBPS_HOSTDIR/repocache-$XBPS_MACHINE -r $XBPS_MASTERDIR"
+ readonly XBPS_QUERY_CMD="xbps-query -c $XBPS_HOSTDIR/repocache-$XBPS_MACHINE -r $XBPS_MASTERDIR"
+ readonly XBPS_RECONFIGURE_CMD="xbps-reconfigure -r $XBPS_MASTERDIR"
+ readonly XBPS_REMOVE_CMD="xbps-remove -r $XBPS_MASTERDIR"
+ readonly XBPS_CHECKVERS_CMD="xbps-checkvers -r $XBPS_MASTERDIR"
+ readonly XBPS_DESTDIR=$XBPS_MASTERDIR/destdir
+ readonly XBPS_BUILDDIR=$XBPS_MASTERDIR/builddir
+fi
+readonly XBPS_RINDEX_CMD="xbps-rindex"
+readonly XBPS_FETCH_CMD="xbps-fetch"
+readonly XBPS_DIGEST_CMD="xbps-digest"
+readonly XBPS_CMPVER_CMD="xbps-uhelper cmpver"
+
export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
XBPS_SRCPKGDIR XBPS_COMMONDIR XBPS_BUILDDIR \
XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
@@ -691,7 +691,7 @@ case "$XBPS_TARGET" in
;;
clean-repocache)
export XBPS_TARGET_ARCH="${XBPS_CROSS_BUILD:-$XBPS_TARGET_MACHINE}"
- $XBPS_REMOVE_CMD -C /dev/null -c $XBPS_HOSTDIR/repocache -O
+ $XBPS_REMOVE_CMD -C /dev/null -c $XBPS_HOSTDIR/repocache-${XBPS_TARGET_ARCH} -O
;;
consistency-check)
consistency_check
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Merged]: xbps-src: implement per-architecture repocache
2020-01-28 0:25 [PR PATCH] xbps-src: implement per-architecture repocache voidlinux-github
@ 2020-01-28 17:25 ` voidlinux-github
0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2020-01-28 17:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 825 bytes --]
There's a merged pull request on the void-packages repository
xbps-src: implement per-architecture repocache
https://github.com/void-linux/void-packages/pull/18595
Description:
That means instead of having a single `hostdir/repocache`, there is now `hostdir/repocache-$XBPS_TARGET_MACHINE`.
This solves multiple problems:
1) When cross-compiling for different architectures and the repos for host and target differ, you will not get signature/checksum conflicts for noarch packages.
2) The `clean-repocache` command will not delete noarch packages that don't belong to that architecture.
3) Clean mixing of glibc and musl masterdirs with the same `hostdir` is now possible; even when building natively, the musl `masterdir` will use its `repocache-foo-musl`, while the `glibc` `masterdir` will use `repocache-foo`.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-28 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 0:25 [PR PATCH] xbps-src: implement per-architecture repocache voidlinux-github
2020-01-28 17:25 ` [PR PATCH] [Merged]: " voidlinux-github
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).