Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 347750 - mythtv.eclass needs updating to support git
Summary: mythtv.eclass needs updating to support git
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Doug Goldstein
URL: http://www.mythtv.org/
Whiteboard:
Keywords:
: 346927 (view as bug list)
Depends on:
Blocks: 352196
  Show dependency tree
 
Reported: 2010-12-04 19:34 UTC by Tom Flair
Modified: 2012-06-22 08:43 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updated for git (mythtv.eclass,1.95 KB, text/plain)
2010-12-16 20:01 UTC, Tom Flair
Details
Cleaned up (mythtv.eclass,2.20 KB, text/plain)
2010-12-22 01:25 UTC, Tom Flair
Details
Slight modification (mythtv.eclass,2.20 KB, text/plain)
2011-01-02 03:38 UTC, Tom Flair
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Flair 2010-12-04 19:34:16 UTC
MythTV has transitioned from SVN to GIT for version control.  

http://www.mythtv.org/news/145/MythTV%20is%20Moving%20to%20Github!
http://www.gossamer-threads.com/lists/mythtv/users/462754

This may effect Gentoo's scheme for naming Myth-related ebuilds.

Reproducible: Always

Steps to Reproduce:
Comment 1 Tom Flair 2010-12-06 01:31:42 UTC
MarcT has a version of an eclass on his github tree that might be adapted to work with versioned builds down the road.

https://github.com/MarcT/mt-mythtv
https://github.com/MarcT/mt-mythtv/blob/master/eclass/myth-git.eclass
Comment 2 Tianon 2010-12-08 19:46:06 UTC
If we wanted to use the same technique as last time, github has support for it: https://github.com/MythTV/mythtv/tarball/3e9463 (where 3e9463 is a specific commit), and that'll return a tar.gz file.
Comment 3 Tom Flair 2010-12-09 02:46:18 UTC
(In reply to comment #2)
> If we wanted to use the same technique as last time, github has support for it:
> https://github.com/MythTV/mythtv/tarball/3e9463 (where 3e9463 is a specific
> commit), and that'll return a tar.gz file.
> 

True, as I understand it, the name of the ebuild would have to omit the 'e' or any other letter to be a valid ebuild.  (1)

We could go the road of mplayer and use date based ebuilds instead of revision numbers and add a variable in the ebuild itself to reflect which commit we're pulling.  It wouldn't allow for simple copy/renaming like what the existing eclass allows for, but I don't think modifying a single line/variable to bump a revision would be too much extra effort for someone just trying to get a newer revision than what portage provides.

1. http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap2_sect2
Comment 4 Marc Tousignant 2010-12-13 01:41:59 UTC
As Tom stated, the eclass I modified, originally created by Preston Crow for the CVS and SVN checkouts in 2004 and 2005, has the capability of pulling specific versions from git. I just haven't advertised this functionality to the masses as I'm still trying to find a way to make the mythfrontend --version report correctly.
For MythTV and Plugins
MYTHTV_GIT_REVISION="11ee9c52ab2d639fa316"
For MythWeb
MYTHWEB_GIT_REVISION="52cb8fb98f1aa209cfd2"
For MythThemes
MYTHTHEMES_GIT_REVISION="1c84b134711163ef613c"
Comment 5 Tom Flair 2010-12-13 01:47:46 UTC
(In reply to comment #4)
> As Tom stated, the eclass I modified, originally created by Preston Crow for
> the CVS and SVN checkouts in 2004 and 2005, has the capability of pulling
> specific versions from git. I just haven't advertised this functionality to the
> masses as I'm still trying to find a way to make the mythfrontend --version
> report correctly.
> For MythTV and Plugins
> MYTHTV_GIT_REVISION="11ee9c52ab2d639fa316"
> For MythWeb
> MYTHWEB_GIT_REVISION="52cb8fb98f1aa209cfd2"
> For MythThemes
> MYTHTHEMES_GIT_REVISION="1c84b134711163ef613c"
> 

And this works great for trunk/master.  For 0.24, you'd want to add EGIT_BRANCH="fixes/0.24".

One could use the magic in the existing eclass to automatically sort out which branch to use.  
Comment 6 Marc Tousignant 2010-12-13 01:58:23 UTC
Already implemented. Note my 0.24-fixes branch version of the same eclass.

https://github.com/MarcT/mt-mythtv/blob/0.24-fixes/eclass/myth-git.eclass
Comment 7 Tom Flair 2010-12-16 20:01:47 UTC
Created attachment 257358 [details]
Updated for git

This is a dirty, but functional eclass for 0.24.

I'm not sure if there is an option to check if a variable equals two different options, so I had to use an ELIF.

This could potentially be modified further to check if there isn't a commit and switch to a live, git build.  Since I prefer defined versions, I didn't attempt to implement it.

I've used this to install and re-install core, themes and the plugins without a huge issue.  Mythweb indicates an error, but I think this is a problem with that specific ebuild that I'll stare at later.
Comment 8 Marc Tousignant 2010-12-17 08:06:08 UTC
(In reply to comment #7)
> I'm not sure if there is an option to check if a variable equals two different
> options, so I had to use an ELIF.

In my eclass you can see an example of how to do this. Basically create a variable that contains both of the values you want to check for.
VARIABLE="mythtv mythplugins"
Then use if hasq to check if the data in MY_PN is in the VARIABLE.
if hasq ${MY_PN} ${VARIABLE} ; then
Comment 9 Tom Flair 2010-12-21 00:02:14 UTC
I just noticed Kormoc has a far simpler version on GitHub.  This is closer to what I was hoping to achieve.

https://github.com/kormoc/Mythtv-Ebuilds/blob/master/eclass/mythtv.eclass
Comment 10 Tom Flair 2010-12-22 01:25:43 UTC
Created attachment 257728 [details]
Cleaned up

Cleaned up from the original version, variables described.

Thanks to Marc's comment #8, I've simplified SRC_URI and ${S}.

If the following link gets implemented, then this ebuild could be modified to support our legacy ebuilds.  If not, the legacy stuff could either be updated to conform to the newer style or depreciated.  Just my two cents.
http://www.gossamer-threads.com/lists/mythtv/users/465164#465164
Comment 11 Tom Flair 2011-01-02 03:38:27 UTC
Created attachment 258600 [details]
Slight modification

Slight change. This just corrects the branch description to closer emulate what is found in a build straight from git.
Comment 12 Doug Goldstein gentoo-dev 2012-06-22 03:20:09 UTC
The eclass will go away with 0.25 and we'll just use the release tar balls.
Comment 13 Doug Goldstein gentoo-dev 2012-06-22 03:32:45 UTC
Great work on improving this everyone. But the tarball approach will be easier for us since we'll recommend upstreams packages for git versions.
Comment 14 Doug Goldstein gentoo-dev 2012-06-22 04:04:45 UTC
*** Bug 346927 has been marked as a duplicate of this bug. ***