aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--master/autotua/models.py15
-rwxr-xr-xmaster/setup-master.py1
2 files changed, 10 insertions, 6 deletions
diff --git a/master/autotua/models.py b/master/autotua/models.py
index ea39dd7..f5004a5 100644
--- a/master/autotua/models.py
+++ b/master/autotua/models.py
@@ -10,7 +10,7 @@ from django.db import models
from django.forms import ModelForm, ModelChoiceField
from django.contrib.auth.models import User
from autotua import jobuild, sync
-import const, random
+import const, random, urllib2
####################
### Models begin ###
@@ -131,13 +131,18 @@ class Job(models.Model):
Support multiple atoms for the multiple-save case
"""
- # FIXME: Re-implement using git-fuse?
- jobtagedir = '%s/jobtage-%s' % (const.TMPDIR, random.randint(0, 99999))
- sync.Syncer(scheme='git-export', uri=const.JOBTAGE, destdir=jobtagedir).sync()
+ tmpdir = '%s-%s' % (const.TMPDIR, random.randint(0, 99999))
+ jobtage_exportdir = '%s/jobtage-export' % tmpdir
+ jobtagedir = const.JOBTAGE
+ # If not a filesystem path, clone is required before an export
+ if not urllib2.splittype(jobtagedir)[0] in ['file', None]:
+ jobtagedir = '%s/jobtage' % tmpdir
+ sync.Syncer(scheme='git', uri=const.JOBTAGE, destdir=jobtagedir).sync()
+ sync.Syncer(scheme='git-export', uri=jobtagedir, destdir=jobtage_exportdir, rev=rev).sync()
deplist = []
for atom in atoms:
- resolver = jobuild.Resolver(jobuild.Jobuild(jobtagedir, atom))
+ resolver = jobuild.Resolver(jobuild.Jobuild(jobtage_exportdir, atom))
deplist.extend(resolver.resolve())
deplist.reverse()
# Fake jobuild.Resolver to get at _unique ;p
diff --git a/master/setup-master.py b/master/setup-master.py
index 3b2f3b1..4a6b67f 100755
--- a/master/setup-master.py
+++ b/master/setup-master.py
@@ -124,7 +124,6 @@ def setup_sample_job():
provider=job.provider)
job.release = Release.objects.get(name=sample_job['release'],
provider=job.provider)
- print job.atoms
job.save()
if len(sys.argv) < 3: