[MPlayer-dev-eng] [PATCH] configure: add support for specifying a branch to use.

Alexander Strasser eclipse7 at gmx.net
Wed Feb 26 00:22:06 CET 2014


Hi Reimar!

On 2014-02-24 20:18 +0100, Reimar Döffinger wrote:
> This is intended for use in release.
> ---
>  configure | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index fab56a7..1448a23 100755
> --- a/configure
> +++ b/configure
> @@ -1507,9 +1507,12 @@ if test -e ffmpeg/.svn ; then
>      exit 1
>  fi
>  
> +FFBRANCH=master

  I would prefer the name FFREF (or FFMPEG_REF) to address
the fact that we can use tag names too, which we IMHO should
do for release tarballs.

  BTW talking about releases, I guess we will make one soon,
won't we?

> +test -e FFBRANCH && FFBRANCH=`cat FFBRANCH`

  I think we use $() instead of `` nowadays. A quick glance
at configure seems to support that suspicion.

> +
>  if test -e ffmpeg/mp_auto_pull ; then
>      echo "Updating FFmpeg, (re)move ffmpeg/mp_auto_pull to disable"
> -    (cd ffmpeg && git checkout master)
> +    (cd ffmpeg && git checkout $FFBRANCH)


>      if ! (cd ffmpeg && git pull --rebase --ff-only) ; then

  I realize now this would fail with a tag name in the line above (e.g. in
detached HEAD state).

  Could be fixed by something like this I believe (not integration tested):
  if ! ( cd ffmpeg && ( test "$(git branch | grep '^*')" == "* (no branch)" || git pull --rebase --ff-only ) ) ; then
  

>          echo "git pull failed, (re)move ffmpeg/mp_auto_pull to disable pulling"
>          exit 1
> @@ -1519,7 +1522,7 @@ fi
>  if ! test -e ffmpeg ; then
>      echo "No FFmpeg checkout, press enter to download one with git or CTRL+C to abort"
>      read tmp
> -    if ! git clone --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
> +    if ! git clone -b $FFBRANCH --depth 1 git://source.ffmpeg.org/ffmpeg.git ffmpeg ; then
>          rm -rf ffmpeg
>          echo "Failed to get a FFmpeg checkout"
>          echo "Please try again or put FFmpeg source code copy into ffmpeg/ manually."
> -- 

  Despite my little remarks the patch LGTM.

  Alexander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20140226/f3984fa2/attachment.asc>


More information about the MPlayer-dev-eng mailing list