Add opensuse-leap support
Docker images coming from the dockerhub for opensuse leap 15 (opensuse/leap:15) have the following content in their lsb release: NAME="openSUSE Leap" VERSION="15.0" ID="opensuse-leap" <redacted> Without this patch, opensuse-leap images are not recognised by bindep, as "opensuse-leap" != "opensuse" This is a problem, as it prevents subprojects using bindep (like loci) to use those images, unless some hackery of release file is done. This patch solves the problem by ensuring opensuse-leap systems are strictly listed like any other "opensuse.*" system. Change-Id: I937812b7219ec38f9335dbb85600f294fff40902
This commit is contained in:
parent
cec3a7576b
commit
7e87972b90
|
@ -323,7 +323,7 @@ class Depends(object):
|
|||
"redhatenterpriseserver",
|
||||
"redhatenterpriseworkstation",
|
||||
"fedora",
|
||||
"opensuseproject", "opensuse",
|
||||
"opensuseproject", "opensuse", "opensuse-leap",
|
||||
"opensuse-tumbleweed", "sles", "suselinux"]:
|
||||
# Distro aliases
|
||||
if distro_id in ["redhatenterpriseserver",
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
NAME="openSUSE Leap"
|
||||
VERSION="15.0"
|
||||
ID="opensuse-leap"
|
||||
ID_LIKE="suse opensuse"
|
||||
VERSION_ID="15.0"
|
||||
PRETTY_NAME="openSUSE Leap 15.0"
|
||||
ANSI_COLOR="0;32"
|
||||
CPE_NAME="cpe:/o:opensuse:leap:15.0"
|
||||
BUG_REPORT_URL="https://bugs.opensuse.org"
|
||||
HOME_URL="https://www.opensuse.org/"
|
|
@ -183,6 +183,15 @@ class TestDepends(TestCase):
|
|||
self.assertThat(platform_profiles,
|
||||
Contains("platform:suse"))
|
||||
|
||||
def test_detects_opensuse_leap15(self):
|
||||
with DistroFixture("openSUSEleap15"):
|
||||
depends = Depends("")
|
||||
platform_profiles = depends.platform_profiles()
|
||||
self.assertThat(platform_profiles,
|
||||
Contains("platform:opensuse"))
|
||||
self.assertThat(platform_profiles,
|
||||
Contains("platform:suse"))
|
||||
|
||||
def test_detects_suse_linux(self):
|
||||
with DistroFixture("SLES"):
|
||||
depends = Depends("")
|
||||
|
@ -256,6 +265,13 @@ class TestDepends(TestCase):
|
|||
depends.platform_profiles(), Contains("platform:rpm"))
|
||||
self.assertIsInstance(depends.platform, Rpm)
|
||||
|
||||
def test_opensuse_leap15_implies_rpm(self):
|
||||
with DistroFixture("openSUSEleap15"):
|
||||
depends = Depends("")
|
||||
self.assertThat(
|
||||
depends.platform_profiles(), Contains("platform:rpm"))
|
||||
self.assertIsInstance(depends.platform, Rpm)
|
||||
|
||||
def test_suse_linux_implies_rpm(self):
|
||||
with DistroFixture("SLES"):
|
||||
depends = Depends("")
|
||||
|
|
Loading…
Reference in New Issue