From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 21/24] devtool: show a better error message if meta-files aren't found
Date: Thu, 9 Nov 2017 14:55:22 +1300 [thread overview]
Message-ID: <5dfcdb113ef4e28216fd18fc380d35ea0d0c59cd.1510192329.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1510192329.git.paul.eggleton@linux.intel.com>
If the files that the devtool-source class is supposed to create in the
source tree aren't found in the temporary directory then we know that
the class hasn't worked properly - say that explicitly.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
scripts/lib/devtool/standard.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 5ac678b..1e7d707 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -544,11 +544,14 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
if not res:
raise DevtoolError('Extracting source for %s failed' % pn)
- with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
- initial_rev = f.read()
+ try:
+ with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:
+ initial_rev = f.read()
- with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
- srcsubdir = f.read()
+ with open(os.path.join(tempdir, 'srcsubdir'), 'r') as f:
+ srcsubdir = f.read()
+ except FileNotFoundError as e:
+ raise DevtoolError('Something went wrong with source extraction - the devtool-source class was not active or did not function correctly:\n%s' % str(e))
srcsubdir_rel = os.path.relpath(srcsubdir, os.path.join(tempdir, 'workdir'))
tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
--
2.9.5
next prev parent reply other threads:[~2017-11-09 1:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 1:55 [PATCH 00/24] devtool / recipetool improvements Paul Eggleton
2017-11-09 1:55 ` [PATCH 01/24] recipetool: pass absolute source tree path to plugins Paul Eggleton
2017-11-09 1:55 ` [PATCH 02/24] recipetool: ignore incidental kernel module source Paul Eggleton
2017-11-09 1:55 ` [PATCH 03/24] lib/oe/recipeutils: fix find_layerdir() to return absolute paths Paul Eggleton
2017-11-09 1:55 ` [PATCH 04/24] lib/oe/recipeutils: fix line splitting in patch_recipe_* Paul Eggleton
2017-11-09 1:55 ` [PATCH 05/24] devtool: upgrade: fix accidentally swapped parameters Paul Eggleton
2017-11-09 1:55 ` [PATCH 06/24] devtool: upgrade: fix not committing deleted files with older git versions Paul Eggleton
2017-11-09 1:55 ` [PATCH 07/24] devtool: upgrade: improve performance and show progress when adding files Paul Eggleton
2017-11-09 1:55 ` [PATCH 08/24] devtool: fix handling of oe-local-files when source is in a subdirectory Paul Eggleton
2017-11-09 1:55 ` [PATCH 09/24] devtool: show some warnings for upgrade versions Paul Eggleton
2017-11-09 1:55 ` [PATCH 10/24] devtool: make find-recipe and edit-recipe always work with any recipe Paul Eggleton
2017-11-09 1:55 ` [PATCH 11/24] devtool: reset: print source tree base path Paul Eggleton
2017-11-09 1:55 ` [PATCH 12/24] devtool: finish: ensure repository is clean before proceeding Paul Eggleton
2017-11-09 1:55 ` [PATCH 13/24] devtool: finish: fix "layer not in bblayers.conf" warning when path specified Paul Eggleton
2017-11-09 1:55 ` [PATCH 14/24] devtool: upgrade: handle recipes that use named SRC_URI checksums Paul Eggleton
2017-11-09 1:55 ` [PATCH 15/24] recipetool: create: drop debug print Paul Eggleton
2017-11-09 1:55 ` [PATCH 16/24] devtool: stop always moving workspace to end of BBLAYERS Paul Eggleton
2017-11-09 1:55 ` [PATCH 17/24] recipetool: create: show a warning for github archive URLs Paul Eggleton
2017-11-09 1:55 ` [PATCH 18/24] devtool: upgrade: show messages before source extraction steps Paul Eggleton
2017-11-09 1:55 ` [PATCH 19/24] devtool: upgrade: automatically handle changes to source subdirectory Paul Eggleton
2017-11-09 1:55 ` [PATCH 20/24] devtool: upgrade: reformat --no-patch warning message Paul Eggleton
2017-11-09 1:55 ` Paul Eggleton [this message]
2017-11-09 1:55 ` [PATCH 22/24] devtool: finish: improve reporting for removed files Paul Eggleton
2017-11-09 1:55 ` [PATCH 23/24] devtool: finish: add dry-run option Paul Eggleton
2017-11-09 1:55 ` [PATCH 24/24] devtool: implement conditional patch handling Paul Eggleton
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=5dfcdb113ef4e28216fd18fc380d35ea0d0c59cd.1510192329.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@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