Add codename and release platform profiles
Change-Id: I3fbf4ea2828f4988d56628da17393d470490267e
This commit is contained in:
parent
bafcfe1b07
commit
e832224d54
|
@ -129,7 +129,15 @@ class Depends(object):
|
|||
def platform_profiles(self):
|
||||
distro = subprocess.check_output(
|
||||
["lsb_release", "-si"], stderr=subprocess.STDOUT).strip().lower()
|
||||
codename = subprocess.check_output(
|
||||
["lsb_release", "-sc"], stderr=subprocess.STDOUT).strip().lower()
|
||||
releasebits = subprocess.check_output(
|
||||
["lsb_release", "-sr"],
|
||||
stderr=subprocess.STDOUT).strip().lower().split(".")
|
||||
atoms = set([distro])
|
||||
atoms.add(codename)
|
||||
for i in range(len(releasebits)):
|
||||
atoms.add(distro + ".".join(releasebits[:i + 1]))
|
||||
if distro in ["debian", "ubuntu"]:
|
||||
atoms.add("dpkg")
|
||||
self.platform = Dpkg()
|
||||
|
|
Loading…
Reference in New Issue