/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.173 Revision 1.191
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.173 2005/05/24 03:17:19 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.191 2005/07/13 19:15:05 eradicator Exp $
4# 4#
5# Author: Martin Schlemmer <azarah@gentoo.org> 5# Author: Martin Schlemmer <azarah@gentoo.org>
6# 6#
7# This eclass is for general purpose functions that most ebuilds 7# This eclass is for general purpose functions that most ebuilds
8# have to implement themselves. 8# have to implement themselves.
9# 9#
10# NB: If you add anything, please comment it! 10# NB: If you add anything, please comment it!
11 11
12inherit multilib 12inherit multilib
13ECLASS=eutils
14INHERITED="$INHERITED $ECLASS"
15 13
16DEPEND="!bootstrap? ( sys-devel/patch )" 14DEPEND="!bootstrap? ( sys-devel/patch )"
15# sys-apps/shadow is needed for useradd, etc, bug #94745.
17 16
18DESCRIPTION="Based on the ${ECLASS} eclass" 17DESCRIPTION="Based on the ${ECLASS} eclass"
19 18
20# Wait for the supplied number of seconds. If no argument is supplied, defaults 19# Wait for the supplied number of seconds. If no argument is supplied, defaults
21# to five seconds. If the EPAUSE_IGNORE env var is set, don't wait. If we're not 20# to five seconds. If the EPAUSE_IGNORE env var is set, don't wait. If we're not
68 dodir /usr/${libdir} 67 dodir /usr/${libdir}
69 68
70 for lib in "${@}" ; do 69 for lib in "${@}" ; do
71 cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT 70 cat > "${D}/usr/${libdir}/${lib}" <<-END_LDSCRIPT
72 /* GNU ld script 71 /* GNU ld script
73 Since Gentoo has critical dynamic libraries 72 Since Gentoo has critical dynamic libraries
74 in /lib, and the static versions in /usr/lib, 73 in /lib, and the static versions in /usr/lib,
75 we need to have a "fake" dynamic lib in /usr/lib, 74 we need to have a "fake" dynamic lib in /usr/lib,
76 otherwise we run into linking problems. 75 otherwise we run into linking problems.
77 76
78 See bug http://bugs.gentoo.org/4411 for more info. 77 See bug http://bugs.gentoo.org/4411 for more info.
79 */ 78 */
80 GROUP ( /${libdir}/${lib} ) 79 GROUP ( /${libdir}/${lib} )
81 END_LDSCRIPT 80 END_LDSCRIPT
82 fperms a+x "/usr/${libdir}/${lib}" 81 fperms a+x "/usr/${libdir}/${lib}"
249 # New ARCH dependant patch naming scheme ... 248 # New ARCH dependant patch naming scheme ...
250 # 249 #
251 # ???_arch_foo.patch 250 # ???_arch_foo.patch
252 # 251 #
253 if [ -f ${x} ] && \ 252 if [ -f ${x} ] && \
254 ([ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "`eval echo \$\{x/_${ARCH}_\}`" != "${x}" ] || \ 253 ([ "${SINGLE_PATCH}" = "yes" -o "${x/_all_}" != "${x}" -o "${x/_${ARCH}_}" != "${x}" ] || \
255 [ "${EPATCH_FORCE}" = "yes" ]) 254 [ "${EPATCH_FORCE}" = "yes" ])
256 then 255 then
257 local count=0 256 local count=0
258 local popts="${EPATCH_OPTS}" 257 local popts="${EPATCH_OPTS}"
259 local patchname=${x##*/} 258 local patchname=${x##*/}
369 then 368 then
370 einfo "Done with patching" 369 einfo "Done with patching"
371 fi 370 fi
372} 371}
373 372
374# This function check how many cpu's are present, and then set
375# -j in MAKEOPTS accordingly.
376#
377# Thanks to nall <nall@gentoo.org> for this.
378#
379get_number_of_jobs() {
380 local jobs=0
381
382 if [ ! -r /proc/cpuinfo ]
383 then
384 return 1
385 fi
386
387 # This bit is from H?kan Wessberg <nacka-gentoo@refug.org>, bug #13565.
388 if [ "`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | wc -l`" -gt 0 ]
389 then
390 ADMINOPTS="`egrep "^[[:space:]]*MAKEOPTS=" /etc/make.conf | cut -d= -f2 | sed 's/\"//g'`"
391 ADMINPARAM="`echo ${ADMINOPTS} | gawk '{match($0, /-j *[0-9]*/, opt); print opt[0]}'`"
392 ADMINPARAM="${ADMINPARAM/-j}"
393 fi
394
395 export MAKEOPTS="`echo ${MAKEOPTS} | sed -e 's:-j *[0-9]*::g'`"
396
397 if [ "${ARCH}" = "amd64" -o "${ARCH}" = "x86" -o "${ARCH}" = "hppa" -o \
398 "${ARCH}" = "arm" -o "${ARCH}" = "mips" -o "${ARCH}" = "ia64" ]
399 then
400 # these archs will always have "[Pp]rocessor"
401 jobs="$((`grep -c ^[Pp]rocessor /proc/cpuinfo` * 2))"
402
403 elif [ "${ARCH}" = "sparc" -o "${ARCH}" = "sparc64" ]
404 then
405 # sparc always has "ncpus active"
406 jobs="$((`grep "^ncpus active" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"
407
408 elif [ "${ARCH}" = "alpha" ]
409 then
410 # alpha has "cpus active", but only when compiled with SMP
411 if [ "`grep -c "^cpus active" /proc/cpuinfo`" -eq 1 ]
412 then
413 jobs="$((`grep "^cpus active" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"
414 else
415 jobs=2
416 fi
417
418 elif [ "${ARCH}" = "ppc" -o "${ARCH}" = "ppc64" ]
419 then
420 # ppc has "processor", but only when compiled with SMP
421 if [ "`grep -c "^processor" /proc/cpuinfo`" -eq 1 ]
422 then
423 jobs="$((`grep -c ^processor /proc/cpuinfo` * 2))"
424 else
425 jobs=2
426 fi
427 elif [ "${ARCH}" = "s390" ]
428 then
429 # s390 has "# processors : "
430 jobs="$((`grep "^\# processors" /proc/cpuinfo | sed -e "s/^.*: //"` * 2))"
431 else
432 jobs="$((`grep -c ^cpu /proc/cpuinfo` * 2))"
433 die "Unknown ARCH -- ${ARCH}!"
434 fi
435
436 # Make sure the number is valid ...
437 if [ "${jobs}" -lt 1 ]
438 then
439 jobs=1
440 fi
441
442 if [ -n "${ADMINPARAM}" ]
443 then
444 if [ "${jobs}" -gt "${ADMINPARAM}" ]
445 then
446 einfo "Setting make jobs to \"-j${ADMINPARAM}\" to ensure successful merge ..."
447 export MAKEOPTS="${MAKEOPTS} -j${ADMINPARAM}"
448 else
449 einfo "Setting make jobs to \"-j${jobs}\" to ensure successful merge ..."
450 export MAKEOPTS="${MAKEOPTS} -j${jobs}"
451 fi
452 fi
453}
454
455# Cheap replacement for when debianutils (and thus mktemp) 373# Cheap replacement for when debianutils (and thus mktemp)
456# does not exist on the users system 374# does not exist on the users system
457# vapier@gentoo.org 375# vapier@gentoo.org
458# 376#
459# Takes just 1 optional parameter (the directory to create tmpfile in) 377# Takes just 1 optional parameter (the directory to create tmpfile in)
490# Joe Jezak <josejx@gmail.com> and usata@gentoo.org 408# Joe Jezak <josejx@gmail.com> and usata@gentoo.org
491# FBSD stuff: Aaron Walker <ka0ttic@gentoo.org> 409# FBSD stuff: Aaron Walker <ka0ttic@gentoo.org>
492# 410#
493# egetent(database, key) 411# egetent(database, key)
494egetent() { 412egetent() {
495 if useq ppc-macos ; then 413 if [[ "${USERLAND}" == "Darwin" ]] ; then
496 case "$2" in 414 case "$2" in
497 *[!0-9]*) # Non numeric 415 *[!0-9]*) # Non numeric
498 nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }" 416 nidump $1 . | awk -F":" "{ if (\$1 ~ /^$2$/) {print \$0;exit;} }"
499 ;; 417 ;;
500 *) # Numeric 418 *) # Numeric
501 nidump $1 . | awk -F":" "{ if (\$3 == $2) {print \$0;exit;} }" 419 nidump $1 . | awk -F":" "{ if (\$3 == $2) {print \$0;exit;} }"
502 ;; 420 ;;
503 esac 421 esac
504 elif useq x86-fbsd ; then 422 elif [[ "${USERLAND}" == "BSD" ]] ; then
505 local action 423 local action
506 if [ "$1" == "passwd" ] 424 if [ "$1" == "passwd" ]
507 then 425 then
508 action="user" 426 action="user"
509 else 427 else
529# homedir: /dev/null 447# homedir: /dev/null
530# groups: none 448# groups: none
531# extra: comment of 'added by portage for ${PN}' 449# extra: comment of 'added by portage for ${PN}'
532enewuser() { 450enewuser() {
533 # get the username 451 # get the username
534 local euser="$1"; shift 452 local euser=$1; shift
535 if [ -z "${euser}" ] 453 if [[ -z ${euser} ]] ; then
536 then
537 eerror "No username specified !" 454 eerror "No username specified !"
538 die "Cannot call enewuser without a username" 455 die "Cannot call enewuser without a username"
539 fi 456 fi
540 457
541 # lets see if the username already exists 458 # lets see if the username already exists
542 if [ "${euser}" == "`egetent passwd \"${euser}\" | cut -d: -f1`" ] 459 if [[ ${euser} == $(egetent passwd "${euser}" | cut -d: -f1) ]] ; then
543 then
544 return 0 460 return 0
545 fi 461 fi
546 einfo "Adding user '${euser}' to your system ..." 462 einfo "Adding user '${euser}' to your system ..."
547 463
548 # options to pass to useradd 464 # options to pass to useradd
549 local opts= 465 local opts=
550 466
551 # handle uid 467 # handle uid
552 local euid="$1"; shift 468 local euid=$1; shift
553 if [ ! -z "${euid}" ] && [ "${euid}" != "-1" ] 469 if [[ ! -z ${euid} ]] && [[ ${euid} != "-1" ]] ; then
554 then
555 if [ "${euid}" -gt 0 ] 470 if [[ ${euid} -gt 0 ]] ; then
556 then
557 if [ ! -z "`egetent passwd ${euid}`" ] 471 if [[ ! -z $(egetent passwd ${euid}) ]] ; then
558 then
559 euid="next" 472 euid="next"
560 fi 473 fi
561 else 474 else
562 eerror "Userid given but is not greater than 0 !" 475 eerror "Userid given but is not greater than 0 !"
563 die "${euid} is not a valid UID" 476 die "${euid} is not a valid UID"
564 fi 477 fi
565 else 478 else
566 euid="next" 479 euid="next"
567 fi 480 fi
568 if [ "${euid}" == "next" ] 481 if [[ ${euid} == "next" ]] ; then
569 then
570 local pwrange 482 local pwrange
571 if [ "${USERLAND}" == "BSD" ] ; then 483 if [[ ${USERLAND} == "BSD" ]] ; then
572 pwrange="`jot 898 101`" 484 pwrange=$(jot 898 101)
573 else 485 else
574 pwrange="`seq 101 999`" 486 pwrange=$(seq 101 999)
575 fi 487 fi
576 for euid in ${pwrange} ; do 488 for euid in ${pwrange} ; do
577 [ -z "`egetent passwd ${euid}`" ] && break 489 [[ -z $(egetent passwd ${euid}) ]] && break
578 done 490 done
579 fi 491 fi
580 opts="${opts} -u ${euid}" 492 opts="${opts} -u ${euid}"
581 einfo " - Userid: ${euid}" 493 einfo " - Userid: ${euid}"
582 494
583 # handle shell 495 # handle shell
584 local eshell="$1"; shift 496 local eshell=$1; shift
585 if [ ! -z "${eshell}" ] && [ "${eshell}" != "-1" ] 497 if [[ ! -z ${eshell} ]] && [[ ${eshell} != "-1" ]] ; then
586 then
587 if [ ! -e "${eshell}" ] 498 if [[ ! -e ${eshell} ]] ; then
588 then
589 eerror "A shell was specified but it does not exist !" 499 eerror "A shell was specified but it does not exist !"
590 die "${eshell} does not exist" 500 die "${eshell} does not exist"
591 fi 501 fi
592 else 502 else
593 if [ "${USERLAND}" == "BSD" ] 503 case ${USERLAND} in
594 then
595 eshell="/usr/bin/false" 504 Darwin) eshell="/usr/bin/false";;
596 else 505 BSD) eshell="/usr/sbin/nologin";;
597 eshell="/bin/false" 506 *) eshell="/bin/false";;
598 fi 507 esac
599 fi 508 fi
600 einfo " - Shell: ${eshell}" 509 einfo " - Shell: ${eshell}"
601 opts="${opts} -s ${eshell}" 510 opts="${opts} -s ${eshell}"
602 511
603 # handle homedir 512 # handle homedir
604 local ehome="$1"; shift 513 local ehome=$1; shift
605 if [ -z "${ehome}" ] && [ "${eshell}" != "-1" ] 514 if [[ -z ${ehome} ]] || [[ ${ehome} == "-1" ]] ; then
606 then
607 ehome="/dev/null" 515 ehome="/dev/null"
608 fi 516 fi
609 einfo " - Home: ${ehome}" 517 einfo " - Home: ${ehome}"
610 opts="${opts} -d ${ehome}" 518 opts="${opts} -d ${ehome}"
611 519
612 # handle groups 520 # handle groups
613 local egroups="$1"; shift 521 local egroups=$1; shift
614 if [ ! -z "${egroups}" ] 522 if [[ ! -z ${egroups} ]] ; then
615 then
616 local oldifs="${IFS}" 523 local oldifs=${IFS}
617 local defgroup="" exgroups="" 524 local defgroup="" exgroups=""
618 525
619 export IFS="," 526 export IFS=","
620 for g in ${egroups} 527 for g in ${egroups} ; do
621 do
622 export IFS="${oldifs}" 528 export IFS=${oldifs}
623 if [ -z "`egetent group \"${g}\"`" ] 529 if [[ -z $(egetent group "${g}") ]] ; then
624 then
625 eerror "You must add group ${g} to the system first" 530 eerror "You must add group ${g} to the system first"
626 die "${g} is not a valid GID" 531 die "${g} is not a valid GID"
627 fi 532 fi
628 if [ -z "${defgroup}" ] 533 if [[ -z ${defgroup} ]] ; then
629 then
630 defgroup="${g}" 534 defgroup=${g}
631 else 535 else
632 exgroups="${exgroups},${g}" 536 exgroups="${exgroups},${g}"
633 fi 537 fi
634 export IFS="," 538 export IFS=","
635 done 539 done
636 export IFS="${oldifs}" 540 export IFS=${oldifs}
637 541
638 opts="${opts} -g ${defgroup}" 542 opts="${opts} -g ${defgroup}"
639 if [ ! -z "${exgroups}" ] 543 if [[ ! -z ${exgroups} ]] ; then
640 then
641 opts="${opts} -G ${exgroups:1}" 544 opts="${opts} -G ${exgroups:1}"
642 fi 545 fi
643 else 546 else
644 egroups="(none)" 547 egroups="(none)"
645 fi 548 fi
646 einfo " - Groups: ${egroups}" 549 einfo " - Groups: ${egroups}"
647 550
648 # handle extra and add the user 551 # handle extra and add the user
649 local eextra="$@"
650 local oldsandbox="${SANDBOX_ON}" 552 local oldsandbox=${SANDBOX_ON}
651 export SANDBOX_ON="0" 553 export SANDBOX_ON="0"
652 if useq ppc-macos 554 case ${USERLAND} in
653 then 555 Darwin)
654 ### Make the user 556 ### Make the user
655 if [ -z "${eextra}" ] 557 if [[ -z $@ ]] ; then
656 then
657 dscl . create /users/${euser} uid ${euid} 558 dscl . create /users/${euser} uid ${euid}
658 dscl . create /users/${euser} shell ${eshell} 559 dscl . create /users/${euser} shell ${eshell}
659 dscl . create /users/${euser} home ${ehome} 560 dscl . create /users/${euser} home ${ehome}
660 dscl . create /users/${euser} realname "added by portage for ${PN}" 561 dscl . create /users/${euser} realname "added by portage for ${PN}"
661 ### Add the user to the groups specified 562 ### Add the user to the groups specified
662 local oldifs="${IFS}" 563 local oldifs=${IFS}
663 export IFS="," 564 export IFS=","
664 for g in ${egroups} 565 for g in ${egroups} ; do
665 do
666 dscl . merge /groups/${g} users ${euser} 566 dscl . merge /groups/${g} users ${euser}
667 done 567 done
668 export IFS="${oldifs}" 568 export IFS=${oldifs}
669 else 569 else
670 einfo "Extra options are not supported on macos yet" 570 einfo "Extra options are not supported on Darwin yet"
671 einfo "Please report the ebuild along with the info below" 571 einfo "Please report the ebuild along with the info below"
672 einfo "eextra: ${eextra}" 572 einfo "eextra: $@"
673 die "Required function missing" 573 die "Required function missing"
674 fi 574 fi
675 elif use x86-fbsd ; then 575 ;;
676 if [ -z "${eextra}" ] 576 BSD)
677 then 577 if [[ -z $@ ]] ; then
678 pw useradd ${euser} ${opts} \ 578 pw useradd ${euser} ${opts} \
679 -c "added by portage for ${PN}" \ 579 -c "added by portage for ${PN}" \
680 die "enewuser failed" 580 die "enewuser failed"
681 else 581 else
682 einfo " - Extra: ${eextra}" 582 einfo " - Extra: $@"
683 pw useradd ${euser} ${opts} \ 583 pw useradd ${euser} ${opts} \
684 -c ${eextra} || die "enewuser failed" 584 "$@" || die "enewuser failed"
685 fi 585 fi
686 else 586 ;;
687 if [ -z "${eextra}" ] 587 *)
688 then 588 if [[ -z $@ ]] ; then
689 useradd ${opts} ${euser} \ 589 useradd ${opts} ${euser} \
690 -c "added by portage for ${PN}" \ 590 -c "added by portage for ${PN}" \
691 || die "enewuser failed" 591 || die "enewuser failed"
692 else 592 else
693 einfo " - Extra: ${eextra}" 593 einfo " - Extra: $@"
694 useradd ${opts} ${euser} ${eextra} \ 594 useradd ${opts} ${euser} "$@" \
695 || die "enewuser failed" 595 || die "enewuser failed"
696 fi 596 fi
697 fi 597 ;;
598 esac
698 export SANDBOX_ON="${oldsandbox}" 599 export SANDBOX_ON=${oldsandbox}
699 600
700 if [ ! -e "${ehome}" ] && [ ! -e "${D}/${ehome}" ] 601 if [ ! -e "${ehome}" ] && [ ! -e "${D}/${ehome}" ]
701 then 602 then
702 einfo " - Creating ${ehome} in ${D}" 603 einfo " - Creating ${ehome} in ${D}"
703 dodir ${ehome} 604 dodir ${ehome}
740 then 641 then
741 if [ "${egid}" -gt 0 ] 642 if [ "${egid}" -gt 0 ]
742 then 643 then
743 if [ -z "`egetent group ${egid}`" ] 644 if [ -z "`egetent group ${egid}`" ]
744 then 645 then
745 if useq ppc-macos ; then 646 if [[ "${USERLAND}" == "Darwin" ]]; then
746 opts="${opts} ${egid}" 647 opts="${opts} ${egid}"
747 else 648 else
748 opts="${opts} -g ${egid}" 649 opts="${opts} -g ${egid}"
749 fi 650 fi
750 else 651 else
764 opts="${opts} ${eextra}" 665 opts="${opts} ${eextra}"
765 666
766 # add the group 667 # add the group
767 local oldsandbox="${SANDBOX_ON}" 668 local oldsandbox="${SANDBOX_ON}"
768 export SANDBOX_ON="0" 669 export SANDBOX_ON="0"
769 if useq ppc-macos ; then 670 if [[ "${USERLAND}" == "Darwin" ]]; then
770 if [ ! -z "${eextra}" ]; 671 if [ ! -z "${eextra}" ];
771 then 672 then
772 einfo "Extra options are not supported on macos yet" 673 einfo "Extra options are not supported on Darwin/OS X yet"
773 einfo "Please report the ebuild along with the info below" 674 einfo "Please report the ebuild along with the info below"
774 einfo "eextra: ${eextra}" 675 einfo "eextra: ${eextra}"
775 die "Required function missing" 676 die "Required function missing"
776 fi 677 fi
777 678
782 [ -z "`egetent group ${egid}`" ] && break 683 [ -z "`egetent group ${egid}`" ] && break
783 done 684 done
784 esac 685 esac
785 dscl . create /groups/${egroup} gid ${egid} 686 dscl . create /groups/${egroup} gid ${egid}
786 dscl . create /groups/${egroup} passwd '*' 687 dscl . create /groups/${egroup} passwd '*'
787 elif use x86-fbsd ; then 688 elif [[ "${USERLAND}" == "BSD" ]] ; then
788 case ${egid} in 689 case ${egid} in
789 *[!0-9]*) # Non numeric 690 *[!0-9]*) # Non numeric
790 for egid in `jot 898 101`; do 691 for egid in `jot 898 101`; do
791 [ -z "`egetent group ${egid}`" ] && break 692 [ -z "`egetent group ${egid}`" ] && break
792 done 693 done
939 *) 840 *)
940 type= 841 type=
941 ;; 842 ;;
942 esac 843 esac
943 fi 844 fi
944 845 if [ "${SLOT}" == "0" ] ; then
846 local desktop_name="${PN}"
847 else
848 local desktop_name="${PN}-${SLOT}"
849 fi
945 local desktop=${T}/${exec%% *}-${P}.desktop 850 local desktop=${T}/${exec%% *}-${desktop_name}.desktop
946 851
947echo "[Desktop Entry] 852echo "[Desktop Entry]
948Encoding=UTF-8 853Encoding=UTF-8
949Version=0.9.2 854Version=0.9.2
950Name=${name} 855Name=${name}
995 doins "${i}" 900 doins "${i}"
996 elif [[ -d ${i} ]] ; then 901 elif [[ -d ${i} ]] ; then
997 for j in "${i}"/*.desktop ; do 902 for j in "${i}"/*.desktop ; do
998 doins "${j}" 903 doins "${j}"
999 done 904 done
1000 fi 905 fi
1001 done 906 done
1002} 907}
1003newmenu() { 908newmenu() {
1004 insinto /usr/share/applications 909 insinto /usr/share/applications
1005 newins "$1" "$2" 910 newins "$1" "$2"
1013 doins "${i}" 918 doins "${i}"
1014 elif [[ -d ${i} ]] ; then 919 elif [[ -d ${i} ]] ; then
1015 for j in "${i}"/*.png ; do 920 for j in "${i}"/*.png ; do
1016 doins "${j}" 921 doins "${j}"
1017 done 922 done
1018 fi 923 fi
1019 done 924 done
1020} 925}
1021newicon() { 926newicon() {
1022 insinto /usr/share/pixmaps 927 insinto /usr/share/pixmaps
1023 newins "$1" "$2" 928 newins "$1" "$2"
1454 fi 1359 fi
1455 showedmsg=1 1360 showedmsg=1
1456 fi 1361 fi
1457 einfo "Press return to scan for the cd again" 1362 einfo "Press return to scan for the cd again"
1458 einfo "or hit CTRL+C to abort the emerge." 1363 einfo "or hit CTRL+C to abort the emerge."
1364 echo
1365 einfo "If you are having trouble with the detection"
1366 einfo "of your CD, it is possible that you do not have"
1367 einfo "Joliet support enabled in your kernel. Please"
1368 einfo "check that CONFIG_JOLIET is enabled in your kernel."
1459 read 1369 read
1460 fi 1370 fi
1461 done 1371 done
1462} 1372}
1463 1373
1527 while ((i--)) ; do 1437 while ((i--)) ; do
1528 ewarn "PLEASE UPDATE TO YOUR PACKAGE TO USE linux-info.eclass" 1438 ewarn "PLEASE UPDATE TO YOUR PACKAGE TO USE linux-info.eclass"
1529 done 1439 done
1530 export EUTILS_ECLASS_PORTAGE_ARCH="${ARCH}" 1440 export EUTILS_ECLASS_PORTAGE_ARCH="${ARCH}"
1531 case ${ARCH} in 1441 case ${ARCH} in
1532 x86) export ARCH="i386";; 1442 x86) export ARCH="i386";;
1533 amd64) export ARCH="x86_64";; 1443 amd64) export ARCH="x86_64";;
1534 hppa) export ARCH="parisc";; 1444 hppa) export ARCH="parisc";;
1535 mips) export ARCH="mips";; 1445 mips) export ARCH="mips";;
1536 sparc) export ARCH="$(tc-arch-kernel)";; # Yeah this is ugly, but it's even WORSE if you don't do this. linux-info.eclass's set_arch_to_kernel is fixed, but won't get used over this one! 1446 sparc) export ARCH="$(tc-arch-kernel)";; # Yeah this is ugly, but it's even WORSE if you don't do this. linux-info.eclass's set_arch_to_kernel is fixed, but won't get used over this one!
1537 *) export ARCH="${ARCH}";; 1447 *) export ARCH="${ARCH}";;
1538 esac 1448 esac
1539} 1449}
1540 1450
1541# set's ARCH back to what portage expects 1451# set's ARCH back to what portage expects
1542set_arch_to_portage() { 1452set_arch_to_portage() {
1586 LIB=$1 1496 LIB=$1
1587 1497
1588 if [ -n "${LIB}" -a -f "${ROOT}${LIB}" ]; then 1498 if [ -n "${LIB}" -a -f "${ROOT}${LIB}" ]; then
1589 SONAME=`basename ${LIB}` 1499 SONAME=`basename ${LIB}`
1590 1500
1591 einfo "An old version of an installed library was detected on your system." 1501 ewarn "An old version of an installed library was detected on your system."
1592 einfo "In order to avoid breaking packages that link against is, this older version" 1502 ewarn "In order to avoid breaking packages that link against it, this older version"
1593 einfo "is not being removed. In order to make full use of this newer version," 1503 ewarn "is not being removed. In order to make full use of this newer version,"
1594 einfo "you will need to execute the following command:" 1504 ewarn "you will need to execute the following command:"
1595 einfo " revdep-rebuild --soname ${SONAME}" 1505 ewarn " revdep-rebuild --soname ${SONAME}"
1596 einfo 1506 ewarn
1597 einfo "After doing that, you can safely remove ${LIB}" 1507 ewarn "After doing that, you can safely remove ${LIB}"
1598 einfo "Note: 'emerge gentoolkit' to get revdep-rebuild" 1508 ewarn "Note: 'emerge gentoolkit' to get revdep-rebuild"
1599 fi 1509 fi
1600} 1510}
1601 1511
1602# Hack for people to figure out if a package was built with 1512# Hack for people to figure out if a package was built with
1603# certain USE flags 1513# certain USE flags

Legend:
Removed from v.1.173  
changed lines
  Added in v.1.191

  ViewVC Help
Powered by ViewVC 1.1.20