0004-FSDG-os-release-Default-ID-to-gnu-linux-instead-of-l.patch 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From 27d6039270fe98df9a6b49ca53324b9acf8a7264 Mon Sep 17 00:00:00 2001
  2. From: Luke Shumaker <lukeshu@parabola.nu>
  3. Date: Wed, 25 May 2016 12:28:30 -0400
  4. Subject: [PATCH 4/7] FSDG: os-release: Default ID to "gnu-linux" instead of
  5. "linux"
  6. As far as I can tell, no code in this repository actually uses the ID
  7. field, so this is just a man page change.
  8. ---
  9. man/check-os-release-simple.py | 2 +-
  10. man/check-os-release.py | 2 +-
  11. man/check-os-release.sh | 2 +-
  12. man/os-release.xml | 2 +-
  13. 4 files changed, 4 insertions(+), 4 deletions(-)
  14. diff --git a/man/check-os-release-simple.py b/man/check-os-release-simple.py
  15. index 9ad899a814..63ea424891 100644
  16. --- a/man/check-os-release-simple.py
  17. +++ b/man/check-os-release-simple.py
  18. @@ -7,6 +7,6 @@ os_release = platform.freedesktop_os_release()
  19. pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
  20. print(f'Running on {pretty_name!r}')
  21. -if 'fedora' in [os_release.get('ID', 'linux'),
  22. +if 'fedora' in [os_release.get('ID', 'gnu-linux'),
  23. *os_release.get('ID_LIKE', '').split()]:
  24. print('Looks like Fedora!')
  25. diff --git a/man/check-os-release.py b/man/check-os-release.py
  26. index 373b77ed06..09aebd7a4f 100644
  27. --- a/man/check-os-release.py
  28. +++ b/man/check-os-release.py
  29. @@ -32,6 +32,6 @@ os_release = dict(read_os_release())
  30. pretty_name = os_release.get('PRETTY_NAME', 'GNU/Linux')
  31. print(f'Running on {pretty_name!r}')
  32. -if 'debian' in [os_release.get('ID', 'linux'),
  33. +if 'debian' in [os_release.get('ID', 'gnu-linux'),
  34. *os_release.get('ID_LIKE', '').split()]:
  35. print('Looks like Debian!')
  36. diff --git a/man/check-os-release.sh b/man/check-os-release.sh
  37. index 084647a38b..c02b4e6743 100644
  38. --- a/man/check-os-release.sh
  39. +++ b/man/check-os-release.sh
  40. @@ -6,6 +6,6 @@ test -e /etc/os-release && os_release='/etc/os-release' || os_release='/usr/lib/
  41. echo "Running on ${PRETTY_NAME:-GNU/Linux}"
  42. -if [ "${ID:-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
  43. +if [ "${ID:-gnu-linux}" = "debian" ] || [ "${ID_LIKE#*debian*}" != "${ID_LIKE}" ]; then
  44. echo "Looks like Debian!"
  45. fi
  46. diff --git a/man/os-release.xml b/man/os-release.xml
  47. index f5167c6af0..e5a797489c 100644
  48. --- a/man/os-release.xml
  49. +++ b/man/os-release.xml
  50. @@ -159,7 +159,7 @@
  51. <listitem><para>A lower-case string (no spaces or other characters outside of 0–9, a–z, ".", "_"
  52. and "-") identifying the operating system, excluding any version information and suitable for
  53. processing by scripts or usage in generated filenames. If not set, a default of
  54. - <literal>ID=linux</literal> may be used. Note that even though this string may not include
  55. + <literal>ID=gnu-linux</literal> may be used. Note that even though this string may not include
  56. characters that require shell quoting, quoting may nevertheless be used.</para>
  57. <para>Examples: <literal>ID=fedora</literal>, <literal>ID=debian</literal>.</para></listitem>
  58. --
  59. 2.45.2