Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/modules/system.json24
-rw-r--r--devbot/build.py33
-rw-r--r--devbot/config.py1
3 files changed, 17 insertions, 41 deletions
diff --git a/config/modules/system.json b/config/modules/system.json
index 2f3b73f..7e47114 100644
--- a/config/modules/system.json
+++ b/config/modules/system.json
@@ -1,6 +1,6 @@
[
{
- "branch": "2.34.2",
+ "tag": "2.34.2",
"name": "glib",
"options": [
"--disable-modular-tests"
@@ -8,7 +8,7 @@
"repo": "git://git.gnome.org/glib"
},
{
- "branch": "GOBJECT_INTROSPECTION_1_34_1_1",
+ "tag": "GOBJECT_INTROSPECTION_1_34_1_1",
"name": "gobject-introspection",
"options": [
"--disable-tests"
@@ -16,36 +16,36 @@
"repo": "git://git.gnome.org/gobject-introspection"
},
{
- "branch": "776088b4d673183264893cf40bd3e4e359ba7a5",
+ "tag": "776088b4d673183264893cf40bd3e4e359ba7a5",
"name": "pygobject",
"repo": "git://git.gnome.org/pygobject"
},
{
- "branch": "ATK_2_6_0",
+ "tag": "ATK_2_6_0",
"if": "gnome_version == '3.4'",
"name": "atk",
"repo": "git://git.gnome.org/atk"
},
{
- "branch": "AT_SPI2_CORE_2_6_1",
+ "tag": "AT_SPI2_CORE_2_6_1",
"if": "gnome_version == '3.4'",
"name": "at-spi2-core",
"repo": "git://git.gnome.org/at-spi2-core"
},
{
- "branch": "AT_SPI2_ATK_2_6_1",
+ "tag": "AT_SPI2_ATK_2_6_1",
"if": "gnome_version == '3.4'",
"name": "at-spi2-atk",
"repo": "git://git.gnome.org/at-spi2-atk"
},
{
- "branch": "3.6.1",
+ "tag": "3.6.1",
"if": "gnome_version == '3.4'",
"name": "gtk+",
"repo": "git://git.gnome.org/gtk+"
},
{
- "branch": "1.0.2",
+ "tag": "1.0.2",
"if": "gstreamer_version != '1.0'",
"name": "gstreamer",
"options": [
@@ -55,7 +55,7 @@
"repo": "git://anongit.freedesktop.org/gstreamer/gstreamer"
},
{
- "branch": "1.0.2",
+ "tag": "1.0.2",
"if": "gstreamer_version != '1.0'",
"name": "gst-plugins-base",
"options": [
@@ -65,7 +65,7 @@
"repo": "git://anongit.freedesktop.org/gstreamer/gst-plugins-base"
},
{
- "branch": "1.0.2",
+ "tag": "1.0.2",
"if": "gstreamer_version != '1.0'",
"name": "gst-plugins-good",
"options": [
@@ -75,13 +75,13 @@
"repo": "git://anongit.freedesktop.org/gstreamer/gst-plugins-good"
},
{
- "branch": "libxklavier-5.3",
+ "tag": "libxklavier-5.3",
"if": "gnome_version == '3.4'",
"name": "libxklavier",
"repo": "git://anongit.freedesktop.org/libxklavier"
},
{
- "branch": "METACITY_2_34_13",
+ "tag": "METACITY_2_34_13",
"name": "metacity",
"options": [
"--disable-themes-documentation"
diff --git a/devbot/build.py b/devbot/build.py
index 9c616aa..e958078 100644
--- a/devbot/build.py
+++ b/devbot/build.py
@@ -8,6 +8,7 @@ import time
from devbot import command
from devbot import config
from devbot import environ
+from devbot import git
from devbot import state
from devbot import utils
@@ -86,39 +87,13 @@ def _unlink_libtool_files():
os.path.walk(config.lib_dir, func, None)
-def _is_detached_head():
- return subprocess.call(["git", "symbolic-ref", "-q", "HEAD"],
- stdout=utils.devnull,
- stderr=subprocess.STDOUT) != 0
-
-def _pull_git_module(module):
- module_dir = module.get_source_dir()
-
- if os.path.exists(os.path.join(module_dir, ".git")):
- os.chdir(module_dir)
-
- command.run(["git", "remote", "set-url", "origin", module.repo])
-
- if _is_detached_head():
- command.run(["git", "remote", "update", "origin"], retry=10)
- command.run(["git", "checkout", module.branch])
- else:
- command.run(["git", "checkout", module.branch])
- command.run(["git", "pull"], retry=10)
- else:
- os.chdir(config.get_source_dir())
-
- command.run(["git", "clone", "--progress", module.repo, module.name],
- retry=10)
-
- os.chdir(module_dir)
- command.run(["git", "checkout", module.branch])
-
def _pull_module(module):
print "\n=== Pulling %s ===\n" % module.name
try:
- _pull_git_module(module)
+ git_module = git.Module(config.get_source_dir(), module.name,
+ module.repo, module.tag)
+ git_module.update()
except subprocess.CalledProcessError:
return False
diff --git a/devbot/config.py b/devbot/config.py
index 513fe10..0f76644 100644
--- a/devbot/config.py
+++ b/devbot/config.py
@@ -33,6 +33,7 @@ class Module:
self.name = info["name"]
self.repo = info["repo"]
self.branch = info.get("branch", "master")
+ self.tag = info.get("tag", None)
self.auto_install = info.get("auto-install", False)
self.options = info.get("options", [])