Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not prepend pkg_rootdir (-r) if the path for the config is provided via -C
Baptiste Daroussin committed 10 years ago
commit 7be0341938c85046fa487af34c8980d75c858bb7
parent 31233bf
1 file changed +4 -3
modified libpkg/pkg_config.c
@@ -884,11 +884,12 @@ pkg_ini(const char *path, const char *reposdir, pkg_init_flags flags)
		}
	}

-
	if (path == NULL)
+
	if (path == NULL) {
		path = PREFIX"/etc/pkg.conf";

-
	if (pkg_rootdir != NULL)
-
		asprintf(&rootedpath, "%s/%s", pkg_rootdir, path);
+
		if (pkg_rootdir != NULL)
+
			asprintf(&rootedpath, "%s/%s", pkg_rootdir, path);
+
	}

	p = ucl_parser_new(0);
	ucl_parser_register_variable (p, "ABI", myabi);