Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen-machine-conf fails if CONFIG_PRE_MIRROR_URL exactly matches default URL #3

Open
ph1l1p139 opened this issue Sep 18, 2024 · 1 comment

Comments

@ph1l1p139
Copy link

ph1l1p139 commented Sep 18, 2024

Hi,

I'm using Petalinux 2023.1 but I suspect this issue applies to other versions too. If CONFIG_PRE_MIRROR_URL is set to the exact default URL of:

http://petalinux.xilinx.com/sswreleases/rel-v%s/downloads' % (plnx_major_ver)

(e.g "http://petalinux.xilinx.com/sswreleases/rel-v2023/downloads"

Then the petalinux-config command fails with a traceback as below:

[INFO] Generating plnxtool conf file
Traceback (most recent call last):
  File "/home/plnx-build/build/dgc219_nsg/dgc219/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/gen-machineconf", line 439, in <module>
    ret = main()
  File "/home/plnx-build/build/dgc219_nsg/dgc219/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/gen-machineconf", line 426, in main
    plnx_conf_file = generate_plnx_config(args, machine_conf_file, hw_flow)
  File "/home/plnx-build/build/dgc219_nsg/dgc219/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/gen_plnx_machine.py", line 265, in generate_plnx_config
    override_string += generate_mirrors(args, arch)
  File "/home/plnx-build/build/dgc219_nsg/dgc219/components/yocto/layers/meta-xilinx/meta-xilinx-core/gen-machine-conf/xilinx_mirrors.py", line 114, in generate_mirrors
    mirrrs_string += 'SOURCE_MIRROR_URL = "%s"\n' % pre_mirror_url
UnboundLocalError: local variable 'mirrrs_string' referenced before assignment

Looking at xilinx_mirrors.py there is a typo in the variable mirrors_string (typed as mirrrs_string) on line 114.

I've found a workaround of adding a trailing / at the end of CONFIG_PRE_MIRROR_URL for now.

@Rajukumar45
Copy link
Contributor

Thanks for the report. I'll fix the typo in the variable name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants