gnome-live r8 - trunk/dev-kit/build-system



Author: kvandine
Date: Wed Jan 16 05:16:25 2008
New Revision: 8
URL: http://svn.gnome.org/viewvc/gnome-live?rev=8&view=rev

Log:
Added build script

Added:
   trunk/dev-kit/build-system/
   trunk/dev-kit/build-system/refresh-gnome   (contents, props changed)

Added: trunk/dev-kit/build-system/refresh-gnome
==============================================================================
--- (empty file)
+++ trunk/dev-kit/build-system/refresh-gnome	Wed Jan 16 05:16:25 2008
@@ -0,0 +1,118 @@
+#!/bin/bash
+#
+# Copyright (C) 2008 Ken VanDine <ken vandine org>
+#
+# Licensed under the GNU General Public License Version 2
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+usage() 
+{
+    echo "usage: refresh-gnome [update|build|bump]"
+    exit
+}
+
+if [ $# -lt 1 ];
+then
+    usage
+fi
+
+if [ ! "$1" = "update" ] && [ ! "$1" = "build" ] && [ ! "$1" = "bump" ];
+then
+    usage
+fi
+
+action=$1
+workingDir=$HOME/conary/gnome/trunk
+currentDir=`pwd`
+context="gnome:trunk"
+
+#Note each trove in this list needs to end with a ","
+troves="GConf,gedit,glade,gnome-applets,gnome-backgrounds,gnome-common,gnome-control-center,gnome-desktop,gnome-doc-utils,gnome-icon-theme,gnome-keyring-manager,gnome-media,gnome-menus,gnome-mime-data,gnome-nettool,gnome-panel,gnome-power-manager,gnome-python,gnome-python-desktop,gnome-screensaver,gnome-session,gnome-system-monitor,gnome-terminal,gnome-themes,gnome-user-docs,gnome-utils,gnome-volume-manager,gok,gtk-doc,gtk-engines,gtkhtml,gtksourceview,gucharmap,intltool,libIDL,libbonobo,libbonoboui,libgail-gnome,libglade,libgnome,libgnomecanvas,libgnomecups,libgnomekbd,libgnomeprint,libgnomeprintui,libgnomeui,libgtop,librsvg,libsoup,libwnck,libxml++,metacity,nautilus-cd-burner,orca,pango,pygobject,pyorbit,seahorse,tomboy,totem,vino,vte,yelp,zenity,totem-pl-parser,gnome-vfs,gnome-keyring,glib,glibmm,gnome-mag,gnome-speech,liboobs,eel,nautilus,gnome-system-tools,gtkmm,gdm,evolution-data-server,evolution,evolution-exchange,evolution-webcal,epiphany,epiphany-extensions,empathy,
 rhythmbox,cheese,"
+blacklist="gnome-common,gtk-doc,intltool,gnome-vfs,gnome-keyring,glibmm,gnome-mag,gnome-speech,liboobs,gnome-system-tools,gtkmm,gnome-terminal,eel,nautilus,gdm,evolution-exchange,pango,gnome-doc-utils,"
+
+blacklist=`echo "$blacklist" | sed "s/,/ /g"`
+echo Current Black list includes:
+
+for i in $blacklist;
+do
+    echo $i
+    troves=`echo "$troves" | sed "s/$i,/ /g"`
+done
+troves=`echo "$troves" | sed "s/,/ /g"`
+
+if [ $action = "update" ];
+then
+    #echo "deleting any NEGATIVE cache in your cache dir"
+    #rm -rf $HOME/conary/cache/NEGATIVE
+    cd $workingDir
+    echo $troves | xargs cvc co
+    for trove in $troves;
+    do
+        module=`echo $trove | tr A-Z a-z`
+        lastestVersion=`conary rq $trove:source=gnome rpath org gnome:trunk |awk -F '/' '{print $2}'|awk -F '-' '{print $1}'`
+        lastestRevision=`/usr/bin/svn log -q --limit 1 http://svn.gnome.org/svn/$module/trunk/ |grep -v '\-\-\-'|awk '{print $1}'`
+        echo "Latest version of $trove in conary is: $lastestVersion"
+        echo "Latest version of $module in svn is: $lastestRevision"
+        if [ $lastestVersion != $lastestRevision ]
+        then
+            echo "refreshing $trove"
+            cd $trove
+            cvc refresh $trove--.tar.bz2 >/dev/null 2>&1
+            cvc commit --message "New snapshot" >/dev/null 2>&1
+            cd - >/dev/null 2>&1
+        fi
+    done
+    cd $currentDir
+
+elif [ $action = "build" ];
+then
+    tobuild=""
+    echo $troves
+    for trove in $troves;
+    do
+        lastestBuiltVersion=`conary rq $trove=gnome rpath org gnome:trunk |awk -F '/' '{print $2}'|awk -F '-' '{print $1}'`
+        lastestSourceVersion=`conary rq $trove:source=gnome rpath org gnome:trunk |awk -F '/' '{print $2}'|awk -F '-' '{print $1}'`
+        if [ $lastestSourceVersion != $lastestBuiltVersion ]
+        then
+            echo "Latest source version of $trove is: $lastestSourceVersion"
+            echo "Latest built version of $trove is: $lastestBuiltVersion"
+            tobuild="$tobuild $trove"
+        fi
+    done
+
+    echo "building $tobuild"
+    
+    jobId=`echo $tobuild | xargs rmake build --quiet --no-watch --context $context`
+    #jobId=2102
+    echo "Your Job ID is $jobId"
+    status=`rmake q $jobId | grep $jobId | awk '{print $2}'`
+    while [ $status = "Started" ];
+    do
+        sleep 300
+        status=`rmake q $jobId | grep $jobId | awk '{print $2}'`
+    done
+    if [ $status = "Built" ];
+    then
+        rmake commit $jobId
+    else
+        echo "Build $jobId Failed"
+        rmake commit $jobId
+    fi
+elif [ $action = "bump" ];
+then
+    cd $workingDir
+    echo "Bumping group version"
+    cvc co --context $context group-world
+    cd group-world
+    echo "" >> group-world.recipe
+    cvc commit --context $context --message "Group bump"
+    echo "Group version bumped"
+    echo "Cooking group-world"
+    ./cook.sh
+    cd $currentDir
+fi
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]