diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-08-08 09:32:50 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2015-08-08 09:32:50 +0000 |
commit | 460b9666dad63bb21d32418e61b1dcf9587a7a7e (patch) | |
tree | 12c93f70eb70bdef3f4ca7ba8405a67ed8a43bce | |
parent | Removed =sys-libs/tdb-1.3.7 mask (diff) | |
download | historical-460b9666dad63bb21d32418e61b1dcf9587a7a7e.tar.gz historical-460b9666dad63bb21d32418e61b1dcf9587a7a7e.tar.bz2 historical-460b9666dad63bb21d32418e61b1dcf9587a7a7e.zip |
Add some boldness to output. Update/fix pkg_needrebuild() for smart-live-rebuild.
-rw-r--r-- | eclass/ChangeLog | 6 | ||||
-rw-r--r-- | eclass/git-r3.eclass | 33 |
2 files changed, 25 insertions, 14 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 99a5bb66d620..273257d5dce5 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -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 <mgorny@gentoo.org> git-r3.eclass: + Add some boldness to output. Update/fix pkg_needrebuild() for + smart-live-rebuild. 07 Aug 2015; Davide Pesavento <pesa@gentoo.org> qt5-build.eclass: Fix bugs #549140 and #552942. diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index ba7715df604b..5f9d5c2c423c 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -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 @@ _git-r3_env_setup() { ;; 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 @@ git-r3_fetch() { 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 @@ git-r3_fetch() { # 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 @@ git-r3_checkout() { 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 @@ git-r3_peek_remote_ref() { 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 @@ git-r3_src_unpack() { } # 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 |