The YAML processor is currently failing in AutoPkg version 2.3.1 with the following error:
% autopkg run -vvv YamlTest.recipe
Processing YamlTest.recipe...
WARNING: YamlTest.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
Traceback (most recent call last):
File "/usr/local/bin/autopkg", line 2758, in <module>
sys.exit(main(sys.argv))
File "/usr/local/bin/autopkg", line 2754, in main
return subcommands[verb]["function"](argv)
File "/usr/local/bin/autopkg", line 2258, in run_recipes
autopackager.verify(recipe)
File "/Library/AutoPkg/autopkglib/__init__.py", line 789, in verify
variables.update(set(processor_class.output_variables.keys()))
AttributeError: type object 'YAML' has no attribute 'output_variables'
The fix is to add an output_variables attribute to the processor, even though the processor won't directly use this attribute.
With this change, the environment variables are set as intended:
% autopkg run -vvv YamlTest.recipe
Processing YamlTest.recipe...
WARNING: YamlTest.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
{'AUTOPKG_VERSION': '2.3.1',
...snip...
'verbose': 3}
YAML
{'Input': {'keys': ['version', 'path'],
'url': 'https://updates.signal.org/desktop/latest-mac.yml'}}
YAML.py:42: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
releases = yaml.load(response)
{'Output': {}}
{'AUTOPKG_VERSION': '2.3.1',
...snip...
'keys': ['version', 'path'],
'path': 'signal-desktop-mac-5.16.0.zip',
'url': 'https://updates.signal.org/desktop/latest-mac.yml',
'verbose': 3,
'version': '5.16.0'}
Receipt written to ~/Library/AutoPkg/Cache/local.YamlTest/receipts/YamlTest-receipt-20210904-160330.plist
The YAML processor is currently failing in AutoPkg version 2.3.1 with the following error:
The fix is to add an
output_variables
attribute to the processor, even though the processor won't directly use this attribute.With this change, the environment variables are set as intended:
Here is the simple recipe I used for testing: