Comment # 6 on bug 1088306 from
Keep on thing about this...

BTW: "The whole design of os-release means they SHOULD check "if ID=$foo ||
ID_LIKE~=$foo"" (c) Richard Brown

Due to cat /etc/os-release for commercial version of SUSE (SLES, SLED, CaaSP):
https://en.opensuse.org/SDB:SUSE_and_openSUSE_Products_Version_Outputs

No ID_LIKE= field is present for them, ID= only instead of non-commercial
versions.

I'm not aware of reasons for that, but, personally, this makes an additional
mess.

Let's have just simple and nice scheme here, based on principle 'once invented
works hundreds of years':

1) To add ID_LIKE= field in /etc/os-release also for commercial version of SUSE
(SLES, SLED, CaaSP). This can give possible to make such granulation:

2) For commercial versions of SUSE (SLES, SLED, CaaSP): ID_LIKE="suse"
   For non-commercial versions of SUSE (Leap, TW, Leap-based projects, TW-base
projects): ID_LIKE="opensuse"

Advantages:
===========
A. This will annihilate the mess we have nowadays: here we have ID_LIKE="suse",
there -- "opensuse suse", something elsewhere -- "suse opensuse suse
mega-super-duper-something-else".

B. Simple and nice way for external developers to parse OS type to install
their software.

C. With scheme from "Solution to have:" paragraph for ID= fields, we can have:

C1. For non-commercial versions:

ID="opensuse-leap" | "opensuse-tumbleweed" | "opensuse-leap-%projectname%" |
"opensuse-tumbleweed-%projectname%"
ID_LIKE="opensuse"

C2. For commercial versions:

ID="sles" | "sled" | "caasp" | "sles-%projectname%" | "sled-%projectname%" |
"caasp-%projectname%"
ID_LIKE="suse"

I think, it is applicable.

As an additional advantage for external developers, this will give possibility
to detect SUSE cloud-specific projects immediately and to avoid meaningless
attempts to install their software on read-only filesystem partitions.

Something like for ID= field parsing:
==================================
if [-z "os" = "opensuse-tumbleweed-kubic" -o "os" = "caasp"] then
echo "SUSE cloud-specific project is detected. Exit."
exit 0
else echo "SUSE OS type is OK to install our software"
...
==================================

Something like for ID_LIKE= field parsing:
==================================
if [-z "oslike" = "opensuse" -a "os" = "kubic"] then
echo "openSUSE cloud-specific project is detected. Exit."
exit 0
else echo "SUSE OS type is OK to install our software"
...
==================================

Something like for ID_LIKE= field parsing:
==================================
if [-z "oslike" = "suse" -a "os" = "caasp"] then
echo "SUSE cloud-specific project is detected. Exit."
exit 0
else echo "SUSE OS type is OK to install our software"
...
==================================


You are receiving this mail because: