All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend
@ 2019-09-20 20:30 Peter Kjellerstedt
  2019-09-20 20:30 ` [PATCH 2/2] devtool: finish: Add suppport for the --no-clean option Peter Kjellerstedt
  2019-09-23 21:08 ` [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Paul Eggleton
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2019-09-20 20:30 UTC (permalink / raw)
  To: openembedded-core

From: Niclas Svensson <niclass@axis.com>

The _get_patchset_revs() function returns the patches in an
OrderedDict to keep them ordered. However, this information was lost
when the patches were added to the bbappend file.

Signed-off-by: Niclas Svensson <niclas.svensson@axis.com>
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/lib/devtool/standard.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 9eeaefb79c..64fa420bf1 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1619,17 +1619,17 @@ def _update_recipe_patch(recipename, workspace, srctree, rd, appendlayerdir, wil
                                           patches_dir, changed_revs)
         logger.debug('Pre-filtering: update: %s, new: %s' % (dict(upd_p), dict(new_p)))
         if filter_patches:
-            new_p = {}
-            upd_p = {k:v for k,v in upd_p.items() if k in filter_patches}
+            new_p = OrderedDict()
+            upd_p = OrderedDict((k,v) for k,v in upd_p.items() if k in filter_patches)
             remove_files = [f for f in remove_files if f in filter_patches]
         updatefiles = False
         updaterecipe = False
         destpath = None
         srcuri = (rd.getVar('SRC_URI', False) or '').split()
         if appendlayerdir:
-            files = dict((os.path.join(local_files_dir, key), val) for
+            files = OrderedDict((os.path.join(local_files_dir, key), val) for
                          key, val in list(upd_f.items()) + list(new_f.items()))
-            files.update(dict((os.path.join(patches_dir, key), val) for
+            files.update(OrderedDict((os.path.join(patches_dir, key), val) for
                               key, val in list(upd_p.items()) + list(new_p.items())))
             if files or remove_files:
                 removevalues = None
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] devtool: finish: Add suppport for the --no-clean option
  2019-09-20 20:30 [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Peter Kjellerstedt
@ 2019-09-20 20:30 ` Peter Kjellerstedt
  2019-09-23 21:08 ` [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2019-09-20 20:30 UTC (permalink / raw)
  To: openembedded-core

This works just like the already existing --no-clean option to the
`devtool reset` command.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 scripts/lib/devtool/standard.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 64fa420bf1..60c9a046f9 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -2008,7 +2008,7 @@ def finish(args, config, basepath, workspace):
         else:
             raise DevtoolError('Source tree is not clean:\n\n%s\nEnsure you have committed your changes or use -f/--force if you are sure there\'s nothing that needs to be committed' % dirty)
 
-    no_clean = False
+    no_clean = args.no_clean
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
     try:
         rd = parse_recipe(config, tinfoil, args.recipename, True)
@@ -2282,6 +2282,7 @@ def register_commands(subparsers, context):
     parser_finish.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE')
     parser_finish.add_argument('--initial-rev', help='Override starting revision for patches')
     parser_finish.add_argument('--force', '-f', action="store_true", help='Force continuing even if there are uncommitted changes in the source tree repository')
+    parser_finish.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
     parser_finish.add_argument('--no-overrides', '-O', action="store_true", help='Do not handle other override branches (if they exist)')
     parser_finish.add_argument('--dry-run', '-N', action="store_true", help='Dry-run (just report changes instead of writing them)')
     parser_finish.add_argument('--force-patch-refresh', action="store_true", help='Update patches in the layer even if they have not been modified (useful for refreshing patch context)')
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend
  2019-09-20 20:30 [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Peter Kjellerstedt
  2019-09-20 20:30 ` [PATCH 2/2] devtool: finish: Add suppport for the --no-clean option Peter Kjellerstedt
@ 2019-09-23 21:08 ` Paul Eggleton
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggleton @ 2019-09-23 21:08 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Kjellerstedt

On Saturday, 21 September 2019 8:30:42 AM NZST Peter Kjellerstedt wrote:
> From: Niclas Svensson <niclass@axis.com>
> 
> The _get_patchset_revs() function returns the patches in an
> OrderedDict to keep them ordered. However, this information was lost
> when the patches were added to the bbappend file.

Both this and 2/2 look good to me.

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Thanks
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-23 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-20 20:30 [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Peter Kjellerstedt
2019-09-20 20:30 ` [PATCH 2/2] devtool: finish: Add suppport for the --no-clean option Peter Kjellerstedt
2019-09-23 21:08 ` [PATCH 1/2] devtool: finish: Keep patches ordered when updating bbappend Paul Eggleton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.