From e352b77e3fe51dda2e80b103097c6b68c748b6db Mon Sep 17 00:00:00 2001 From: Ralf Hubert Date: Tue, 22 Oct 2024 11:29:11 +0200 Subject: [PATCH] layers: fix move to attic When the layers where updated from bob build/dev move to attic was disabled by default. As the unittest only tests the attic move from `bob layers update` this has been overlooked as attic is True in this case while it's None for build/dev. Adapt the default for the layers update command to match the default from build/dev. --- pym/bob/cmds/layers.py | 2 +- pym/bob/layers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/bob/cmds/layers.py b/pym/bob/cmds/layers.py index cde5b5c9..b2a36f94 100644 --- a/pym/bob/cmds/layers.py +++ b/pym/bob/cmds/layers.py @@ -36,7 +36,7 @@ def doLayersUpdate(argv): parser.add_argument('-D', default=[], action='append', dest="defines", help="Override default environment variable") group = parser.add_mutually_exclusive_group() - group.add_argument('--attic', action='store_true', default=True, + group.add_argument('--attic', action='store_true', default=None, help="Move scm to attic if inline switch is not possible (default).") group.add_argument('--no-attic', action='store_false', default=None, dest='attic', help="Do not move to attic, instead fail the build.") diff --git a/pym/bob/layers.py b/pym/bob/layers.py index 99f4be59..68d8dc6a 100644 --- a/pym/bob/layers.py +++ b/pym/bob/layers.py @@ -208,7 +208,7 @@ def getScm(self): class Layers: def __init__(self, defines, attic): self.__layers = {} - self.__attic = attic + self.__attic = attic if attic is not None else True self.__defines = defines self.__layerConfigFiles = []