From 6e4fd027c36761275804e8de618c4efe3fc5dcb1 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 9 Dec 2016 21:37:36 -0600 Subject: [PATCH] main: switch to pkgconf_client_set_sysroot_dir() and remove the last vestige of PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX --- libpkgconf/libpkgconf.h | 7 +++---- main.c | 7 +------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index ffba87e..3d0cb81 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -173,10 +173,9 @@ void pkgconf_client_set_buildroot_dir(pkgconf_client_t *client, const char *buil #define PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS 0x010 #define PKGCONF_PKG_PKGF_SKIP_CONFLICTS 0x020 #define PKGCONF_PKG_PKGF_NO_CACHE 0x040 -#define PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX 0x080 -#define PKGCONF_PKG_PKGF_SKIP_ERRORS 0x100 -#define PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE 0x200 -#define PKGCONF_PKG_PKGF_SKIP_PROVIDES 0x400 +#define PKGCONF_PKG_PKGF_SKIP_ERRORS 0x080 +#define PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE 0x100 +#define PKGCONF_PKG_PKGF_SKIP_PROVIDES 0x200 #define PKGCONF_PKG_ERRF_OK 0x0 #define PKGCONF_PKG_ERRF_PACKAGE_NOT_FOUND 0x1 diff --git a/main.c b/main.c index 4593b22..dd7cf19 100644 --- a/main.c +++ b/main.c @@ -804,12 +804,7 @@ main(int argc, char *argv[]) pkgconf_client_set_buildroot_dir(&pkg_client, builddir); if ((sysroot_dir = getenv("PKG_CONFIG_SYSROOT_DIR")) != NULL) - { - pkgconf_tuple_add_global(&pkg_client, "pc_sysrootdir", sysroot_dir); - global_traverse_flags |= PKGCONF_PKG_PKGF_MUNGE_SYSROOT_PREFIX; - } - else - pkgconf_tuple_add_global(&pkg_client, "pc_sysrootdir", "/"); + pkgconf_client_set_sysroot_dir(&pkg_client, sysroot_dir); /* at this point, global_traverse_flags should be set, so build the dir list */ pkgconf_pkg_dir_list_build(&pkg_client, global_traverse_flags);