"logger",
"offline",
"conf",
- "build",
"confirm_callback",
NULL,
};
const char* arch = NULL;
const char* conf = NULL;
int offline = 0;
- int build = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|zzOpzpO", kwlist,
- &path, &arch, &self->callbacks.log, &offline, &conf, &build,
- &self->callbacks.confirm))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|zzOpzO", kwlist,
+ &path, &arch, &self->callbacks.log, &offline, &conf, &self->callbacks.confirm))
return -1;
// Check if log callback is callable
if (offline)
flags |= PAKFIRE_FLAGS_OFFLINE;
- // Enable build mode
- if (build)
- flags |= PAKFIRE_FLAGS_BUILD;
-
// Configure callbacks
if (self->callbacks.log)
Py_INCREF(self->callbacks.log);
#include <pakfire/repolist.h>
enum pakfire_flags {
- PAKFIRE_FLAGS_OFFLINE = (1 << 1),
- PAKFIRE_FLAGS_BUILD = (1 << 2),
+ PAKFIRE_FLAGS_OFFLINE = (1 << 0),
};
// Callbacks
return r;
// Clean build environments
- // Nothing to do if we are not in build mode
- if (pakfire_has_flag(pakfire, PAKFIRE_FLAGS_BUILD)) {
- r = pakfire_build_clean(pakfire, flags);
- if (r)
- return r;
- }
+ r = pakfire_build_clean(pakfire, flags);
+ if (r)
+ return r;
// Remove the cache
return pakfire_rmtree(PAKFIRE_CACHE_DIR, 0);
"""
# Setup Pakfire instance
try:
- p = _pakfire.Pakfire(
- conf=self.pakfire_conf,
- arch=arch,
- logger=logger,
-
- # Enable build mode
- build=True,
- interactive=False,
- )
+ p = _pakfire.Pakfire(arch=arch, conf=self.pakfire_conf, logger=logger)
finally:
# Delete the configuration file
os.unlink(self.pakfire_conf)
return args
- def pakfire(self, ns, build=True):
+ def pakfire(self, ns):
# Find distro configuration file
conf = os.path.join(CONFIG_DISTRO_DIR, "%s.conf" % ns.distro)
enable_console=True,
)
- return pakfire.Pakfire(
- conf=conf,
- arch=ns.arch,
-
- # Set up logging
- logger=logger.log,
-
- # Enable build mode
- build=build,
- )
+ return pakfire.Pakfire(arch=ns.arch, conf=conf, logger=logger.log)
def __call__(self):
# Parse command line arguments