[oe-commits] [openembedded-core] 04/25: devtool: Avoid failure for recipes with S == WORKDIR and no local files

git at git.openembedded.org git at git.openembedded.org
Mon Nov 18 14:48:12 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch warrior
in repository openembedded-core.

commit 025091692e73b78c36bd4095288b9f3fc7ee1811
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Tue Nov 5 23:08:34 2019 +0100

    devtool: Avoid failure for recipes with S == WORKDIR and no local files
    
    When extracting the sources for a recipe that has S == WORKDIR and no
    local files in the SRC_URI (which, e.g., can happen for a recipe with
    a URI that has the unpack=false attribute), the extraction fails with
    the following backtrace:
    
      Traceback (most recent call last):
        File ".../scripts/devtool", line 344, in <module>
          ret = main()
        File ".../scripts/devtool", line 331, in main
          ret = args.func(args, config, basepath, workspace)
        File ".../poky/scripts/lib/devtool/standard.py", line 762, in
        modify
          initial_rev, _ = _extract_source(srctree, args.keep_temp,
          args.branch, False, config, basepath, workspace,
          args.fixed_setup, rd, tinfoil, no_overrides=args.no_overrides)
        File ".../poky/scripts/lib/devtool/standard.py", line 647, in
        _extract_source
          bb.process.run('git %s commit -a -m "Committing local file
          symlinks\n\n%s"' % (' '.join(useroptions),
          oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
        File ".../poky/bitbake/lib/bb/process.py", line 178, in run
          raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
      bb.process.ExecutionError: Execution of 'git commit -a -m
      "Committing local file symlinks
    
      %% ignore"' failed with exit code 1:
      On branch devtool
      nothing to commit, working tree clean
    
    This is because no files were found in the oe-local-files directory
    and consequently no symbolic links were added using `git add`, but the
    `git commit` command was still executed.
    
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 scripts/lib/devtool/standard.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index aca74b1..dcb6bf9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -637,9 +637,9 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
                         addfiles.append(os.path.join(relpth, fn))
                 if addfiles:
                     bb.process.run('git add %s' % ' '.join(addfiles), cwd=srctree)
-                useroptions = []
-                oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
-                bb.process.run('git %s commit -a -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
+                    useroptions = []
+                    oe.patch.GitApplyTree.gitCommandUserOptions(useroptions, d=d)
+                    bb.process.run('git %s commit -m "Committing local file symlinks\n\n%s"' % (' '.join(useroptions), oe.patch.GitApplyTree.ignore_commit_prefix), cwd=srctree)
 
         if is_kernel_yocto:
             logger.info('Copying kernel config to srctree')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list