mgorny      15/08/08 09:32:50

  Modified:             ChangeLog git-r3.eclass
  Log:
  Add some boldness to output. Update/fix pkg_needrebuild() for 
smart-live-rebuild.

Revision  Changes    Path
1.1750               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1750&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1750&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1749&r2=1.1750

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1749
retrieving revision 1.1750
diff -u -r1.1749 -r1.1750
--- ChangeLog   7 Aug 2015 02:05:19 -0000       1.1749
+++ ChangeLog   8 Aug 2015 09:32:50 -0000       1.1750
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1749 2015/08/07 
02:05:19 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1750 2015/08/08 
09:32:50 mgorny Exp $
+
+  08 Aug 2015; Michał Górny <[email protected]> git-r3.eclass:
+  Add some boldness to output. Update/fix pkg_needrebuild() for
+  smart-live-rebuild.
 
   07 Aug 2015; Davide Pesavento <[email protected]> qt5-build.eclass:
   Fix bugs #549140 and #552942.



1.51                 eclass/git-r3.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.51&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?rev=1.51&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/git-r3.eclass?r1=1.50&r2=1.51

Index: git-r3.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- git-r3.eclass       9 Jul 2015 20:21:05 -0000       1.50
+++ git-r3.eclass       8 Aug 2015 09:32:50 -0000       1.51
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.50 2015/07/09 
20:21:05 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/git-r3.eclass,v 1.51 2015/08/08 
09:32:50 mgorny Exp $
 
 # @ECLASS: git-r3.eclass
 # @MAINTAINER:
@@ -185,19 +185,19 @@
                        ;;
                single)
                        if [[ ${EGIT_CLONE_TYPE} == shallow ]]; then
-                               einfo "git-r3: ebuild needs to be cloned in 
'single' mode, adjusting"
+                               einfo "git-r3: ebuild needs to be cloned in 
'\e[1msingle\e[22m' mode, adjusting"
                                EGIT_CLONE_TYPE=single
                        fi
                        ;;
                single+tags)
                        if [[ ${EGIT_CLONE_TYPE} == shallow || 
${EGIT_CLONE_TYPE} == single ]]; then
-                               einfo "git-r3: ebuild needs to be cloned in 
'single+tags' mode, adjusting"
+                               einfo "git-r3: ebuild needs to be cloned in 
'\e[1msingle+tags\e[22m' mode, adjusting"
                                EGIT_CLONE_TYPE=single+tags
                        fi
                        ;;
                mirror)
                        if [[ ${EGIT_CLONE_TYPE} != mirror ]]; then
-                               einfo "git-r3: ebuild needs to be cloned in 
'mirror' mode, adjusting"
+                               einfo "git-r3: ebuild needs to be cloned in 
'\e[1mmirror\e[22m' mode, adjusting"
                                EGIT_CLONE_TYPE=mirror
                        fi
                        ;;
@@ -532,7 +532,7 @@
                umask "${EVCS_UMASK}" || die "Bad options to umask: 
${EVCS_UMASK}"
        fi
        for r in "${repos[@]}"; do
-               einfo "Fetching ${r} ..."
+               einfo "Fetching \e[1m${r}\e[22m ..."
 
                local fetch_command=( git fetch "${r}" )
                local clone_type=${EGIT_CLONE_TYPE}
@@ -553,11 +553,11 @@
                        # so automatically switch to single+tags mode.
                        if [[ ${clone_type} == shallow ]]; then
                                einfo "  Google Code does not support shallow 
clones"
-                               einfo "  using EGIT_CLONE_TYPE=single+tags"
+                               einfo "  using 
\e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
                                clone_type=single+tags
                        elif [[ ${clone_type} == single ]]; then
                                einfo "  git-r3: Google Code does not send tags 
properly in 'single' mode"
-                               einfo "  using EGIT_CLONE_TYPE=single+tags"
+                               einfo "  using 
\e[1mEGIT_CLONE_TYPE=single+tags\e[22m"
                                clone_type=single+tags
                        fi
                fi
@@ -771,7 +771,7 @@
        local -x GIT_DIR
        _git-r3_set_gitdir "${repos[0]}"
 
-       einfo "Checking out ${repos[0]} to ${out_dir} ..."
+       einfo "Checking out \e[1m${repos[0]}\e[22m to \e[1m${out_dir}\[e22m ..."
 
        if ! git cat-file -e refs/git-r3/"${local_id}"/__main__; then
                if [[ ${EVCS_OFFLINE} ]]; then
@@ -916,7 +916,7 @@
 
        local r success
        for r in "${repos[@]}"; do
-               einfo "Peeking ${remote_ref} on ${r} ..." >&2
+               einfo "Peeking \e[1m${remote_ref}\e[22m on \e[1m${r}\e[22m ..." 
>&2
 
                local is_branch lookup_ref
                if [[ ${remote_ref} == refs/heads/* || ${remote_ref} == HEAD ]]
@@ -966,16 +966,23 @@
 }
 
 # https://bugs.gentoo.org/show_bug.cgi?id=482666
-git-r3_pkg_outofdate() {
+git-r3_pkg_needrebuild() {
        debug-print-function ${FUNCNAME} "$@"
 
        local new_commit_id=$(git-r3_peek_remote_ref)
-       ewarn "old: ${EGIT_VERSION}"
-       ewarn "new: ${new_commit_id}"
-       [[ ${new_commit_id} && ${old_commit_id} ]] || return 2
+       [[ ${new_commit_id} && ${EGIT_VERSION} ]] || die "Lookup failed"
+
+       if [[ ${EGIT_VERSION} != ${new_commit_id} ]]; then
+               einfo "Update from \e[1m${EGIT_VERSION}\e[22m to 
\e[1m${new_commit_id}\e[22m"
+       else
+               einfo "Local and remote at \e[1m${EGIT_VERSION}\e[22m"
+       fi
 
        [[ ${EGIT_VERSION} != ${new_commit_id} ]]
 }
 
+# 'export' locally until this gets into EAPI
+pkg_needrebuild() { git-r3_pkg_needrebuild; }
+
 _GIT_R3=1
 fi




Reply via email to