From: Michael Tremer Date: Tue, 28 Jan 2025 15:03:10 +0000 (+0000) Subject: package: Make a function available to all that generates the filename X-Git-Tag: 0.9.30~321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa822760b0ce0ede968cbec836d6337bc7313aba;p=pakfire.git package: Make a function available to all that generates the filename Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/package.c b/src/pakfire/package.c index 89dc60f7..87538a96 100644 --- a/src/pakfire/package.c +++ b/src/pakfire/package.c @@ -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: diff --git a/src/pakfire/package.h b/src/pakfire/package.h index e6312296..c796b7e4 100644 --- a/src/pakfire/package.h +++ b/src/pakfire/package.h @@ -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);