Hi,
in DNF's Copr plugin we are detecting whether you are running in Rawhide or 
not, so we can enable you rawhide chroot (or
numbered).

We use this code:

  import distro
  distro.linux_distribution(full_distribution_name=False)

which returns triplet:
  ('Fedora', '30', 'Rawhide')
  ('Fedora', '29', 'Workstation Edition')

where the third string is taken from /etc/os-release
  VERSION="30 (Rawhide)"
  VERSION="29 (Workstation Edition)"

it is the string in parentheses. If there is a rawhide, we think that the 
system is rawhide. But...

Apparently Cloud edition contains:
  VERSION="30 (Cloud Edition)"
  REDHAT_BUGZILLA_PRODUCT="Fedora"
  REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
  VARIANT="Cloud Edition"

and Atomic has:
  VERSION="30 (Atomic Host)"
  REDHAT_BUGZILLA_PRODUCT="Fedora"
  REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
  VARIANT="Atomic Host"

The documentaion of os-release is very tolerant. Quoting from
https://www.freedesktop.org/software/systemd/man/os-release.html

VERSION=
    A string identifying the operating system version, excluding any OS name 
information, possibly including a release
code name, and suitable for presentation to the user. This field is optional. 
Example: "VERSION=17" or "VERSION="17
(Beefy Miracle)"".

Now I struggle what is the correct way? Should Cloud/Atomic fix they VERSION 
for rawhide to state VERSION="30 (Rawhide)"
and use VARIANT to distinguish the variant?
Or I should try to add something to upstream of python-distro to help detect 
rawhide (note: I am not the upstream author)?
Or should I do quick'n'dirty "if 'rawhide' in 
os-release['REDHAT_BUGZILLA_PRODUCT_VERSION']" in our copr plugin?
Or something completely different?

Miroslav
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]

Reply via email to