[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
broken installplatform
- From: Arkadiusz Miskiewicz <misiek pld ORG PL>
- To: rpm-list redhat com
- Subject: broken installplatform
- Date: 15 Oct 2001 17:18:47 +0200
Hi,
We at PLD recently switched from one global macros to platform
specific macrs. On alpha macros are installed in such places
(rpm -ql rpm | grep alpha):
/usr/lib/rpm/alpha-pld-linux
/usr/lib/rpm/alpha-pld-linux/macros
/usr/lib/rpm/alphaev5
/usr/lib/rpm/alphaev5-pld-linux
/usr/lib/rpm/alphaev5-pld-linux/macros
/usr/lib/rpm/alphaev56
/usr/lib/rpm/alphaev56-pld-linux
/usr/lib/rpm/alphaev56-pld-linux/macros
/usr/lib/rpm/alphaev6
/usr/lib/rpm/alphaev6-pld-linux
/usr/lib/rpm/alphaev6-pld-linux/macros
/usr/lib/rpm/alphaev67
/usr/lib/rpm/alphaev67-pld-linux
/usr/lib/rpm/alphaev67-pld-linux/macros
/usr/lib/rpm/alphapca56
/usr/lib/rpm/alphapca56-pld-linux
/usr/lib/rpm/alphapca56-pld-linux/macros
while rpm is searching for them in
macrofiles : /usr/lib/rpm/macros:/usr/lib/rpm/alphaev56-linux/macros:/etc/rpm/macros.specspo:/etc/rpm/macros.db1:/etc/rpm/macros:/etc/rpm/alphaev56-linux/macros:~/.rpmmacros
Symlinks alphaevXX-linux -> alphaevXX-pld-linux are missing (on x86
everyhing is ok).
Artur Frysiak <wiget@pld.org.pl> was debugging this and found bugs in
installplatform script.
Here is his fix:
diff -urN rpm-4.0.2.org/installplatform rpm-4.0.2/installplatform
--- rpm-4.0.2.org/installplatform Mon Oct 15 17:15:33 2001
+++ rpm-4.0.2/installplatform Mon Oct 15 17:15:49 2001
@@ -21,11 +21,12 @@
RPM="./rpm --rcfile $TEMPRC"
-arch="`$RPM --eval '%{_arch}'`"
+CHARCH='s_i.86_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_'
+arch="`$RPM --eval '%{_arch}' | sed -e $CHARCH`"
VENDOR="`$RPM --eval '%{_vendor}'`"
OS="`$RPM --eval '%{_os}'`"
-target_platform="`$RPM --eval '%{_target_platform}'`"
-target="`$RPM --eval '%{_target}'`"
+target_platform="`$RPM --eval '%{_target_platform}' | sed -e $CHARCH`"
+target="`$RPM --eval '%{_target}' | sed -e $CHARCH`"
rm -f ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
ln -s ${arch}-${VENDOR}-${OS} ${DESTDIR}/${pkglibdir}/noarch-${VENDOR}-${OS}
@@ -38,7 +39,6 @@
sparc*) SUBSTS='s_sparc\(64\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
*) SUBSTS=y___ ;;
esac
-base_arch=`echo $arch | sed -e 's_i?86_i386_;s_sparc.*_sparc_;s_alpha.*_alpha_'`
for SUBST in $SUBSTS ; do
ARCH=`echo $arch | sed -e $SUBST`
@@ -86,11 +86,10 @@
cat $PLATFORM \
| sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
- -e "s,@RPMRC_ARCH@,$base_arch," \
+ -e "s,@RPMRC_ARCH@,$arch," \
-e "s,@LIB@,$LIB," \
-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
-e "s,@DEFAULTDOCDIR@,$DEFAULTDOCDIR," \
- -e 's,\${,%{_,' \
$MULTILIBSED \
$VENDORSED \
| grep -v '^@' \
--
Arkadiusz Miśkiewicz IPv6 ready PLD Linux at http://www.pld.org.pl
misiek(at)pld.org.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]