[mythtv-users] Gentoo ebuilds for trunk?

John Drescher drescherjm at gmail.com
Thu Sep 18 13:29:52 UTC 2008


On Thu, Sep 18, 2008 at 7:57 AM, Andrew Lyon <andrew.lyon at gmail.com> wrote:
> Hi,
>
> Are there any gentoo ebuilds to build a live or recent trunk version?
>
> I used to use the integralblue mythtv overlay but it has disappeared.
>

You can copy a working ebuild to your local overlay and rename it so
that the last part is any svn revision you want. I do this every time
I upgrade so that all plugins are the same svn revision.


Here is a script that bumps the ebuild to any svn rev (well > 15000):


#!/bin/bash

mythver=0.21_p
overlay_root=/usr/local/portage/gentoo-overlay
PREFIX=myth_upgrd
#package_versions=$(mktemp ${PREFIX}.XXXXXX)
package_versions=$(mktemp)


function get_package_list {
  packages=$(cat ${package_versions} |  sed -e 's/-0.21[^ ]*/\n/g' -e
's/ //g' | sort | uniq)
}

function unmask_package {
  echo =$1 >> /etc/portage/package.keywords/mythtv
  echo =$1 >> /etc/portage/package.unmask/mythtv
}

function bump_package {
    folder=${overlay_root}/$1
    mkdir -p ${folder}
    best_version=$(grep $1-${mythver} ${package_versions} | sort |
tail -n1 | sed  -e 's/^[<>=]*[a-z0-9]*\-[a-z]*\///')
    new_version=$(echo ${best_version} | sed -e
's/\-[0-9].*$//')-${mythver}${svn_rvn}

    cp /usr/portage/$1/${best_version}.ebuild  ${folder}/${new_version}.ebuild

    ebuild ${folder}/${new_version}.ebuild digest

    svn add ${folder}/${new_version}.ebuild

    unmask_package $1-${mythver}${svn_rvn}
}

function execute_main_loop {
  for a in ${packages} ;
  do
    bump_package $a
  done
}

if [ -z "$1" ]
then
  echo "Please specify svn revision"
elif [ "$1" -gt 15000 ]
then
  svn_rvn=$1
  equery list myth -p -o | grep ${mythver} | grep -v pre | sort | uniq
> ${package_versions}
  get_package_list
  execute_main_loop
else
  echo "Please specify svn revision > 15000"
fi

#######################################################################


You will have to change the overlay_root to your overlay folder.

John


More information about the mythtv-users mailing list