Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 5/8] package_manager.py: do not hardcode the task name when referring to log files
Date: Tue,  3 Apr 2018 18:45:21 +0300	[thread overview]
Message-ID: <20180403154524.31588-5-alexander.kanavin@linux.intel.com> (raw)
In-Reply-To: <20180403154524.31588-1-alexander.kanavin@linux.intel.com>

This can be do_rootfs or do_populate_sdk, or anything else.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
---
 meta/lib/oe/package_manager.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index 6c85a6d2c78..840a7bc34c5 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -392,7 +392,7 @@ class PackageManager(object, metaclass=ABCMeta):
                 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
                 if output: bb.note(output.decode("utf-8"))
             except subprocess.CalledProcessError as e:
-                bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
+                bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
                 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
                 self._postpone_to_first_boot(script_full)
 
@@ -789,7 +789,7 @@ class RpmPM(PackageManager):
                 failed_scriptlets_pkgnames[line.split()[-1]] = True
 
         if len(failed_scriptlets_pkgnames) > 0:
-            failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_rootfs"))
+            failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         for pkg in failed_scriptlets_pkgnames.keys():
             self.save_rpmpostinst(pkg)
 
@@ -1265,7 +1265,7 @@ class OpkgPM(OpkgDpkgPM):
                     bb.warn(line)
                     failed_pkgs.append(line.split(".")[0])
             if failed_pkgs:
-                failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_rootfs"))
+                failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         except subprocess.CalledProcessError as e:
             (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
                                               "Command '%s' returned %d:\n%s" %
@@ -1530,7 +1530,7 @@ class DpkgPM(OpkgDpkgPM):
                         bb.warn("%s for package %s failed with %d:\n%s" %
                                 (control_script.name, pkg_name, e.returncode,
                                     e.output.decode("utf-8")))
-                        failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_rootfs"))
+                        failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
                         failed_pkgs.append(pkg_name)
                         break
 
-- 
2.16.1



  parent reply	other threads:[~2018-04-03 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 15:45 [PATCH 1/8] nativesdk-postinst-intercept: remove the recipe Alexander Kanavin
2018-04-03 15:45 ` [PATCH 2/8] package_manager.py: move target_rootfs property to common ancestor class Alexander Kanavin
2018-04-03 15:45 ` [PATCH 3/8] package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class Alexander Kanavin
2018-04-03 15:45 ` [PATCH 4/8] package_manager.py: move intercept running logic from rootfs class " Alexander Kanavin
2018-04-03 15:45 ` Alexander Kanavin [this message]
2018-04-03 15:45 ` [PATCH 6/8] sdk.py: run postinst intercepts Alexander Kanavin
2018-04-03 15:45 ` [PATCH 7/8] gio-module-cache.bbclass: pass in ${libexecdir} Alexander Kanavin
2018-04-03 15:45 ` [PATCH 8/8] glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes Alexander Kanavin
2018-04-03 16:03 ` ✗ patchtest: failure for "nativesdk-postinst-intercept: ..." and 7 more Patchwork

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=20180403154524.31588-5-alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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