Bug 12130

Summary: Layer index update script outputs initial info to console
Product: [Yocto Project Subprojects] Layer Index Reporter: Paul Eggleton <bluelightning>
Component: Layer IndexAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: brian.avery, randy.macleod, tim.orling
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard: .
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2017-09-27 02:37:30 UTC
As part of getting the information we need to determine layer dependencies we run the update_layer.py from update.py with --initial and pass the required information back via stdout, however that results in it being printed to the console:

----------- snip -----------
$ python3 layerindex/update.py -l openembedded-core -b master
INFO: Fetching remote repository git://git.openembedded.org/openembedded-core
INFO: Fetching bitbake from remote repository git://git.openembedded.org/bitbake
NOTE: Starting bitbake server...
INFO: Collecting data for layer openembedded-core on branch master
BBFILE_COLLECTIONS = "core"
LAYERVERSION = "11"
LAYERDEPENDS = ""
LAYERRECOMMENDS = ""
INFO: Sorting layers for branch master
...
----------- snip -----------

This is quite ugly, we need a way to hide this output (without hiding any errors from update_layer.py if they do happen). Perhaps we need a different channel to pass the data back in?
Comment 1 Randy MacLeod 2023-10-24 14:24:37 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 2 Tim Orling 2023-11-02 23:43:58 UTC
For reference, the --initial option in update_layer.py:
    ...
    parser.add_option("-i", "--initial",
            help = "Print initial values parsed from layer.conf only",
            ...

which is called in the cmd built in main() for update.py:
       ...
       cmd = prepare_update_layer_command(options, branchobj, layer,initial=True)
       logger.debug('Running layer update command: %s' % cmd)
       ret, output = utils.run_command_interruptible(cmd)
       logger.debug('output: %s' % output)
       ...
Comment 3 Tim Orling 2024-02-01 03:18:23 UTC
This means we can easily miss the fact that a layer can no longer be fetched:

ERROR: Fetch of layer meta-telephony failed: Cloning into 'git___git_osmocom_org_meta-telephony'...
fatal: unable to connect to git.osmocom.org:
git.osmocom.org[0: 78.46.96.155]: errno=Connection refused
git.osmocom.org[1: 2a01:4f8:120:8470::2]: errno=Cannot assign requested address
ERROR: Fetch of layer meta-pypy failed: Cloning into 'https___github_com_mzakharo_meta-pypy_git'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
ERROR: Fetch of layer meta-sitec-score failed: Cloning into 'https___github_com_sitec-systems_meta-sitec-score'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
ERROR: Fetch of layer meta-sitec-bsp failed: Cloning into 'https___github_com_sitec-systems_meta-sitec-bsp'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
ERROR: Fetch of layer meta-tangle failed: Cloning into 'https___github_com_iotaledger_meta-iota'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
ERROR: Fetch of layer meta-mediatek failed: Cloning into 'https___gitlab_com_baylibre_mediatek_meta-mediatek_git'...
fatal: could not read Username for 'https://gitlab.com': terminal prompts disabled
Comment 4 Tim Orling 2026-02-05 16:22:40 UTC
Move from 5.99 to 6.99