]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
pakfire: Drop build flag
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 08:26:54 +0000 (08:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 08:26:54 +0000 (08:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c
src/libpakfire/include/pakfire/pakfire.h
src/libpakfire/pakfire.c
src/pakfire/daemon.py
src/scripts/pakfire-builder.in

index e80f1ffa6a0bfd55160099a4002fa96ab2f1df72..702ed88dc49ac392857a512052901530e3ac9bf2 100644 (file)
@@ -140,7 +140,6 @@ static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) {
                "logger",
                "offline",
                "conf",
-               "build",
                "confirm_callback",
                NULL,
        };
@@ -148,11 +147,9 @@ static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) {
        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
@@ -173,10 +170,6 @@ static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) {
        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);
index 5299abbd4aacf8afc7fce4b5240f8c58fa6a1625..b72f3aef1070843e2da9a26370314529f00654a0 100644 (file)
@@ -43,8 +43,7 @@ enum pakfire_digests {
 #include <pakfire/repolist.h>
 
 enum pakfire_flags {
-       PAKFIRE_FLAGS_OFFLINE                   = (1 << 1),
-       PAKFIRE_FLAGS_BUILD                             = (1 << 2),
+       PAKFIRE_FLAGS_OFFLINE                   = (1 << 0),
 };
 
 // Callbacks
index 654bb7c42fcdca9059fcb6fae88b90b593310b03..7c95c07c445540d51b126d043465ebbf029f2608 100644 (file)
@@ -1051,12 +1051,9 @@ PAKFIRE_EXPORT int pakfire_clean(struct pakfire* pakfire, int flags) {
                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);
index 9cc1bc6e594439671ff0dd22a18d6392ca76ee86..550cc7e4ac00e62e32cbd8d9d5594d4c4cf392b3 100644 (file)
@@ -267,15 +267,7 @@ class Worker(multiprocessing.Process):
                """
                # 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)
index 5e72469b0b2a7e0ae793755952cec1c93d859cb4..eddcbcb2f7e4dcbef10b3428538dc45f3de07e66 100644 (file)
@@ -139,7 +139,7 @@ class Cli(object):
 
                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)
 
@@ -150,16 +150,7 @@ class Cli(object):
                        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