Felix Schnizlein
2016-Sep-05 09:25 UTC
[Libguestfs] [supermin][PATCH] Fix rpm/zypper detection on openSUSE Tumbleweed
Fix supermins rpm/zypper detection on openSUSE Tumbleweed Newer version of openSUSE does not use /etc/SuSE-release anymore. Search for the new /etc/SUSE-brand in addition. --- diff --git a/src/rpm.ml b/src/rpm.ml index a5dc67a..400efbd 100644 --- a/src/rpm.ml +++ b/src/rpm.ml @@ -39,7 +39,10 @@ let fedora_detect () let opensuse_detect () Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () && Config.zypper <> "no" && - try (stat "/etc/SuSE-release").st_kind = S_REG with Unix_error _ -> false + try + (stat "/etc/SuSE-release").st_kind = S_REG || + (stat "/etc/SUSE-brand").st_kind = S_REG + with Unix_error _ -> false let mageia_detect () Config.rpm <> "no" && Config.rpm2cpio <> "no" && rpm_is_available () &&
Pino Toscano
2016-Sep-05 09:39 UTC
Re: [Libguestfs] [supermin][PATCH] Fix rpm/zypper detection on openSUSE Tumbleweed
Hi Felix, On Monday, 5 September 2016 11:25:58 CEST Felix Schnizlein wrote:> Fix supermins rpm/zypper detection on openSUSE Tumbleweed > > Newer version of openSUSE does not use /etc/SuSE-release anymore. > Search for the new /etc/SUSE-brand in addition. > ---See the series I posted few days ago about this: https://www.redhat.com/archives/libguestfs/2016-August/msg00223.html (two patches for the issue, and one extra for fixing test-harder, which is not fixed by your patch) Can you please take a look at it? Thanks, -- Pino Toscano
Felix Schnizlein
2016-Sep-05 10:04 UTC
Re: [Libguestfs] [supermin][PATCH] Fix rpm/zypper detection on openSUSE Tumbleweed
Oh I missed that. Looks way more promising than my "solution". Will look into this! On Mon, 2016-09-05 at 11:39 +0200, Pino Toscano wrote:> Hi Felix, > > On Monday, 5 September 2016 11:25:58 CEST Felix Schnizlein wrote: > > > > Fix supermins rpm/zypper detection on openSUSE Tumbleweed > > > > Newer version of openSUSE does not use /etc/SuSE-release anymore. > > Search for the new /etc/SUSE-brand in addition. > > --- > > See the series I posted few days ago about this: > https://www.redhat.com/archives/libguestfs/2016-August/msg00223.html > (two patches for the issue, and one extra for fixing test-harder, which > is not fixed by your patch) > > Can you please take a look at it? > > Thanks,
Maybe Matching Threads
- [PATCH 2/2] Use os-release to detect the distro
- Re: [supermin][PATCH] Fix rpm/zypper detection on openSUSE Tumbleweed
- [supermin PATCH] rpm: generalize openSUSE support
- [supermin PATCH] rpm: support openSUSE Leap 15
- [PATCH 4/4] rpm: mageia: prefer dnf over urpmi