Merged from trunk -r15835:15840
authorFabian Groffen <grobian@gentoo.org>
Tue, 23 Mar 2010 07:23:38 +0000 (07:23 -0000)
committerFabian Groffen <grobian@gentoo.org>
Tue, 23 Mar 2010 07:23:38 +0000 (07:23 -0000)
   | 15839   | Bug #309149 - Unify look of eend used in bash & python code, |
   | zmedico | additionally fixing few inconsistences in bash code. Thanks  |
   |         | to Michał Górny <gentoo@mgorny.alt.pl> for this patch.     |

   | 15840   | Show masking reasons for --binpkg-respect-use. Thanks to     |
   | zmedico | Sebastian Luther (few) for this patch.                       |

svn path=/main/branches/prefix/; revision=15841

bin/isolated-functions.sh
pym/_emerge/depgraph.py
pym/portage/output.py

index b268269fe53e45d4ec25c17fca06c0591531d8a0..d951c74b7fd571ae9a9d5207ccf21c04303a072f 100755 (executable)
@@ -328,10 +328,10 @@ _eend() {
        fi
 
        if [[ ${RC_ENDCOL} == "yes" ]] ; then
-               echo -e "${ENDCOL}  ${msg}"
+               echo -e "${ENDCOL} ${msg}"
        else
                [[ ${LAST_E_CMD} == ebegin ]] || LAST_E_LEN=0
-               printf "%$(( COLS - LAST_E_LEN - 6 ))s%b\n" '' "${msg}"
+               printf "%$(( COLS - LAST_E_LEN - 7 ))s%b\n" '' "${msg}"
        fi
 
        return ${retval}
@@ -399,7 +399,7 @@ get_KV() {
 }
 
 unset_colors() {
-       COLS="25 80"
+       COLS=80
        ENDCOL=
 
        GOOD=
@@ -414,13 +414,10 @@ set_colors() {
        COLS=${COLUMNS:-0}      # bash's internal COLUMNS variable
        (( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2)
        (( COLS > 0 )) || (( COLS = 80 ))
-       COLS=$((${COLS} - 8))   # width of [ ok ] == 7
-       # Adjust COLS so that eend works properly on a standard BSD console.
-       [[ $TERM = cons25 || $TERM = dumb ]] && ((COLS--))
 
        # Now, ${ENDCOL} will move us to the end of the
        # column;  irregardless of character width
-       ENDCOL=$'\e[A\e['${COLS}'C'
+       ENDCOL=$'\e[A\e['$(( COLS - 8 ))'C'
        if [ -n "${PORTAGE_COLORMAP}" ] ; then
                eval ${PORTAGE_COLORMAP}
        else
index 366aa3cb88a531f84ea053d0caaa2b840ed167f0..743d38bc767d57c65089efdf0c10fa68e5a4c29b 100644 (file)
@@ -2180,6 +2180,8 @@ class depgraph(object):
                                                missing_use.append(pkg)
                                                if not mreasons:
                                                        continue
+                                       if pkg.built and not mreasons:
+                                               mreasons = ["use flag configuration mismatch"]
                                masked_packages.append(
                                        (root_config, pkgsettings, cpv, metadata, mreasons))
 
index 407238c167ad6524212e52c52ab600bab291d59c..1b1edbb163121a794619638e31569d7077e7ff85 100644 (file)
@@ -487,9 +487,6 @@ class EOutput(object):
                lines, columns = get_term_size()
                if columns <= 0:
                        columns = 80
-               # Adjust columns so that eend works properly on a standard BSD console.
-               if os.environ.get("TERM") in ("cons25", "dumb"):
-                       columns = columns - 1
                self.term_columns = columns
                sys.stdout.flush()
                sys.stderr.flush()
@@ -518,7 +515,7 @@ class EOutput(object):
                if not self.quiet:
                        out = sys.stdout
                        self._write(out,
-                               "%*s%s\n" % ((self.term_columns - self.__last_e_len - 6),
+                               "%*s%s\n" % ((self.term_columns - self.__last_e_len - 7),
                                "", status_brackets))
 
        def ebegin(self, msg):
@@ -532,7 +529,7 @@ class EOutput(object):
                msg += " ..."
                if not self.quiet:
                        self.einfon(msg)
-               self.__last_e_len = len(msg) + 4
+               self.__last_e_len = len(msg) + 3
                self.__last_e_cmd = "ebegin"
 
        def eend(self, errno, *msg):