formats/v1: remove implicit assembler export
When building a version 1 manifest, the assembler would always be exported, even when not requested via the `--export` command line option. This was done for backwards compatibility so to not break tools relying on that behavior. The problem is that support for this uses a completely different code path and might also now be confusing behavior. Thus remove the implicit and really only ever export what was explicitly requested by the caller.
This commit is contained in:
parent
17136a70e4
commit
8770bdf10a
5 changed files with 8 additions and 20 deletions
|
|
@ -19,6 +19,7 @@ from .. import test
|
|||
|
||||
class TapeMonitor(osbuild.monitor.BaseMonitor):
|
||||
"""Record the usage of all called functions"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(sys.stderr.fileno())
|
||||
self.counter = defaultdict(int)
|
||||
|
|
@ -62,7 +63,6 @@ class TestMonitor(unittest.TestCase):
|
|||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
storedir = os.path.join(tmpdir, "store")
|
||||
outputdir = os.path.join(tmpdir, "output")
|
||||
|
||||
logfile = os.path.join(tmpdir, "log.txt")
|
||||
|
||||
|
|
@ -70,8 +70,7 @@ class TestMonitor(unittest.TestCase):
|
|||
monitor = LogMonitor(log.fileno())
|
||||
res = pipeline.run(store,
|
||||
monitor,
|
||||
libdir=os.path.abspath(os.curdir),
|
||||
output_directory=outputdir)
|
||||
libdir=os.path.abspath(os.curdir))
|
||||
|
||||
with open(logfile) as f:
|
||||
log = f.read()
|
||||
|
|
@ -97,14 +96,12 @@ class TestMonitor(unittest.TestCase):
|
|||
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
storedir = os.path.join(tmpdir, "store")
|
||||
outputdir = os.path.join(tmpdir, "output")
|
||||
|
||||
tape = TapeMonitor()
|
||||
with ObjectStore(storedir) as store:
|
||||
res = pipeline.run(store,
|
||||
tape,
|
||||
libdir=os.path.abspath(os.curdir),
|
||||
output_directory=outputdir)
|
||||
libdir=os.path.abspath(os.curdir))
|
||||
|
||||
assert res
|
||||
self.assertEqual(tape.counter["begin"], 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue