Skip to contentSkip to conversation

swupdate: fix compilation

PATCH Niedermayr, BENEDIKT 1 participant 2 messages Jun 19 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 57 lines · BENEDIKT via lists.cip-project.org

When compiling swupdate the "cross" profile should only be added if BUILD_ARCH != PACKAGE_ARCH which is already be done in isar_deb_build_profiles() in the dpkg-base class.

If the "cross" profile is added though, this breaks sbuild builds, since it will add the host architecture to the barbarian architecture and thus won't be able to install packages in the host architecture.

Actually this could also be fixed in sbuild itself as well, but setting the "cross" profile should nevertheless only be done if really required.

This is the error that is fixed with this commit:

| Reading package lists...
| E: The package cache was built for different architectures: amd64 vs
| W: You may want to run apt-get update to correct these problems
| E: The package cache file is corrupted
| E: apt-get dist-upgrade failed
---
  recipes-core/swupdate/swupdate.inc        | 2 +-
  recipes-core/swupdate/swupdate_2023.12.bb | 3 +++
  2 files changed, 4 insertions(+), 1 deletion(-)
recipes-core/swupdate/swupdate.inc +1 -1
index 4038e7e38402..b367a96c847a 100644
@@ -37,7 +37,7 @@ DEPENDS += "${@bb.utils.contains('DEB_BUILD_PROFILES', 'mtd', 'mtd-utils', '', d
  SWU_SIGNED ?= "1"
  DEB_BUILD_PROFILES += "${@'pkg.swupdate.nosigning' if not bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
 
-# deactivate testing
+# deactivate testing for arm based builds
  DEB_BUILD_PROFILES += "nocheck"
 
  python do_check_bootloader () {
recipes-core/swupdate/swupdate_2023.12.bb +3 -1
index 89785b66bf29..a12d22a99bb4 100644
@@ -39,6 +39,9 @@ DEB_BUILD_PROFILES += "pkg.swupdate.suricattawfx"
  # with cross compile we have a unsat-dependency to dh-nodejs on arm/arm64
  ISAR_CROSS_COMPILE:bullseye = "0"
 
+# deactivate testing for arm based builds
+DEB_BUILD_PROFILES += "nocheck"
+
  # use backport build profile for bullseye
  DEB_BUILD_PROFILES += "pkg.swupdate.bpo"
 
--

2.43.0

Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#23228): https://lists.cip-project.org/g/cip-dev/message/23228
Mute This Topic: https://lists.cip-project.org/mt/119880559/7079927
Group Owner: [email protected]
Unsubscribe: https://lists.cip-project.org/g/cip-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Ah, forgot to rebase against current next.
v2 will follow

Benedikt

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 53 lines · BENEDIKT via lists.cip-project.org
Quoted 52 lines · BENEDIKT via lists.cip-project.org

When compiling swupdate the "cross" profile should only be added if BUILD_ARCH != PACKAGE_ARCH which is already be done in isar_deb_build_profiles() in the dpkg-base class.

If the "cross" profile is added though, this breaks sbuild builds, since it will add the host architecture to the barbarian architecture and thus won't be able to install packages in the host architecture.

Actually this could also be fixed in sbuild itself as well, but setting the "cross" profile should nevertheless only be done if really required.

This is the error that is fixed with this commit:

| Reading package lists...
| E: The package cache was built for different architectures: amd64 vs
| W: You may want to run apt-get update to correct these problems
| E: The package cache file is corrupted
| E: apt-get dist-upgrade failed
---
   recipes-core/swupdate/swupdate.inc        | 2 +-
   recipes-core/swupdate/swupdate_2023.12.bb | 3 +++
   2 files changed, 4 insertions(+), 1 deletion(-)
recipes-core/swupdate/swupdate.inc +1 -1
index 4038e7e38402..b367a96c847a 100644
@@ -37,7 +37,7 @@ DEPENDS += "${@bb.utils.contains('DEB_BUILD_PROFILES', 'mtd', 'mtd-utils', '', d
   SWU_SIGNED ?= "1"
   DEB_BUILD_PROFILES += "${@'pkg.swupdate.nosigning' if not bb.utils.to_boolean(d.getVar('SWU_SIGNED')) else ''}"
 
-# deactivate testing
+# deactivate testing for arm based builds
   DEB_BUILD_PROFILES += "nocheck"
 
   python do_check_bootloader () {
recipes-core/swupdate/swupdate_2023.12.bb +3 -0
index 89785b66bf29..a12d22a99bb4 100644
@@ -39,6 +39,9 @@ DEB_BUILD_PROFILES += "pkg.swupdate.suricattawfx"
   # with cross compile we have a unsat-dependency to dh-nodejs on arm/arm64
   ISAR_CROSS_COMPILE:bullseye = "0"
 
+# deactivate testing for arm based builds
+DEB_BUILD_PROFILES += "nocheck"
+
   # use backport build profile for bullseye
   DEB_BUILD_PROFILES += "pkg.swupdate.bpo"
 
Quoted 10 lines
Quoted 7 lines

--
2.43.0

Ah, forgot to rebase against current next.
v2 will follow

And on current next it is already fixed.
So this can be ignored...

Quoted 13 lines

Benedikt

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#23229): https://lists.cip-project.org/g/cip-dev/message/23229
Mute This Topic: https://lists.cip-project.org/mt/119880559/7079927
Group Owner: [email protected]
Unsubscribe: https://lists.cip-project.org/g/cip-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-