summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/devtool.py4
-rw-r--r--scripts/lib/devtool/standard.py6
2 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 74fb325803..33f2e91607 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -179,9 +179,13 @@ class DevtoolTests(oeSelfTest):
179 if line.startswith('.TH'): 179 if line.startswith('.TH'):
180 self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified') 180 self.assertEqual(line.rstrip(), '.TH MDADM 8 "" v9.999-custom', 'man file not modified')
181 # Test devtool reset 181 # Test devtool reset
182 stampprefix = get_bb_var('STAMP', 'mdadm')
182 result = runCmd('devtool reset mdadm') 183 result = runCmd('devtool reset mdadm')
183 result = runCmd('devtool status') 184 result = runCmd('devtool status')
184 self.assertNotIn('mdadm', result.output) 185 self.assertNotIn('mdadm', result.output)
186 self.assertTrue(stampprefix, 'Unable to get STAMP value for recipe mdadm')
187 matches = glob.glob(stampprefix + '*')
188 self.assertFalse(matches, 'Stamp files exist for recipe mdadm that should have been cleaned')
185 189
186 def test_devtool_update_recipe(self): 190 def test_devtool_update_recipe(self):
187 # Check preconditions 191 # Check preconditions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d503111d85..763177de1c 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -475,6 +475,11 @@ def reset(args, config, basepath, workspace):
475 if not args.recipename in workspace: 475 if not args.recipename in workspace:
476 logger.error("no recipe named %s in your workspace" % args.recipename) 476 logger.error("no recipe named %s in your workspace" % args.recipename)
477 return -1 477 return -1
478
479 if not args.no_clean:
480 logger.info('Cleaning sysroot for recipe %s...' % args.recipename)
481 exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % args.recipename)
482
478 _check_preserve(config, args.recipename) 483 _check_preserve(config, args.recipename)
479 484
480 preservepath = os.path.join(config.workspace_path, 'attic', args.recipename) 485 preservepath = os.path.join(config.workspace_path, 'attic', args.recipename)
@@ -555,5 +560,6 @@ def register_commands(subparsers, context):
555 description='Removes the specified recipe from your workspace (resetting its state)', 560 description='Removes the specified recipe from your workspace (resetting its state)',
556 formatter_class=argparse.ArgumentDefaultsHelpFormatter) 561 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
557 parser_reset.add_argument('recipename', help='Recipe to reset') 562 parser_reset.add_argument('recipename', help='Recipe to reset')
563 parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
558 parser_reset.set_defaults(func=reset) 564 parser_reset.set_defaults(func=reset)
559 565