Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/plugins/debian.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-29 00:20:08 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-29 00:20:08 (GMT)
commit0e848594e4d46f517ab3a7a526fe52075e332c62 (patch)
treeba72f8fb5feb6a5adbe109f37ba3867929f3f203 /devbot/plugins/debian.py
parent225fec76eac61dcd0bbbd090fadad56f7917fc68 (diff)
Initial support for debian wheezy
Diffstat (limited to 'devbot/plugins/debian.py')
-rw-r--r--devbot/plugins/debian.py31
1 files changed, 13 insertions, 18 deletions
diff --git a/devbot/plugins/debian.py b/devbot/plugins/debian.py
index 4612794..402222f 100644
--- a/devbot/plugins/debian.py
+++ b/devbot/plugins/debian.py
@@ -80,6 +80,7 @@ class PackageManager(interfaces.PackageManager):
return result
+
distro.register_package_manager("debian", PackageManager)
class DistroInfo(interfaces.DistroInfo):
@@ -88,29 +89,23 @@ class DistroInfo(interfaces.DistroInfo):
self.name = "debian"
self.version = "unknown"
- self.system_version = "3.6"
+ self.system_version = "3.4"
self.valid = True
self.supported = (arch in ["i686", "x86_64"])
self.use_lib64 = False
-
- if self._get_distributor() != "debian":
- self.valid = False
-
- self.version = self._get_release()
-
- if self.version != "wheezy":
- self.supported = False
- def _get_distributor(self):
try:
- return subprocess.check_output(["lsb_release", "-si"]).strip()
- except OSError:
- None
+ with open("/etc/debian_version") as f:
+ debian_version = f.read()
+ except IOError:
+ debian_version = None
- def _get_release(self):
- try:
- return subprocess.check_output(["lsb_release", "-sc"]).strip()
- except OSError:
- return None
+ if debian_version is None:
+ self.valid = False
+
+ if debian_version.startswith("wheezy"):
+ self.version = "wheezy"
+ else:
+ self.supported = False
distro.register_distro_info(DistroInfo)