]> git.ipfire.org Git - pakfire.git/commitdiff
build: Install "build-essential" by default
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Nov 2022 16:48:45 +0000 (16:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Nov 2022 16:48:45 +0000 (16:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
contrib/config/distros/ipfire3.conf
src/libpakfire/build.c

index dcc218bb64cabb4268f1e5d4cc315a58753ef93f..9ed98bc290c681951fa9dabb775b25c4461adc12 100644 (file)
@@ -12,11 +12,6 @@ slogan               = An Open Source Firewall Solution
 
 source_dl      = https://source.ipfire.org/source-3.x/
 
-
-[build]
-
-requires       = pakfire-build, gcc, filesystem, ccache, /bin/bash, filesystem, coreutils, util-linux, diffutils, make, gcc, kernel-headers, tar, patch, xz, gzip, bzip2, strace, less, vim
-
 [repo:stable]
 description = IPFire 3 - stable
 baseurl = https://pakfire.ipfire.org/files/repos/ipfire-3/stable/%{arch}
index c571c38e5f7cead086c5733e40068985b72aa2fb..331e805a074439e69b4b66ef4dd66a28b4f9e159 100644 (file)
@@ -1062,37 +1062,21 @@ PAKFIRE_EXPORT int pakfire_build_set_target(
 
 static int pakfire_build_install_packages(struct pakfire_build* build,
                int* snapshot_needs_update) {
-       char** packages = NULL;
-       int r = 1;
-
-       // Fetch configuration
-       struct pakfire_config* config = pakfire_get_config(build->pakfire);
-       if (!config) {
-               ERROR(build->pakfire, "Could not fetch configuration: %m\n");
-               r = 1;
-               goto ERROR;
-       }
-
-       // Fetch build environment
-       const char* requires = pakfire_config_get(config, "build", "requires", NULL);
-       if (!requires) {
-               ERROR(build->pakfire, "No build requirements have been defined\n");
-               goto ERROR;
-       }
+       int r;
 
-       // Split requirements into packages
-       packages = pakfire_string_split(requires, ',');
-       if (!packages)
-               goto ERROR;
+       const char* packages[] = {
+               "build-essential",
+               NULL,
+       };
 
        int changed = 0;
 
        // Install everything
-       r = pakfire_install(build->pakfire, 0, 0, (const char**)packages, NULL, 0,
+       r = pakfire_install(build->pakfire, 0, 0, packages, NULL, 0,
                &changed, NULL, NULL);
        if (r) {
                ERROR(build->pakfire, "Could not install build dependencies: %m\n");
-               goto ERROR;
+               return r;
        }
 
        // Mark snapshot as changed if new packages were installed
@@ -1103,27 +1087,14 @@ static int pakfire_build_install_packages(struct pakfire_build* build,
        r = pakfire_sync(build->pakfire, 0, 0, &changed, NULL, NULL);
        if (r) {
                ERROR(build->pakfire, "Could not update packages: %m\n");
-               goto ERROR;
+               return r;
        }
 
        // Has anything changed?
        if (changed)
                *snapshot_needs_update = 1;
 
-       // Success
-       r = 0;
-
-ERROR:
-       if (config)
-               pakfire_config_unref(config);
-
-       if (packages) {
-               for (char** package = packages; *package; package++)
-                       free(*package);
-               free(packages);
-       }
-
-       return r;
+       return 0;
 }
 
 /*