That won't cause too much damage on the buildsystems.
self.builder = False
self.path = path
- # XXX check if we are actually running on an ipfire system.
+ # check if we are actually running on an ipfire system.
+ self.check_is_ipfire()
# Read configuration file(s)
self.config = config.Config(type=config_type)
raise BuildError, arch
+ def check_is_ipfire(self):
+ ret = os.path.exists("/etc/ipfire-release")
+
+ if not ret:
+ raise NotAnIPFireSystemError, "You can run pakfire only on an IPFire system"
+
def install(self, requires):
# Create a new request.
request = self.create_request()
class FileNotFoundError(Error):
pass
+class NotAnIPFireSystemError(Error):
+ pass
+
class PakfireError(Error):
pass