Lines 72-80
Link Here
|
72 |
# Read the incremental variables from environment and portage |
72 |
# Read the incremental variables from environment and portage |
73 |
# Until such time as portage supports these variables as incrementals |
73 |
# Until such time as portage supports these variables as incrementals |
74 |
# The value will be what is in /etc/make.conf |
74 |
# The value will be what is in /etc/make.conf |
75 |
PRELIMINARY_SEARCH_DIRS="$SEARCH_DIRS $(portageq envvar SEARCH_DIRS)" |
75 |
PRELIMINARY_SEARCH_DIRS="$SEARCH_DIRS $(unset SEARCH_DIRS; portageq envvar SEARCH_DIRS)" |
76 |
PRELIMINARY_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK $(portageq envvar SEARCH_DIRS_MASK)" |
76 |
PRELIMINARY_SEARCH_DIRS_MASK="$SEARCH_DIRS_MASK $(unset SEARCH_DIRS_MASK; portageq envvar SEARCH_DIRS_MASK)" |
77 |
PRELIMINARY_LD_LIBRARY_MASK="$LD_LIBRARY_MASK $(portageq envvar LD_LIBRARY_MASK)" |
77 |
PRELIMINARY_LD_LIBRARY_MASK="$LD_LIBRARY_MASK $(unset LD_LIBRARY_MASK; portageq envvar LD_LIBRARY_MASK)" |
78 |
|
78 |
|
79 |
# Add the defaults |
79 |
# Add the defaults |
80 |
if [ -d /etc/revdep-rebuild ] |
80 |
if [ -d /etc/revdep-rebuild ] |
Lines 502-508
Link Here
|
502 |
# If SLOT is equal to 0, then just see what portage says is latest version |
502 |
# If SLOT is equal to 0, then just see what portage says is latest version |
503 |
if [ "$SLOT" = "0" ] |
503 |
if [ "$SLOT" = "0" ] |
504 |
then |
504 |
then |
505 |
portageq best_visible $PORTAGE_ROOT $PKG |
505 |
best_visible=$(portageq best_visible $PORTAGE_ROOT $PKG) |
|
|
506 |
[ "x" != "x$best_visible" ] && echo $best_visible |
506 |
continue |
507 |
continue |
507 |
fi |
508 |
fi |
508 |
# Otherwise mask the other SLOTTED versions and check for latest |
509 |
# Otherwise mask the other SLOTTED versions and check for latest |
Lines 519-525
Link Here
|
519 |
do |
520 |
do |
520 |
echo "=${PKG}-${pkg_version}" >> /etc/portage/package.mask |
521 |
echo "=${PKG}-${pkg_version}" >> /etc/portage/package.mask |
521 |
done |
522 |
done |
522 |
portageq best_visible $PORTAGE_ROOT $PKG |
523 |
best_visible=$(portageq best_visible $PORTAGE_ROOT $PKG) |
|
|
524 |
[ "x" != "x$best_visible" ] && echo $best_visible |
523 |
if [ -f /etc/portage/package.mask.revdep-rebuild.backup ] |
525 |
if [ -f /etc/portage/package.mask.revdep-rebuild.backup ] |
524 |
then |
526 |
then |
525 |
mv -f /etc/portage/package.mask.revdep-rebuild.backup /etc/portage/package.mask |
527 |
mv -f /etc/portage/package.mask.revdep-rebuild.backup /etc/portage/package.mask |
Lines 564-571
Link Here
|
564 |
else |
566 |
else |
565 |
RAW_REBUILD_LIST="$(cat $LLIST.4_ebuilds | sed s/^/=/ | tr '\n' ' ')" |
567 |
RAW_REBUILD_LIST="$(cat $LLIST.4_ebuilds | sed s/^/=/ | tr '\n' ' ')" |
566 |
if [ ! -z "$RAW_REBUILD_LIST" ] ; then |
568 |
if [ ! -z "$RAW_REBUILD_LIST" ] ; then |
567 |
REBUILD_GREP="^\\($( (EMERGE_DEFAULT_OPTS="" emerge --nospinner --pretend --oneshot --nodeps --quiet $RAW_REBUILD_LIST ; echo $? >$LLIST.5_status ) | sed -n 's/\./\\&/g;s/ //g;s/$/\\/;s/\[[^]]*\]//gp' | tr '\n' '|' | sed 's/|$//'))\$" |
569 |
REBUILD_GREP="^\\($( (EMERGE_DEFAULT_OPTS="" emerge --nospinner --pretend --oneshot --nodeps --quiet $RAW_REBUILD_LIST ; echo $? >$LLIST.5a_status ) | sed -n 's/\./\\&/g;s/ //g;s/$/\\/;s/\[[^]]*\]//gp' | tr '\n' '|' | sed 's/|$//'))\$" |
568 |
if [ $(cat $LLIST.5_status) -gt 0 ] ; then |
570 |
if [ $(cat $LLIST.5a_status) -gt 0 ] ; then |
569 |
echo "" |
571 |
echo "" |
570 |
echo -e "${RD}Warning: Failed to resolve package order." |
572 |
echo -e "${RD}Warning: Failed to resolve package order." |
571 |
echo -e "Will merge in \"random\" order!${NO}" |
573 |
echo -e "Will merge in \"random\" order!${NO}" |
Lines 579-585
Link Here
|
579 |
done |
581 |
done |
580 |
ln -f $LLIST.4_ebuilds $LLIST.5_order |
582 |
ln -f $LLIST.4_ebuilds $LLIST.5_order |
581 |
else |
583 |
else |
582 |
EMERGE_DEFAULT_OPTS="" emerge --nospinner --pretend --oneshot --emptytree --quiet $RAW_REBUILD_LIST | sed -n 's/ //g;s/^.*\]//p' | grep "$REBUILD_GREP" >$LLIST.5_order |
584 |
(EMERGE_DEFAULT_OPTS="" emerge --nospinner --pretend --oneshot --emptytree --quiet $RAW_REBUILD_LIST ; echo $? >$LLIST.5b_status ) | sed -n 's/ //g;s/^.*\]//p' | grep "$REBUILD_GREP" >$LLIST.5_order |
|
|
585 |
if [ $(cat $LLIST.5b_status) -gt 0 ] ; then |
586 |
echo "" |
587 |
echo -e "${RD}Warning: Failed to resolve package order." |
588 |
echo -e "Will merge in \"random\" order!${NO}" |
589 |
echo "Possible reasons:" |
590 |
echo "- An ebuild is no longer in the portage tree." |
591 |
echo "- An ebuild is masked, use /etc/portage/packages.keyword" |
592 |
echo " and/or /etc/portage/package.unmask to unmask it" |
593 |
for i in . . . . . ; do |
594 |
echo -n -e '\a.' |
595 |
sleep 1 |
596 |
done |
597 |
rm -f $LLIST.5_order |
598 |
ln -f $LLIST.4_ebuilds $LLIST.5_order |
599 |
fi |
583 |
fi |
600 |
fi |
584 |
else |
601 |
else |
585 |
echo -n "" >$LLIST.5_order |
602 |
echo -n "" >$LLIST.5_order |