xbps-uhelper: support 'XBPS_{,TARGET_}ARCH' env vars in the 'arch' target.

This commit is contained in:
Juan RP 2016-04-13 08:53:26 +02:00
parent c2a2b91ed2
commit 6272280fcf
2 changed files with 9 additions and 1 deletions

4
NEWS
View File

@ -1,5 +1,9 @@
xbps-0.52 (???):
* xbps-uhelper: the 'arch' target now supports the XBPS_ARCH
and XBPS_TARGET_ARCH environmental variables to override the
resulting architecture.
* portableproplib: merged two fixes from NetBSD CVS HEAD.
* xbps-create(1): this now creates reproducible pkgs when the file

View File

@ -280,7 +280,11 @@ main(int argc, char **argv)
if (argc != 1)
usage();
printf("%s\n", xh.native_arch);
if (xh.native_arch && xh.target_arch && strcmp(xh.native_arch, xh.target_arch)) {
printf("%s\n", xh.target_arch);
} else {
printf("%s\n", xh.native_arch);
}
} else if (strcmp(argv[0], "getsystemdir") == 0) {
/* returns the xbps system directory (<sharedir>/xbps.d) */
if (argc != 1)