diff --git a/qt.spec b/qt.spec index b3c73e0..bbdccb9 100644 --- a/qt.spec +++ b/qt.spec @@ -11,7 +11,7 @@ Name: qt Name: qt4 %endif Version: 4.4.0 -Release: 6%{?dist} +Release: 7%{?dist} # GPLv2 exceptions(see GPL_EXCEPTIONS*.txt) License: GPLv3 or GPLv2 with exceptions or QPL @@ -788,6 +788,9 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: %changelog +* Tue Jun 10 2008 Than Ngo 4.4.0-7 +- fix #450310, multilib issue + * Fri Jun 06 2008 Rex Dieter 4.4.0-6 - qt-copy-patches-20080606 - drop BR: libungif-devel (not used) diff --git a/qt4-wrapper.sh b/qt4-wrapper.sh index 620336d..360c8c8 100755 --- a/qt4-wrapper.sh +++ b/qt4-wrapper.sh @@ -1,9 +1,22 @@ -#!/bin/bash +#! /bin/bash +# +# In multilib environments there is a preferred architecture, 64 bit over 32 bit in x86_64, +# 32 bit over 64 bit in ppc64. When a conflict is found between two packages corresponding +# with different arches, the installed file is the one from the preferred arch. This is +# very common for executables in /usr/bin, for example. If the file /usr/bin/foo is found +# in an x86_64 package and in an i386 package, the executable from x86_64 will be installe + +ARCH=$(uname -m) +QTVERSION=4 if [ -z "$QT4DIR" ] ; then - # rpm is more correct multilib-wise, provided /etc/rpm/platform doesn't get in the way. - QT4DIR="$(/bin/rpm --eval "%{_libdir}/qt4" 2>/dev/null || /usr/bin/pkg-config --variable=prefix QtCore )" - export QT4DIR + case $ARCH in + x86_64 | ia64 | s390 ) + QT4DIR=/usr/lib64/qt$QTVERSION ;; + * ) + QT4DIR=/usr/lib/qt$QTVERSION ;; + esac + export QT4DIR fi if ! echo ${PATH} | /bin/grep -q $QT4DIR/bin ; then