equinor / komodoenv

Komodoenv is the virtualenv of the Komodo world
GNU General Public License v3.0
1 stars 3 forks source link

FileNotFoundError in komodoenv-update #30

Closed jondequinor closed 3 years ago

jondequinor commented 3 years ago

Ran

komodoenv -r stable foo

Get this (seemingly randomly)

Traceback (most recent call last):
  File "/private/jond/foo/root/bin/komodoenv-update", line 436, in <module>
    main()
  File "/private/jond/foo/root/bin/komodoenv-update", line 403, in main
    if args.check and not can_update(config):
  File "/private/jond/foo/root/bin/komodoenv-update", line 247, in can_update
    config, os.path.join(config["komodo-root"], config["tracked-release"], "root")
  File "/private/jond/foo/root/bin/komodoenv-update", line 232, in get_pkg_version
    for name in os.listdir(pkgdir):
FileNotFoundError: [Errno 2] No such file or directory: '/prog/res/komodo/stable-py36/root/lib/python3.6/site-packages'

Affects bleeding. I have not seen the same after sourcing the equivalent 2021.02.00-py36-rhel7.

sondreso commented 3 years ago

This bug surfaced again, and was reported by a user. The reason why this happens, is because the root/ folder is not inside /prog/res/komodo/stable-py36 (or the actual directory if you follow the symlinks), but rather in the rhel specific version of the release (eg. /prog/res/komodo/2021.07.00-py36-rhel7).

sondreso commented 3 years ago

Closed by https://github.com/equinor/komodoenv/pull/32