[mythtv-commits] Ticket #12108: Gentoo live ebuilds checkout to branch-master

MythTV noreply at mythtv.org
Wed Apr 9 01:59:57 UTC 2014


#12108: Gentoo live ebuilds checkout to branch-master
------------------------------+-----------------------------
 Reporter:  jflatt@…          |          Owner:
     Type:  Patch - Feature   |         Status:  closed
 Priority:  minor             |      Milestone:  unknown
Component:  MythTV - General  |        Version:  Master Head
 Severity:  low               |     Resolution:  Won't Fix
 Keywords:                    |  Ticket locked:  0
------------------------------+-----------------------------

Comment (by jflatt@…):

 A couple of things in version.sh:
 {{{
 # small shell script to generate version.cpp
 }}}
 This should be version.h, changed in 70a157f
 {{{
 GITTREEDIR=$1
 GITREPOPATH="exported"

 cd ${GITTREEDIR}

 git status > /dev/null 2>&1
 SOURCE_VERSION=$(git describe --dirty || git describe || echo Unknown)

 case "${SOURCE_VERSION}" in
     exported|Unknown)
         if ! grep -q Format $GITTREEDIR/EXPORTED_VERSION; then
             . $GITTREEDIR/EXPORTED_VERSION
             BRANCH=$(echo "${BRANCH}" | sed 's/ (\(.*,
 \)\{0,1\}\(.*\))/\2/')
         elif test -e $GITTREEDIR/VERSION ; then
             . $GITTREEDIR/VERSION
         fi
     ;;
     *)
         if [ -z "${BRANCH}" ]; then
 BRANCH=$(git branch --no-color | sed -e '/^[^\*]/d' -e 's/^\* //' -e
 's/(no branch)/exported/')
         fi
     ;;
 esac
 }}}
 GITREPOPATH doesn't look like it gets used anywhere, it can be deleted.

 SOURCE_VERSION gets set to the output of `git describe --dirty`, in the
 case statement, it's checked for equality to 'exported'.  I don't believe
 git ever outputs 'exported', that's a holdover from the subversion days,
 where 'exported' was a non-working svn directory.

 Gentoo does return output from the first `git describe --dirty`, and will
 under most circumstances never fall through to set SOURCE_VERSION to
 'Unknown'.  Therefore, the first set of case statements never hits, and
 the contents of VERSION is never applied.  The default case hits, and
 executes `git branch --no-color`.

 I found the Gentoo git-2.eclass, around line 200 it sets its default
 checkout hard-coded to prefix 'branch-', so there's probably no easy way
 around that.

 Can someone running the official 0.27 Gentoo ebuilds post the results of
 `mythfrontend --version`?  I'd be very interested to see the output.

 Maybe a more appropriate fix would be inside version.sh, toward the end,
 something like:
 {{{
 if [ "${BRANCH}" = "branch-master" ]; then
     BRANCH = "master"
 fi
 }}}

 Thanks for checking this out

--
Ticket URL: <https://code.mythtv.org/trac/ticket/12108#comment:2>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list