Skip to contentSkip to conversation

builddeb: Eliminate debian/arch use

PATCH In review Bastian Germann 2 participants 3 messages Mar 14, 2023 – Mar 19, 2023 Kbuild

lore
Share & tools
lore
#0 lore raw

cover builddeb: Eliminate debian/arch use

The debian/arch is almost unused.
Eliminate the last use during dpkg-buildpackage time.

Bastian Germann (1):
builddeb: Eliminate debian/arch use

 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 1/1 builddeb: Eliminate debian/arch use

In the builddeb context, the DEB_HOST_ARCH environment variable is set to the same value as debian/arch's content, so use the variable with dpkg-architecture.

This is the last use of the debian/arch file during dpkg-buildpackage time.

---
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/builddeb +1 -1
index ff5e7d8e380b..ef43e8937f25 100755
@@ -99,7 +99,7 @@ deploy_libc_headers () {
 
 	# move asm headers to /usr/include/<libc-machine>/asm to match the structure
 	# used by Debian-based distros (to support multi-arch)
-	host_arch=$(dpkg-architecture -a$(cat debian/arch) -qDEB_HOST_MULTIARCH)
+	host_arch=$(dpkg-architecture -a$DEB_HOST_ARCH -qDEB_HOST_MULTIARCH)
 	mkdir $pdir/usr/include/$host_arch
 	mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/
 }
Signature · 1 line
2.39.2
#2 lore raw
Quoted 9 lines · Bastian Germann

In the builddeb context, the DEB_HOST_ARCH environment variable is set to the same value as debian/arch's content, so use the variable with dpkg-architecture.

This is the last use of the debian/arch file during dpkg-buildpackage time.

---

Applied to linux-kbuild.
Thanks.

Quoted 19 lines
 scripts/package/builddeb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/package/builddeb +1 -2
index ff5e7d8e380b..ef43e8937f25 100755
@@ -99,7 +99,7 @@ deploy_libc_headers () {
 
        # move asm headers to /usr/include/<libc-machine>/asm to match the structure
        # used by Debian-based distros (to support multi-arch)
-       host_arch=$(dpkg-architecture -a$(cat debian/arch) -qDEB_HOST_MULTIARCH)
+       host_arch=$(dpkg-architecture -a$DEB_HOST_ARCH -qDEB_HOST_MULTIARCH)
        mkdir $pdir/usr/include/$host_arch
        mv $pdir/usr/include/asm $pdir/usr/include/$host_arch/
 }
--

2.39.2

Signature · 2 lines
Best Regards
Masahiro Yamada