class Pakfire(object):
def __init__(self, path="/tmp/pakfire", builder=False, configs=[],
disable_repos=None):
+ # Check if we are operating as the root user.
+ self.check_root_user()
+
# The path where we are operating in
self.path = path
# always work with valid data.
self.repos.update_indexes()
+ def check_root_user(self):
+ if not os.getuid() == 0 or not os.getgid() == 0:
+ raise Exception, "You must run pakfire as the root user."
+
def check_build_mode(self):
"""
Check if we are running in build mode.
class Cli(object):
- # XXX check if we are running as the root user
-
def __init__(self):
self.parser = argparse.ArgumentParser(
description = _("Pakfire command line interface."),