Marc, On Sat, Jun 06, 2026 at 06:35:17PM +0200, Marc Haber wrote: > On Fri, Jun 05, 2026 at 08:39:40PM +0100, Mark Hindley wrote: > > I notice you have provided ucf-helper-functions.sh. The only file currently > > in > > /usr/share/ucf is ucf_library.sh (note underscore). Would you be happy with > > ucf_helper_functions.sh for consistency? > > Absolutely. No problem. I did a git rename in my branch, is that okay for > you
Yes, fine. > That looks to me like the hashfile poking is necessary and the two ucfr > calls that were already there fix some fallout. And, being an official part > of the ucf package proper, ucf_helper_functions.sh should be allowed to > access ucf internal interfaces. > > I'd prefer to keep the code as is. If that's a rejection reason for you, It isn't a show stopper. Maybe something that can be refined in the future? However, I have just done a local merge of t/helper_functions/ and they fail for me. I *think* the issue is that they need to use $UCF_TEST_TARGET, which is the unshared directory and therefore predictable across build systems. That avoids /home/mh/packages/ucf/zugschlus/ being included in the expected test state. The patch below is a basic fix for me, but feel free to refine further. I am slightly surprised that salsa ci manages to run the test successfully. Presumably it doesn't actually run make check? I only utilise salsa as a public git forge so have no real understanding of its internals. Best wishes Mark commit 4d865d08563c8d2bd5d252be92b604608df80840 Author: Mark Hindley <[email protected]> Date: Sun Jun 7 08:48:24 2026 +0100 d/t/helper_functions: use $UCF_TEST_TARGET. Utilises unshared test framework and predictable paths. diff --git a/t/helper_functions/expected/output b/t/helper_functions/expected/output index 03b4427..ad1d025 100644 --- a/t/helper_functions/expected/output +++ b/t/helper_functions/expected/output @@ -1,4 +1,3 @@ -/home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/tests ./test_01 passed ./test_02 passed ./test_03 passed diff --git a/t/helper_functions/expected/state/hashfile.0 b/t/helper_functions/expected/state/hashfile.0 index 1a1fedc..57a1ca6 100644 --- a/t/helper_functions/expected/state/hashfile.0 +++ b/t/helper_functions/expected/state/hashfile.0 @@ -1 +1 @@ -e0194db8c87c49b30ae70eb986ffa35d /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +e0194db8c87c49b30ae70eb986ffa35d /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/hashfile.1 b/t/helper_functions/expected/state/hashfile.1 index 1a1fedc..57a1ca6 100644 --- a/t/helper_functions/expected/state/hashfile.1 +++ b/t/helper_functions/expected/state/hashfile.1 @@ -1 +1 @@ -e0194db8c87c49b30ae70eb986ffa35d /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +e0194db8c87c49b30ae70eb986ffa35d /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/hashfile.2 b/t/helper_functions/expected/state/hashfile.2 index 1a1fedc..57a1ca6 100644 --- a/t/helper_functions/expected/state/hashfile.2 +++ b/t/helper_functions/expected/state/hashfile.2 @@ -1 +1 @@ -e0194db8c87c49b30ae70eb986ffa35d /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +e0194db8c87c49b30ae70eb986ffa35d /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/hashfile.3 b/t/helper_functions/expected/state/hashfile.3 index 54c8880..2262355 100644 --- a/t/helper_functions/expected/state/hashfile.3 +++ b/t/helper_functions/expected/state/hashfile.3 @@ -1 +1 @@ -5c6869755ea5bcd7054e0ba6a882c972 /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +5c6869755ea5bcd7054e0ba6a882c972 /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/hashfile.6 b/t/helper_functions/expected/state/hashfile.6 index 54c8880..2262355 100644 --- a/t/helper_functions/expected/state/hashfile.6 +++ b/t/helper_functions/expected/state/hashfile.6 @@ -1 +1 @@ -5c6869755ea5bcd7054e0ba6a882c972 /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +5c6869755ea5bcd7054e0ba6a882c972 /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/hashfile.7 b/t/helper_functions/expected/state/hashfile.7 index 54c8880..2262355 100644 --- a/t/helper_functions/expected/state/hashfile.7 +++ b/t/helper_functions/expected/state/hashfile.7 @@ -1 +1 @@ -5c6869755ea5bcd7054e0ba6a882c972 /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +5c6869755ea5bcd7054e0ba6a882c972 /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/registry.0 b/t/helper_functions/expected/state/registry.0 index 1834f57..d34c700 100644 --- a/t/helper_functions/expected/state/registry.0 +++ b/t/helper_functions/expected/state/registry.0 @@ -1 +1 @@ -pkgname /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +pkgname /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/registry.2 b/t/helper_functions/expected/state/registry.2 index 839e17c..d369b60 100644 --- a/t/helper_functions/expected/state/registry.2 +++ b/t/helper_functions/expected/state/registry.2 @@ -1 +1 @@ -pkgname /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/conffile +pkgname /tmp/loc/conffile diff --git a/t/helper_functions/expected/state/registry.4 b/t/helper_functions/expected/state/registry.4 index 1834f57..d34c700 100644 --- a/t/helper_functions/expected/state/registry.4 +++ b/t/helper_functions/expected/state/registry.4 @@ -1 +1 @@ -pkgname /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/renamedconffile +pkgname /tmp/loc/renamedconffile diff --git a/t/helper_functions/expected/state/registry.6 b/t/helper_functions/expected/state/registry.6 index 839e17c..d369b60 100644 --- a/t/helper_functions/expected/state/registry.6 +++ b/t/helper_functions/expected/state/registry.6 @@ -1 +1 @@ -pkgname /home/mh/packages/ucf/zugschlus/ucf/t/helper_functions/workdir/loc/conffile +pkgname /tmp/loc/conffile diff --git a/t/helper_functions/test b/t/helper_functions/test index 0857839..c74eef7 100755 --- a/t/helper_functions/test +++ b/t/helper_functions/test @@ -3,7 +3,7 @@ set -u set -e -DIR="$(pwd)/workdir" +DIR="$UCF_TEST_TARGET" PKGDIR="$DIR/pkg" LOCDIR="$DIR/loc" PKGNAME="pkgname" @@ -30,13 +30,13 @@ cleanup() { ucf --purge $fn ucfr --purge $PKGNAME $fn done - rm -rf $DIR $PKGDIR $LOCDIR $REFDIR + rm -rf $PKGDIR $LOCDIR $REFDIR rm -f result } prepare() { cleanup - mkdir $DIR $PKGDIR $LOCDIR $REFDIR + mkdir -p $PKGDIR $LOCDIR $REFDIR cp package-orig $PKGF }

