﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	mlocked
12108	Gentoo live ebuilds checkout to branch-master	jflatt@…		"I noticed with my own homemade gentoo live ebuilds, I wasn't getting theme info.
When gentoo builds mythtv via git, it creates a new local branch:

{{{
Branch branch-master set up to track remote branch master from origin.
Switched to a new branch 'branch-master'
}}}

MythTV's version.sh script runs `git branch --no-color` during the build process, which writes version.h to include:

{{{
#define MYTHTV_SOURCE_PATH ""branch-master""
}}}

When the themechooser.cpp loads it builds the download url by executing the code:

{{{
// Treat devel branches as master
if (MythVersion.startsWith(""devel/""))
    MythVersion = ""master"";

// FIXME: For now, treat git master the same as svn trunk
if (MythVersion == ""master"")
    MythVersion = ""trunk"";

if (MythVersion != ""trunk"")
{
    MythVersion = MYTH_BINARY_VERSION; // Example: 0.25.20101017-1
    MythVersion.replace(QRegExp(""\\.[0-9]{8,}.*""), """");
}
}}}

It falls through to the last 'if' statement.
I believe it ends up trying to grab with a '0.28' in the url where it fails since 0.28 isn't released yet.
I added a simple patch which adds branch-master, and tested it successfully:

{{{
diff --git a/mythtv/programs/mythfrontend/themechooser.cpp b/mythtv/programs/mythfrontend/themechooser.cpp
index 49bcafb..964f28e 100644
--- a/mythtv/programs/mythfrontend/themechooser.cpp
+++ b/mythtv/programs/mythfrontend/themechooser.cpp
@@ -159,7 +159,7 @@ void ThemeChooser::Load(void)
         MythVersion = ""master"";
 
     // FIXME: For now, treat git master the same as svn trunk
-    if (MythVersion == ""master"")
+    if (MythVersion == ""master"" || MythVersion == ""branch-master"")
         MythVersion = ""trunk"";
 
     if (MythVersion != ""trunk"")
}}}

This code is actually in two places in themechooser.cpp
I couldn't find a way to specify in gentoo to not checkout a new branch.
Hopefully this might help others with the same issue, I wouldn't expect this exact patch to be used
"	Patch - Feature	closed	minor	unknown	MythTV - General	Master Head	low	Unverified			0
