]> git.ipfire.org Git - pakfire.git/commitdiff
package: Make a function available to all that generates the filename
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2025 15:03:10 +0000 (15:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Jan 2025 15:03:10 +0000 (15:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/package.c
src/pakfire/package.h

index 89dc60f7ad0b9f4b53082e9eb59a1f188a668aeb..87538a961334a4f455179c11410d42d536772725 100644 (file)
@@ -425,7 +425,7 @@ static const char* evr2vr(const char* evr) {
        return evr;
 }
 
-static const char* pakfire_package_make_filename(struct pakfire_package* pkg) {
+const char* pakfire_package_get_filename(struct pakfire_package* pkg) {
        int r;
 
        if (!*pkg->filename) {
@@ -819,7 +819,7 @@ const char* pakfire_package_get_string(
 
                        // Generate the filename if not set
                        if (!ret)
-                               ret = pakfire_package_make_filename(pkg);
+                               ret = pakfire_package_get_filename(pkg);
                        break;
 
                case PAKFIRE_PKG_CACHE_PATH:
index e6312296ba7a6c32aa5f903a6c110abe73bdfaf8..c796b7e423871af6a13d8b2136a0b3f6a36f29d5 100644 (file)
@@ -159,6 +159,8 @@ int pakfire_package_create_from_solvable(struct pakfire_package** package,
 int pakfire_package_set_strings_from_string(struct pakfire_package* pkg,
        const enum pakfire_package_key key, const char* value);
 
+const char* pakfire_package_get_filename(struct pakfire_package* pkg);
+
 int pakfire_package_is_source(struct pakfire_package* pkg);
 int pakfire_package_supports_build_arch(struct pakfire_package* pkg, const char* arch);