Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Move the "adding script" debug info into a more accurate place
Baptiste Daroussin committed 12 years ago
commit f69ba38bc3a55a5ccb8459ed3dc78caaeed1c15c
parent e3ad1c7
2 files changed +3 -3
modified libpkg/pkg.c
@@ -754,6 +754,8 @@ pkg_addscript_file(struct pkg *pkg, const char *path)
	assert(pkg != NULL);
	assert(path != NULL);

+
	pkg_debug(1, "Adding script from: '%s'", path);
+

	if ((ret = file_to_buffer(path, &data, &sz)) != EPKG_OK)
		return (ret);

modified libpkg/pkg_create.c
@@ -287,10 +287,8 @@ pkg_create_staged(const char *outdir, pkg_formats format, const char *rootdir,

	for (i = 0; scripts[i] != NULL; i++) {
		snprintf(path, sizeof(path), "%s/%s", md_dir, scripts[i]);
-
		if (access(path, F_OK) == 0) {
-
			pkg_debug(1, "Adding script from: '%s'", path);
+
		if (access(path, F_OK) == 0)
			pkg_addscript_file(pkg, path);
-
		}
	}

	if (plist != NULL &&