Infrastructure changes to simplify the conf file.
* Removed the following vars from the conf file: XBPS_BUILDDIR, XBPS_PACKAGESDIR and XBPS_SRCDISTDIR. They are always relative to XBPS_MASTERDIR and cannot be changed. * Removed XBPS_INSTALLDIR, it was unused in the code. * Prepend /tools/bin in PATH for the chroot. * Don't register a repo in the chroot if the XBPS_PREFER_BINPKG_DEPS is not set. --HG-- extra : convert_revision : 4df03ffa64f0bbf81cd1dd0baf38f1b7e4f47549
This commit is contained in:
parent
7c38045a0f
commit
6673252679
6 changed files with 32 additions and 59 deletions
|
@ -99,7 +99,7 @@ run_file()
|
|||
|
||||
check_config_vars()
|
||||
{
|
||||
local cffound f
|
||||
local val cffound f
|
||||
|
||||
if [ -z "$config_file_specified" ]; then
|
||||
config_file_paths="$XBPS_CONFIG_FILE ./etc/xbps-src.conf"
|
||||
|
@ -117,17 +117,12 @@ check_config_vars()
|
|||
msg_error "cannot find configuration file: $XBPS_CONFIG_FILE"
|
||||
fi
|
||||
|
||||
local XBPS_VARS="XBPS_MASTERDIR XBPS_BUILDDIR XBPS_SRCDISTDIR \
|
||||
XBPS_PACKAGESDIR"
|
||||
for f in ${XBPS_VARS}; do
|
||||
eval val="\$$f"
|
||||
[ -z "$val" ] && msg_error "'$f' not set in configuration file"
|
||||
|
||||
if [ ! -d "$val" ]; then
|
||||
mkdir "$val"
|
||||
[ $? -ne 0 ] && msg_error "couldn't create '$f' directory"
|
||||
fi
|
||||
done
|
||||
eval val="\$XBPS_MASTERDIR"
|
||||
[ -z "$val" ] && msg_error "'XBPS_MASTERDIR' not set in configuration file"
|
||||
if [ ! -d "$val" ]; then
|
||||
mkdir "$val"
|
||||
[ $? -ne 0 ] && msg_error "couldn't create 'XBPS_MASTERDIR' directory"
|
||||
fi
|
||||
|
||||
export PATH="@@XBPS_INSTALL_PREFIX@@/sbin:$PATH"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue