Add codename and release platform profiles

Change-Id: I3fbf4ea2828f4988d56628da17393d470490267e
This commit is contained in:
Jeremy Stanley 2015-02-20 22:19:47 +00:00
parent bafcfe1b07
commit e832224d54
1 changed files with 8 additions and 0 deletions

View File

@ -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()