mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs_upgrade_history: add stop commit option
Add an option to stop at a particular commit (so we can then repeat a specific commit afterwards easily for debugging purposes). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
cea8a64517
commit
3deb6f1416
|
@ -175,6 +175,10 @@ def upgrade_history(options, logger):
|
||||||
for commit in bitbake_commit_list:
|
for commit in bitbake_commit_list:
|
||||||
bitbake_map[commit] = '39780b1ccbd76579db0fc6fb9369c848a3bafa9d'
|
bitbake_map[commit] = '39780b1ccbd76579db0fc6fb9369c848a3bafa9d'
|
||||||
|
|
||||||
|
if options.stop_commit and (options.stop_commit not in [x.split()[0] for x in commit_list]):
|
||||||
|
logger.error('Stop commit %s is not in repository %s' % (options.stop_commit, repodir))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if initial:
|
if initial:
|
||||||
logger.debug("Adding initial upgrade history ....")
|
logger.debug("Adding initial upgrade history ....")
|
||||||
|
|
||||||
|
@ -192,6 +196,9 @@ def upgrade_history(options, logger):
|
||||||
for item in commit_list:
|
for item in commit_list:
|
||||||
if item:
|
if item:
|
||||||
ct, ctepoch = item.split()
|
ct, ctepoch = item.split()
|
||||||
|
if ct == options.stop_commit:
|
||||||
|
logger.debug('Stopping at requested commit %s' % ct)
|
||||||
|
break
|
||||||
ctdate = datetime.fromtimestamp(int(ctepoch))
|
ctdate = datetime.fromtimestamp(int(ctepoch))
|
||||||
commitobj = repo.commit(ct)
|
commitobj = repo.commit(ct)
|
||||||
touches_recipe = False
|
touches_recipe = False
|
||||||
|
@ -240,6 +247,10 @@ if __name__=="__main__":
|
||||||
help="Specify a single commit to import (for debugging)",
|
help="Specify a single commit to import (for debugging)",
|
||||||
action="store", dest="commit", default='')
|
action="store", dest="commit", default='')
|
||||||
|
|
||||||
|
parser.add_option("--stop-commit",
|
||||||
|
help="Specify a commit to stop at (for debugging)",
|
||||||
|
action="store", dest="stop_commit", default='')
|
||||||
|
|
||||||
parser.add_option("-d", "--debug",
|
parser.add_option("-d", "--debug",
|
||||||
help = "Enable debug output",
|
help = "Enable debug output",
|
||||||
action="store_const", const=logging.DEBUG, dest="loglevel", default=logging.INFO)
|
action="store_const", const=logging.DEBUG, dest="loglevel", default=logging.INFO)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user