From 3be2a5f852f32b884cab2ceb368247feff8495ff Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 16 Nov 2011 13:35:48 +0100 Subject: [PATCH] xbps-src: added an optional arg to rshlibs, to make SONAME arch specific. --- xbps-src/shutils/verify_rundeps.sh | 23 +++++++++++++++++------ xbps-src/xbps-src.sh.in | 2 +- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/xbps-src/shutils/verify_rundeps.sh b/xbps-src/shutils/verify_rundeps.sh index 2be647601ed..1f4da6502db 100644 --- a/xbps-src/shutils/verify_rundeps.sh +++ b/xbps-src/shutils/verify_rundeps.sh @@ -154,7 +154,7 @@ verify_rundeps() # # Update package's rshlibs file. # - unset broken + unset broken f msg_normal "$pkgver: updating rshlibs file...\n" rsonamef=${XBPS_SRCPKGDIR}/${pkgname}/${pkgname}.rshlibs if [ ! -f $rsonamef ]; then @@ -173,12 +173,16 @@ verify_rundeps() broken=1 fi done + unset f exec 3<&0 # save stdin exec < $rsonamef # now check if any soname in the rshlibs file is unnecessary. while read f; do + local _soname=$(echo "$f"|awk '{print $1}') + local _soname_arch=$(echo "$f"|awk '{print $2}') + for j in ${soname_list}; do - if [ "$f" = "$j" ]; then + if [ "${_soname}" = "$j" ]; then found=1 continue fi @@ -187,15 +191,22 @@ verify_rundeps() unset found continue fi + # Sometimes a required SONAME is arch dependent, so + # ignore it in such case. + if [ -n "${_soname_arch}" -a "${_soname_arch}" != "$XBPS_MACHINE" ]; then + continue + fi + # If SONAME is arch specific, only remove it if # matching on the target arch. - soname_arch=$(grep "$f" $maplib|awk '{print $4}') - if [ -z "$soname_arch" ] || \ - [ -n "$soname_arch" -a "$soname_arch" = "$XBPS_MACHINE" ]; then + _soname_arch=$(grep "$f" $maplib|awk '{print $4}') + if [ -z "${_soname_arch}" ] || \ + [ -n "${_soname_arch}" -a "${_soname_arch}" = "$XBPS_MACHINE" ]; then echo " SONAME: $f (removed, not required)" - sed -i "/^${f}$/d" $rsonamef + sed -i "/^${_soname}$/d" $rsonamef broken=1 fi + unset _soname _soname_arch done exec 0<&3 # restore stdin fi diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index ab357c2e8d4..822814563c2 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -23,7 +23,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #- -readonly XBPS_SRC_BUILD_VERSION=20111115-2 +readonly XBPS_SRC_BUILD_VERSION=20111116 XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf PROGNAME=$(basename $0)