From 3a4dac8e9bc87afad1f09eb5c3576d12032009c3 Mon Sep 17 00:00:00 2001 From: Zen Date: Tue, 21 Jan 2025 16:27:43 -0600 Subject: [PATCH 1/2] only log that the output file was resolved if it was Signed-off-by: Zen --- src/ugrd/base/core.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ugrd/base/core.py b/src/ugrd/base/core.py index f6ad5af8..263a4fad 100644 --- a/src/ugrd/base/core.py +++ b/src/ugrd/base/core.py @@ -1,5 +1,5 @@ __author__ = "desultory" -__version__ = "4.1.0" +__version__ = "4.1.1" from pathlib import Path from shutil import rmtree, which @@ -258,8 +258,11 @@ def _process_out_file(self, out_file: str) -> None: return if "/" in out_file: # If the out_file contains a path, resolve it - out_file = Path(out_file).resolve() - self.logger.info("Resolved relative output path: %s" % out_file) + out_file = Path(out_file) + resolved_out_file = out_file.resolve() + if resolved_out_file != out_file: + out_file = resolved_out_file + self.logger.info("Resolved relative output path: %s" % out_file) else: out_file = Path(out_file) From 2c0391f83e55300b32a9d961806cf80349d963cb Mon Sep 17 00:00:00 2001 From: Zen Date: Wed, 22 Jan 2025 13:26:47 -0600 Subject: [PATCH 2/2] use old staging area dirname if INSTALLKERNEL_STAGING_AREA is not set Signed-off-by: Zen --- hooks/installkernel/52-ugrd.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/installkernel/52-ugrd.install b/hooks/installkernel/52-ugrd.install index 095ba8b6..dcc5a29c 100644 --- a/hooks/installkernel/52-ugrd.install +++ b/hooks/installkernel/52-ugrd.install @@ -4,7 +4,7 @@ ver=${1} img=${2} -initrd=${INSTALLKERNEL_STAGING_AREA}/initrd +initrd=${INSTALLKERNEL_STAGING_AREA:-$(dirname "${img}")}/initrd # familiar helpers, we intentionally don't use Gentoo functions.sh die() {