xbps-src: remove non-working -u flag, make -C work in chroot.
--HG-- extra : convert_revision : a9fb1c09b4d29f35888abf9615c40d3cccbeb239
This commit is contained in:
parent
58c93fb275
commit
3e8bd5917c
4 changed files with 11 additions and 29 deletions
|
@ -1,5 +1,5 @@
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2008-2009 Juan Romero Pardines.
|
# Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -154,6 +154,7 @@ xbps_chroot_handler()
|
||||||
local action="$1"
|
local action="$1"
|
||||||
local pkg="$2"
|
local pkg="$2"
|
||||||
local only_destdir="$3"
|
local only_destdir="$3"
|
||||||
|
local norm_builddir="$4"
|
||||||
local path="/usr/local/sbin:/bin::/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
|
local path="/usr/local/sbin:/bin::/sbin:/usr/bin:/usr/sbin:/usr/local/bin"
|
||||||
[ -z "$action" -o -z "$pkg" ] && return 1
|
[ -z "$action" -o -z "$pkg" ] && return 1
|
||||||
|
|
||||||
|
@ -181,8 +182,11 @@ xbps_chroot_handler()
|
||||||
env in_chroot=yes LANG=C PATH=$path \
|
env in_chroot=yes LANG=C PATH=$path \
|
||||||
chroot $XBPS_MASTERDIR /bin/sh
|
chroot $XBPS_MASTERDIR /bin/sh
|
||||||
else
|
else
|
||||||
|
local lenv
|
||||||
[ -n "$only_destdir" ] && \
|
[ -n "$only_destdir" ] && \
|
||||||
local lenv="install_destdir_target=yes"
|
lenv="install_destdir_target=yes"
|
||||||
|
[ -n "$norm_builddir" ] && \
|
||||||
|
action="-C $action"
|
||||||
env in_chroot=yes LANG=C PATH=$path \
|
env in_chroot=yes LANG=C PATH=$path \
|
||||||
${lenv} chroot $XBPS_MASTERDIR sh -c \
|
${lenv} chroot $XBPS_MASTERDIR sh -c \
|
||||||
"cd /xbps/srcpkgs/$pkg && xbps-src $action"
|
"cd /xbps/srcpkgs/$pkg && xbps-src $action"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2008 Juan Romero Pardines.
|
# Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -42,15 +42,6 @@ verify_sha256_cksum()
|
||||||
msg_normal "SHA256 checksum OK for $file."
|
msg_normal "SHA256 checksum OK for $file."
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_update_cksum()
|
|
||||||
{
|
|
||||||
local upcmd=$(basename $XBPS_SRCDISTDIR/$1)
|
|
||||||
|
|
||||||
sed -i -e "s|checksum.*|checksum=$(${XBPS_DIGEST_CMD} ${upcmd})|" \
|
|
||||||
template
|
|
||||||
return $?
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Downloads the distfiles and verifies checksum for all them.
|
# Downloads the distfiles and verifies checksum for all them.
|
||||||
#
|
#
|
||||||
|
@ -84,11 +75,6 @@ fetch_distfiles()
|
||||||
for f in ${distfiles}; do
|
for f in ${distfiles}; do
|
||||||
curfile=$(basename $f)
|
curfile=$(basename $f)
|
||||||
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
||||||
if [ -n "$upcksum" ]; then
|
|
||||||
fetch_update_cksum $curfile
|
|
||||||
setup_tmpl $pkgname
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in ${checksum}; do
|
for i in ${checksum}; do
|
||||||
if [ $dfcount -eq $ckcount -a -n $i ]; then
|
if [ $dfcount -eq $ckcount -a -n $i ]; then
|
||||||
cksum=$i
|
cksum=$i
|
||||||
|
@ -130,12 +116,6 @@ fetch_distfiles()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
unset localurl
|
unset localurl
|
||||||
|
|
||||||
if [ -n "$upcksum" ]; then
|
|
||||||
fetch_update_cksum $curfile
|
|
||||||
setup_tmpl $pkgname
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# XXX duplicate code.
|
# XXX duplicate code.
|
||||||
#
|
#
|
||||||
|
|
|
@ -67,7 +67,7 @@ install_pkg()
|
||||||
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then
|
if [ -z "$base_chroot" -a -z "$in_chroot" ]; then
|
||||||
. $XBPS_SHUTILSDIR/chroot.sh
|
. $XBPS_SHUTILSDIR/chroot.sh
|
||||||
[ -n "$install_destdir_target" ] && cdestdir=yes
|
[ -n "$install_destdir_target" ] && cdestdir=yes
|
||||||
xbps_chroot_handler install $curpkgn $cdestdir
|
xbps_chroot_handler install $curpkgn $cdestdir $dontrm_builddir
|
||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008-2009 Juan Romero Pardines.
|
# Copyright (c) 2008-2010 Juan Romero Pardines.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -63,7 +63,6 @@ Options:
|
||||||
-C Do not remove build directory after successful installation.
|
-C Do not remove build directory after successful installation.
|
||||||
-c Path to global configuration file:
|
-c Path to global configuration file:
|
||||||
if not specified @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf is used.
|
if not specified @@XBPS_INSTALL_ETCDIR@@/xbps-src.conf is used.
|
||||||
-u Update the checksum in template file if used in 'fetch' target.
|
|
||||||
_EOF
|
_EOF
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -178,11 +177,10 @@ check_config_vars()
|
||||||
#
|
#
|
||||||
# main()
|
# main()
|
||||||
#
|
#
|
||||||
while getopts "Cc:u" opt; do
|
while getopts "Cc:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
C) dontrm_builddir=yes;;
|
C) export dontrm_builddir=yes;;
|
||||||
c) config_file_specified=yes; XBPS_CONFIG_FILE="$OPTARG";;
|
c) config_file_specified=yes; XBPS_CONFIG_FILE="$OPTARG";;
|
||||||
u) update_checksum=yes;;
|
|
||||||
--) shift; break;;
|
--) shift; break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue