Skip to content

make-ring.py choose_distribution fails if /etc/os-release does not exists

OS: Guix System 6094725 (Linux gnu 5.10.7-gnu)
ring-project: f069b73d

Steps to reproduce

  1. git clone https://git.jami.net/savoirfairelinux/ring-project.git
  2. guix install python
  3. cd path/to/ring-project
  4. ./make-ring.py --init

Expected result

According to the README:

"It initializes and updates the submodules to set them at the top of their master branch. This is ideal to have the latest development version."

Unexpected result

The program exists with this error:

Traceback (most recent call last):
  File "./make-ring.py", line 655, in <module>
    main()
  File "./make-ring.py", line 633, in main
    parsed_args = parse_args()
  File "./make-ring.py", line 594, in parse_args
    dist = choose_distribution()
  File "./make-ring.py", line 619, in choose_distribution
    with open("/etc/os-release") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/os-release'

I would expect it to, at least, exit with a message indicating that the build script does not currently support the distribution, and maybe some information of alternative ways to build.

Additional information

The Guix System is distribution of the GNU operating system and doesn't include the /etc/os-realease file for the reasons mentioned in Guix issue #34154.

Edited by Luis Felipe