}
// Make path for configuration file
- r = pakfire_make_path(build->pakfire, repopath,
- PAKFIRE_CONFIG_DIR "/repos/" PAKFIRE_REPO_LOCAL ".repo");
- if (r < 0)
+ r = pakfire_path(build->pakfire, repopath,
+ "%s", PAKFIRE_CONFIG_DIR "/repos/" PAKFIRE_REPO_LOCAL ".repo");
+ if (r)
goto ERROR;
// Write repository configuration
char path[PATH_MAX];
// Allocate path to write the filelist to
- int r = pakfire_make_path(build->pakfire, path, "/var/tmp/.pakfire-filelist.XXXXXX");
- if (r < 0)
+ int r = pakfire_path(build->pakfire, path, "%s", "/var/tmp/.pakfire-filelist.XXXXXX");
+ if (r)
return 1;
// Create a temporary file
struct pakfire_parser* makefile, const char* buildroot, const char* namespace,
struct pakfire_package* pkg, struct pakfire_packager* packager) {
struct pakfire_filelist* filelist = NULL;
- char path[PATH_MAX];
int r = 1;
char** files = NULL;
if (!files)
return 0;
- // Convert to absolute path
- pakfire_make_path(build->pakfire, path, buildroot);
-
// Split into includes and excludes
for (char** file = files; *file; file++) {
if (**file == '!')
goto ERROR;
// Scan for files
- r = pakfire_filelist_scan(filelist, path, includes, excludes);
+ r = pakfire_filelist_scan(filelist, build->buildroot, includes, excludes);
if (r)
goto ERROR;
const char* root = pakfire_get_path(build->pakfire);
// Make filename
- r = pakfire_make_path(build->pakfire, path, "/var/tmp/.pakfire-scriptlet.XXXXXX");
- if (r < 0)
+ r = pakfire_path(build->pakfire, path, "%s", "/var/tmp/.pakfire-scriptlet.XXXXXX");
+ if (r)
return r;
// Fetch scriptlet payload
static int pakfire_build_read_makefile(struct pakfire_build* build,
struct pakfire_parser** parser, struct pakfire_package* package) {
- char makefile[PATH_MAX];
char path[PATH_MAX];
int r;
const char* name = pakfire_package_get_name(package);
// Compose path to makefile
- r = pakfire_string_format(makefile, "/usr/src/packages/%s/%s.nm", nevra, name);
- if (r)
- return r;
-
- // Make it absolute
- r = pakfire_make_path(build->pakfire, path, makefile);
+ r = pakfire_path(build->pakfire, path, "/usr/src/packages/%s/%s.nm", nevra, name);
if (r < 0)
return 1;
int r;
// Set buildroot
- pakfire_make_path(build->pakfire, build->buildroot, "/var/tmp/.pakfire-buildroot.XXXXXX");
+ r = pakfire_path(build->pakfire, build->buildroot, "%s", "/var/tmp/.pakfire-buildroot.XXXXXX");
+ if (r)
+ goto ERROR;
// Open source archive
r = pakfire_archive_open(&archive, build->pakfire, path);