import actions
import builder
-import config
import distro
import filelist
+ import keyring
import logger
import packages
import repository
if self.path == "/":
self.check_is_ipfire()
- # Read configuration file(s)
- self.config = config.Config(type=mode)
- for filename in configs:
- self.config.read(filename)
- # Assume, that all other keyword arguments are configuration
- # parameters.
- self.config.update(kwargs)
+ # Get the configuration.
+ if config:
+ assert configs is None, "You cannot pass configs and config."
+ self.config = config
+ else:
+ # Read configuration file(s).
+ self.config = Config(files=configs)
- # Setup the logger
- logger.setup_logging(self.config)
+ # Dump the configuration.
self.config.dump()
+ # Initialize the keyring.
+ self.keyring = keyring.Keyring(self)
+
# Get more information about the distribution we are running
# or building
- self.distro = distro.Distribution(self, distro_config)
+ self.distro = distro.Distribution(self)
+ if arch:
+ self.distro.arch = arch
+
self.pool = satsolver.Pool(self.distro.arch)
self.repos = repository.Repositories(self,
enable_repos=enable_repos, disable_repos=disable_repos)
SYSCONFDIR = "/etc"
SCRIPT_DIR = "/usr/lib/pakfire"
-CONFIG_DIR = os.path.join(SYSCONFDIR, "pakfire.repos.d")
-CONFIG_DIR_EXT = ".repo"
-CONFIG_FILE = os.path.join(SYSCONFDIR, "pakfire.conf")
+CONFIG_DIR = os.path.join(SYSCONFDIR, "pakfire")
+CONFIG_REPOS_DIR = os.path.join(CONFIG_DIR, "repos")
+CONFIG_DISTRO_DIR = os.path.join(CONFIG_DIR, "distros")
+ KEYRING_DIR = os.path.join(SYSCONFDIR, "pakfire.d", "gnupg")
+
CACHE_DIR = "/var/cache/pakfire"
CCACHE_CACHE_DIR = os.path.join(CACHE_DIR, "ccache")
CACHE_ENVIRON_DIR = os.path.join(CACHE_DIR, "environments")