Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Thomas Orgis (112632ce607b3744b607deb21ac0ea3267c8ded5)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Thomas Orgis <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Thomas Orgis (112632ce607b3744b607deb21ac0ea3267c8ded5)
  • Date: Wed, 8 Apr 2020 14:59:50 +0000

GIT changes to master sorcery by Thomas Orgis <sobukus AT sourcemage.org>:

var/lib/sorcery/modules/libmisc | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 112632ce607b3744b607deb21ac0ea3267c8ded5
Author: Thomas Orgis <sobukus AT sourcemage.org>
Commit: Thomas Orgis <sobukus AT sourcemage.org>

Revert "libmisc: Implement one-shot specfile selection"

This reverts commit 615b00c28da7e62b0b31098b0229b0f9a04de0d2.

This broke things by not setting specdir appropriately, causing
later attempts to fix that. Those attempts break for differing
arch selections as they are not all in the same path depth.

We shall never guess specdir after the fact. Use the values
we know!

diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 744326e..dd5952c 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1478,22 +1478,22 @@ set_architecture() {
: ${arch:=${TARGET:-$ARCHITECTURE}}

# Find the specfile to use
- SPECFILE=$(find -L "${ARCH_SPECS[@]}" \( -name "$arch" -o -name null \) \
- -perm -400 -type f 2>/dev/null |
- awk '! /[/]null$/ { exit } END { print }')
- case "$SPECFILE" in
- */null)
- message "${PROBLEM_COLOR}Cannot find arch spec for $arch!"
- message "Reverting to null!"
- message "Please run sorcery afterwards and pick another
architecture!$DEFAULT_COLOR"
- echo
- sleep 2
- esac
+ for specdir in ${ARCH_SPECS[@]} ; do
+ SPECFILE=$(find -L ${specdir} -perm -400 -type f -name "$arch"
2>/dev/null | sed q)
+ [ $SPECFILE ] && break
+ done
+ if [[ ! $SPECFILE ]] ; then
+ message "${PROBLEM_COLOR}Cannot find arch spec for $arch!"
+ message "Reverting to null!"
+ message "Please run sorcery afterwards and pick another
architecture!$DEFAULT_COLOR"
+ echo
+ sleep 2
+ SPECFILE=$(find -L ${specdir} -perm -400 -type f -name "null"
2>/dev/null | sed q)
+ fi
debug "libmisc" "set_architecture: SPECFILE=$SPECFILE"

# turn the path into an array, but remove $specdir from the start first
unset SMGL_COMPAT_ARCHS
- specdir="${SPECFILE%/*/*/*}"
explode "${SPECFILE#$specdir/}" '/' SMGL_COMPAT_ARCHS

# Reverse the array so that the most specific arch is first



  • [SM-Commit] GIT changes to master sorcery by Thomas Orgis (112632ce607b3744b607deb21ac0ea3267c8ded5), Thomas Orgis, 04/08/2020

Archive powered by MHonArc 2.6.24.

Top of Page