]> git.ipfire.org Git - pakfire.git/commitdiff
libpakfire: Make packager private
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2021 19:46:53 +0000 (19:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Jun 2021 19:46:53 +0000 (19:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/packager.h
src/libpakfire/libpakfire.sym
src/libpakfire/packager.c

index eabe7e1a9411b430c766667cb2c6b2be639adc65..330b16ff13ec21751df494b9cdc9dcbab22b3348 100644 (file)
@@ -21,6 +21,8 @@
 #ifndef PAKFIRE_PACKAGER_H
 #define PAKFIRE_PACKAGER_H
 
+#ifdef PAKFIRE_PRIVATE
+
 #include <pakfire/scriptlet.h>
 #include <pakfire/types.h>
 
@@ -43,4 +45,6 @@ int pakfire_packager_add(struct pakfire_packager* packager,
 int pakfire_packager_add_scriptlet(struct pakfire_packager* packager,
        struct pakfire_scriptlet* scriptlet);
 
+#endif
+
 #endif /* PAKFIRE_PACKAGER_H */
index c175fb22a01b44466e6cb6830f7cc7130d45b9d2..3ed5620d302e232318d48293366d424ab6dfd161 100644 (file)
@@ -211,15 +211,6 @@ global:
        pakfire_packagelist_sort;
        pakfire_packagelist_unref;
 
-       # packager
-
-       pakfire_packager_add;
-       pakfire_packager_create;
-       pakfire_packager_finish;
-       pakfire_packager_finish_to_directory;
-       pakfire_packager_ref;
-       pakfire_packager_unref;
-
        # parser
        pakfire_parser_append;
        pakfire_parser_create;
index 9f025288c07f55c2aab2de4eb2ebbc97085f33dc..d7bbca5b14e7e09755c429be62cb4b0744745e95 100644 (file)
@@ -36,7 +36,6 @@
 #include <pakfire/package.h>
 #include <pakfire/packager.h>
 #include <pakfire/pakfire.h>
-#include <pakfire/private.h>
 #include <pakfire/pwd.h>
 #include <pakfire/types.h>
 #include <pakfire/util.h>
@@ -253,7 +252,7 @@ static void pakfire_packager_free(struct pakfire_packager* packager) {
        pakfire_unref(packager->pakfire);
 }
 
-PAKFIRE_EXPORT int pakfire_packager_create(struct pakfire_packager** packager,
+int pakfire_packager_create(struct pakfire_packager** packager,
                PakfirePackage pkg) {
        struct pakfire_packager* p = calloc(1, sizeof(*p));
        if (!p)
@@ -293,14 +292,14 @@ ERROR:
        return r;
 }
 
-PAKFIRE_EXPORT struct pakfire_packager* pakfire_packager_ref(
+struct pakfire_packager* pakfire_packager_ref(
                struct pakfire_packager* packager) {
        ++packager->nrefs;
 
        return packager;
 }
 
-PAKFIRE_EXPORT struct pakfire_packager* pakfire_packager_unref(
+struct pakfire_packager* pakfire_packager_unref(
                struct pakfire_packager* packager) {
        if (--packager->nrefs > 0)
                return packager;
@@ -310,7 +309,7 @@ PAKFIRE_EXPORT struct pakfire_packager* pakfire_packager_unref(
        return NULL;
 }
 
-PAKFIRE_EXPORT const char* pakfire_packager_filename(struct pakfire_packager* packager) {
+const char* pakfire_packager_filename(struct pakfire_packager* packager) {
        if (!*packager->filename) {
                const char* filename = pakfire_package_get_filename(packager->pkg);
 
@@ -769,7 +768,7 @@ static int pakfire_packager_write_scriptlet(struct pakfire_packager* packager,
 
        It will create a new archive and write the package to the given file descriptor.
 */
-PAKFIRE_EXPORT int pakfire_packager_finish(struct pakfire_packager* packager, FILE* f) {
+int pakfire_packager_finish(struct pakfire_packager* packager, FILE* f) {
        struct archive* mtree = NULL;
        FILE* fmtree = NULL;
        int r = 1;
@@ -896,7 +895,7 @@ ERROR:
        return r;
 }
 
-PAKFIRE_EXPORT int pakfire_packager_finish_to_directory(struct pakfire_packager* packager,
+int pakfire_packager_finish_to_directory(struct pakfire_packager* packager,
                const char* target) {
        char path[PATH_MAX];
        char tmppath[PATH_MAX];
@@ -968,7 +967,7 @@ ERROR:
        return r;
 }
 
-PAKFIRE_EXPORT int pakfire_packager_add(struct pakfire_packager* packager,
+int pakfire_packager_add(struct pakfire_packager* packager,
                const char* sourcepath, const char* path) {
        FILE* f = NULL;