xbps-src: remove XBPS_DESTDIR from conf file.
Rather than make it configurable, put this always under XBPS_MASTERDIR/pkg-destdir, so you don't have to care about it anymore. --HG-- extra : convert_revision : 34cc3102272bfcf95b2fc3a8961cb9cb2429ab91
This commit is contained in:
parent
8d8fd35a75
commit
667095b4ae
5 changed files with 13 additions and 20 deletions
|
@ -14,17 +14,10 @@ XBPS_INSTALLDIR=@@XBPS_INSTALL_PREFIX@@
|
||||||
XBPS_DISTRIBUTIONDIR=$HOME/xbps-templates
|
XBPS_DISTRIBUTIONDIR=$HOME/xbps-templates
|
||||||
|
|
||||||
#
|
#
|
||||||
# Master directory: this is where all packages files are copied from
|
# Chroot master directory.
|
||||||
# XBPS_DESTDIR, to resolve dependencies.
|
|
||||||
#
|
#
|
||||||
XBPS_MASTERDIR=$XBPS_DISTRIBUTIONDIR/masterdir
|
XBPS_MASTERDIR=$XBPS_DISTRIBUTIONDIR/masterdir
|
||||||
|
|
||||||
#
|
|
||||||
# Destination directory: this is where all package files will be
|
|
||||||
# installed.
|
|
||||||
#
|
|
||||||
XBPS_DESTDIR=$XBPS_DISTRIBUTIONDIR/destdir
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Binary packages directory: this is where the binary packages will
|
# Binary packages directory: this is where the binary packages will
|
||||||
# be created to.
|
# be created to.
|
||||||
|
|
|
@ -199,7 +199,7 @@ mount_chroot_fs()
|
||||||
{
|
{
|
||||||
local cnt=
|
local cnt=
|
||||||
|
|
||||||
REQFS="sys proc dev xbps xbps_builddir xbps_destdir \
|
REQFS="sys proc dev xbps xbps_builddir \
|
||||||
xbps_packagesdir xbps_srcdistdir"
|
xbps_packagesdir xbps_srcdistdir"
|
||||||
|
|
||||||
for f in ${REQFS}; do
|
for f in ${REQFS}; do
|
||||||
|
@ -209,7 +209,6 @@ mount_chroot_fs()
|
||||||
case $f in
|
case $f in
|
||||||
xbps) blah=$XBPS_DISTRIBUTIONDIR;;
|
xbps) blah=$XBPS_DISTRIBUTIONDIR;;
|
||||||
xbps_builddir) blah=$XBPS_BUILDDIR;;
|
xbps_builddir) blah=$XBPS_BUILDDIR;;
|
||||||
xbps_destdir) blah=$XBPS_DESTDIR;;
|
|
||||||
xbps_srcdistdir) blah=$XBPS_SRCDISTDIR;;
|
xbps_srcdistdir) blah=$XBPS_SRCDISTDIR;;
|
||||||
xbps_packagesdir) blah=$XBPS_PACKAGESDIR;;
|
xbps_packagesdir) blah=$XBPS_PACKAGESDIR;;
|
||||||
*) blah=/$f;;
|
*) blah=/$f;;
|
||||||
|
@ -292,7 +291,6 @@ XBPSSRC_CF=$XBPS_MASTERDIR/usr/local/etc/xbps-src.conf
|
||||||
|
|
||||||
echo "XBPS_DISTRIBUTIONDIR=/xbps" > $XBPSSRC_CF
|
echo "XBPS_DISTRIBUTIONDIR=/xbps" > $XBPSSRC_CF
|
||||||
echo "XBPS_MASTERDIR=/" >> $XBPSSRC_CF
|
echo "XBPS_MASTERDIR=/" >> $XBPSSRC_CF
|
||||||
echo "XBPS_DESTDIR=/xbps_destdir" >> $XBPSSRC_CF
|
|
||||||
echo "XBPS_PACKAGESDIR=/xbps_packagesdir" >> $XBPSSRC_CF
|
echo "XBPS_PACKAGESDIR=/xbps_packagesdir" >> $XBPSSRC_CF
|
||||||
echo "XBPS_BUILDDIR=/xbps_builddir" >> $XBPSSRC_CF
|
echo "XBPS_BUILDDIR=/xbps_builddir" >> $XBPSSRC_CF
|
||||||
echo "XBPS_SRCDISTDIR=/xbps_srcdistdir" >> $XBPSSRC_CF
|
echo "XBPS_SRCDISTDIR=/xbps_srcdistdir" >> $XBPSSRC_CF
|
||||||
|
|
|
@ -46,8 +46,7 @@ run_rootcmd()
|
||||||
|
|
||||||
[ -n "$in_chroot" ] && unset fakeroot_cmd
|
[ -n "$in_chroot" ] && unset fakeroot_cmd
|
||||||
|
|
||||||
lenv="XBPS_DESTDIR=$XBPS_DESTDIR"
|
lenv="XBPS_DISTRIBUTIONDIR=$XBPS_DISTRIBUTIONDIR"
|
||||||
lenv="XBPS_DISTRIBUTIONDIR=$XBPS_DISTRIBUTIONDIR $lenv"
|
|
||||||
|
|
||||||
shift
|
shift
|
||||||
if [ "$usesudo" = "yes" -a -z "$in_chroot" ]; then
|
if [ "$usesudo" = "yes" -a -z "$in_chroot" ]; then
|
||||||
|
|
|
@ -153,13 +153,13 @@ remove_pkg()
|
||||||
stow_pkg_handler unstow || return $?
|
stow_pkg_handler unstow || return $?
|
||||||
|
|
||||||
for subpkg in ${subpackages}; do
|
for subpkg in ${subpackages}; do
|
||||||
if [ -d $XBPS_DESTDIR/${subpkg}-${ver%_${revision}} ]; then
|
if [ -d "$XBPS_DESTDIR/${subpkg}-${ver%_*}" ]; then
|
||||||
rm -rf $XBPS_DESTDIR/${subpkg}-${ver%_${revision}}
|
rm -rf "$XBPS_DESTDIR/${subpkg}-${ver%_*}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -d $XBPS_DESTDIR/${pkgname}-${ver%_${revision}} ]; then
|
if [ -d "$XBPS_DESTDIR/${pkgname}-${ver%_*}" ]; then
|
||||||
rm -rf $XBPS_DESTDIR/${pkgname}-${ver%_${revision}}
|
rm -rf "$XBPS_DESTDIR/${pkgname}-${ver%_*}"
|
||||||
fi
|
fi
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,11 @@ set_defvars()
|
||||||
: ${XBPS_META_PATH:=$XBPS_DBDIR/}
|
: ${XBPS_META_PATH:=$XBPS_DBDIR/}
|
||||||
: ${XBPS_PKGMETADIR:=$XBPS_DBDIR/metadata}
|
: ${XBPS_PKGMETADIR:=$XBPS_DBDIR/metadata}
|
||||||
: ${XBPS_SRCPKGDIR:=$XBPS_DISTRIBUTIONDIR/srcpkgs}
|
: ${XBPS_SRCPKGDIR:=$XBPS_DISTRIBUTIONDIR/srcpkgs}
|
||||||
|
if [ -n "$in_chroot" ]; then
|
||||||
|
: ${XBPS_DESTDIR:=/pkg-destdir}
|
||||||
|
else
|
||||||
|
: ${XBPS_DESTDIR:=$XBPS_MASTERDIR/pkg-destdir}
|
||||||
|
fi
|
||||||
|
|
||||||
DDIRS="XBPS_TRIGGERSDIR XBPS_HELPERSDIR"
|
DDIRS="XBPS_TRIGGERSDIR XBPS_HELPERSDIR"
|
||||||
DDIRS="$DDIRS XBPS_COMMONVARSDIR XBPS_SHUTILSDIR"
|
DDIRS="$DDIRS XBPS_COMMONVARSDIR XBPS_SHUTILSDIR"
|
||||||
|
@ -158,9 +163,7 @@ check_config_vars()
|
||||||
msg_error "cannot find configuration file: $XBPS_CONFIG_FILE"
|
msg_error "cannot find configuration file: $XBPS_CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local XBPS_VARS="XBPS_MASTERDIR XBPS_DESTDIR XBPS_BUILDDIR \
|
local XBPS_VARS="XBPS_MASTERDIR XBPS_BUILDDIR XBPS_SRCDISTDIR"
|
||||||
XBPS_SRCDISTDIR"
|
|
||||||
|
|
||||||
for f in ${XBPS_VARS}; do
|
for f in ${XBPS_VARS}; do
|
||||||
eval val="\$$f"
|
eval val="\$$f"
|
||||||
[ -z "$val" ] && msg_error "'$f' not set in configuration file"
|
[ -z "$val" ] && msg_error "'$f' not set in configuration file"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue