This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=df3042d991bac06b359532164a437bc2d8179339

commit df3042d991bac06b359532164a437bc2d8179339
Author: Guillem Jover <[email protected]>
AuthorDate: Mon Mar 27 02:11:33 2023 +0200

    test: Use m4 to implement seq instead of assuming GNU seq is present
    
    Assuming GNU seq or a compatible command is present is not a portable
    assumption to make. Instead we can use m4 to implement the equivalent
    without any need of forking any process.
---
 src/at/deb-split.at | 2 +-
 src/at/local.at     | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/at/deb-split.at b/src/at/deb-split.at
index 93dc455b3..9c4d24c39 100644
--- a/src/at/deb-split.at
+++ b/src/at/deb-split.at
@@ -23,7 +23,7 @@ dpkg-deb --root-owner-group -Znone -b pkg-split >/dev/null
 AT_CHECK([
 # Test splitting a package (in 10 parts: 9 * 210 KiB B + 158 KiB)
 dpkg-split -S 210 -s pkg-split.deb pkg-split-part
-for p in $(seq 10); do
+for p in DPKG_SEQ([10]); do
   test -f pkg-split-part.${p}of10.deb
 done
 ], [], [Splitting package pkg-split into 10 parts: 1 2 3 4 5 6 7 8 9 10 done
diff --git a/src/at/local.at b/src/at/local.at
index 1def68420..da32241b5 100644
--- a/src/at/local.at
+++ b/src/at/local.at
@@ -37,6 +37,11 @@ m4_define([DPKG_DIVERT_DEL], [DPKG_DIVERT --remove])
 # Macros.
 #
 
+# DPKG_SEQ($max)
+m4_define([DPKG_SEQ], [dnl
+  m4_for([i], [1], [$1], [], [i ])dnl
+])
+
 # DPKG_FILE_SIZE()
 m4_define([DPKG_FILE_SIZE], [
   $PERL -E 'say -s shift' "$1" dnl

-- 
Dpkg.Org's dpkg

Reply via email to