Re-add support for system virtualpkg.d (XBPS_SYS_VPKG_PATH).

This is still useful to set distro defaults for virtual packages, with
the option to override them via /etc/xbps/virtualpkg.d.
This commit is contained in:
Juan RP 2014-11-05 09:40:32 +01:00
parent 595136704e
commit 9566a0e737
3 changed files with 10 additions and 5 deletions

7
NEWS
View File

@ -1,9 +1,8 @@
xbps-0.42 (???): xbps-0.42 (???):
* Get rid of system virtualpkg.d configuration files stored at * Virtual packages are now collected directly from pkgdb, that means
<prefix>/share/xbps/virtualpkg.d) and collect all virtual packages that installed packages do not need to have a virtualpkg configuration
directly from pkgdb. Virtual package overrides can still be defined file in the system virtualpkg.d directory.
at <sysconfdir>/xbps/virtualpkg.d.
* xbps-{install,remove}: implemented a column/wide output mode * xbps-{install,remove}: implemented a column/wide output mode
as requested in #63 (https://github.com/voidlinux/xbps/issues/63). as requested in #63 (https://github.com/voidlinux/xbps/issues/63).

View File

@ -94,6 +94,12 @@
*/ */
#define XBPS_VPKG_PATH XBPS_SYSCONF_PATH "/virtualpkg.d" #define XBPS_VPKG_PATH XBPS_SYSCONF_PATH "/virtualpkg.d"
/**
* @def XBPS_SYS_VPKG_PATH
* System virtualpkg PATH to store virtualpkg configuration files.
*/
#define XBPS_SYS_VPKG_PATH XBPS_SYSDEFCONF_PATH "/virtualpkg.d"
/** /**
* @def XBPS_REPOD_PATH * @def XBPS_REPOD_PATH
* Configuration directory to store repository configuration files. * Configuration directory to store repository configuration files.

View File

@ -448,7 +448,7 @@ xbps_init(struct xbps_handle *xhp)
free(buf); free(buf);
} }
/* process virtualpkg.d dirs */ /* process virtualpkg.d dirs */
if ((rv = parse_dir(xhp, cwd, NULL, XBPS_VPKG_PATH, true)) != 0) if ((rv = parse_dir(xhp, cwd, XBPS_SYS_VPKG_PATH, XBPS_VPKG_PATH, true)) != 0)
return rv; return rv;
/* process repo.d dirs */ /* process repo.d dirs */