public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v2 1/1] meta: Fix conflicting name of image manifest and dpkg_status
Date: Wed, 12 Jan 2022 13:57:10 +0100	[thread overview]
Message-ID: <20220112125710.2426-2-ubely@ilbers.de> (raw)
In-Reply-To: <20220112125710.2426-1-ubely@ilbers.de>

Features `generate-manifest` and `export-dpkg-status` should
consider multiconfigs for different distro/machine versions
of the same architecture running in parallel.

Before, only the most recent manifest and dpkg_status files were
stored in deploy directory because they overwrote existing files.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 RECIPE-API-CHANGELOG.md     | 8 ++++++++
 meta/classes/image.bbclass  | 1 +
 meta/classes/rootfs.bbclass | 6 ++++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 3bbb42a9..b8f1d2ba 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -314,3 +314,11 @@ The "NAME" used to be rather static and the TAG was always "latest", now the val
 ### Renamed variable CONTAINER_FORMATS to CONTAINER_IMAGE_FORMATS
 
 The meaning remains the same, just the name changed.
+
+### Changed location of deployed *.dpkg_status and *.manifest files
+
+Now, parallel multiconfigs for different machines with same architectures don't
+share the same location for image *.manifest and *.dpkg_status files, so they
+are not owerwritten by last build ones anymore.
+
+Output file names now include distro name and architecture/machine name parts.
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index a10f0d7b..c1d854ae 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -74,6 +74,7 @@ ROOTFS_FEATURES += "clean-package-cache generate-manifest export-dpkg-status cle
 ROOTFS_PACKAGES += "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}"
 ROOTFS_MANIFEST_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
 ROOTFS_DPKGSTATUS_DEPLOY_DIR ?= "${DEPLOY_DIR_IMAGE}"
+ROOTFS_PACKAGE_SUFFIX ?= "${PN}-${DISTRO}-${MACHINE}"
 
 ROOTFS_POSTPROCESS_COMMAND_prepend = "${@bb.utils.contains('BASE_REPO_FEATURES', 'cache-deb-src', 'cache_deb_src', '', d)} "
 
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 6ecb39df..1fc48789 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -19,6 +19,8 @@ ROOTFS_APT_ARGS="install --yes -o Debug::pkgProblemResolver=yes"
 
 ROOTFS_CLEAN_FILES="/etc/hostname /etc/resolv.conf"
 
+ROOTFS_PACKAGE_SUFFIX ?= "${PN}-${DISTRO}-${DISTRO_ARCH}"
+
 # Useful environment variables:
 export E = "${@ isar_export_proxies(d)}"
 export DEBIAN_FRONTEND = "noninteractive"
@@ -231,14 +233,14 @@ rootfs_generate_manifest () {
     sudo -E chroot --userspec=$(id -u):$(id -g) '${ROOTFSDIR}' \
         dpkg-query -W -f \
             '${source:Package}|${source:Version}|${binary:Package}|${Version}\n' > \
-        ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest
+        '${ROOTFS_MANIFEST_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.manifest
 }
 
 ROOTFS_POSTPROCESS_COMMAND += "${@bb.utils.contains('ROOTFS_FEATURES', 'export-dpkg-status', 'rootfs_export_dpkg_status', '', d)}"
 rootfs_export_dpkg_status() {
     mkdir -p ${ROOTFS_DPKGSTATUS_DEPLOY_DIR}
     cp '${ROOTFSDIR}'/var/lib/dpkg/status \
-       '${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${PF}'.dpkg_status
+       '${ROOTFS_DPKGSTATUS_DEPLOY_DIR}'/'${ROOTFS_PACKAGE_SUFFIX}'.dpkg_status
 }
 
 do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}"
-- 
2.20.1


  reply	other threads:[~2022-01-12 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 12:57 [PATCH v2 0/1] Fix conflicting names " Uladzimir Bely
2022-01-12 12:57 ` Uladzimir Bely [this message]
2022-01-19  6:30 ` Anton Mikanovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220112125710.2426-2-ubely@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox