[ckan-changes] commit/ckan-debs-public: dread: Builder second draft

Bitbucket commits-noreply at bitbucket.org
Tue Jun 7 10:54:42 UTC 2011


1 new changeset in ckan-debs-public:

http://bitbucket.org/okfn/ckan-debs-public/changeset/1bb884aea3b4/
changeset:   1bb884aea3b4
branches:    
user:        dread
date:        2011-06-07 12:54:37
summary:     Builder second draft
affected #:  2 files (98 bytes)

--- a/builder.py	Tue Jun 07 11:49:53 2011 +0100
+++ b/builder.py	Tue Jun 07 11:54:37 2011 +0100
@@ -42,7 +42,7 @@
                 raise BuilderError("Error while running command: %s" % (cmd))
             return output
 
-    def clone(self, repo_url, destination_path, revision='default':
+    def clone(self, repo_url, destination_path, revision='default'):
         '''Clones a repo, or if it is already there, updates it to the latest version.
         @param
         repo_url - repo url
@@ -52,18 +52,20 @@
         '''
         repo_name = repo_url.split('/')[-1]
         repo_dir = destination_path % self.env
+        revision = revision % self.env
         hgrc_filepath = os.path.join(repo_dir, '.hg', 'hgrc')
         msg = 'Get repo for "%s" source' % repo_name
         if os.path.exists(repo_dir):
             if not os.path.exists(hgrc_filepath):
                 raise BuilderError('Found path %r but expected repo %r there.' % (repo_dir, repo_name))
             self.run(msg,
-                     'hg -R %(repo_dir)s up -r $(revision)s',
+                     'hg -R %(repo_dir)s up -r %(revision)s',
                      repo_dir=repo_dir,
                      revision=revision)
         else:
+            import pdb; pdb.set_trace()
             self.run(msg,
-                     'hg clone %(repo_url)s@%(revision)s %(repo_dir)s',
+                     'hg clone %(repo_url)s/%(revision)s %(repo_dir)s',
                      repo_url=repo_url,
                      repo_dir=repo_dir,
                      revision=revision)


--- a/buildersconfig.py	Tue Jun 07 11:49:53 2011 +0100
+++ b/buildersconfig.py	Tue Jun 07 11:54:37 2011 +0100
@@ -27,6 +27,7 @@
                  'mkdir -p %(build_dir)s/python-ckan')
         python_ckan_dir = '%(build_dir)s/python-ckan/ckan' % self.env
         self.clone('https://bitbucket.org/okfn/ckan', python_ckan_dir, '%(revision)s')
-        self.build_deb(python_ckan_dir, '%(build_dir)s/conflict', '0.1~03+lucid', None)
+        deps = []
+        self.build_deb(python_ckan_dir, '%(build_dir)s/conflict', '0.1~03+lucid', deps)
         
 #      'cd python-ckan; ~/pyenv-tools/bin/python -m buildkit.deb . ckan %(ckan_version)s~%(ckan_build_number)s+lucid http://ckan.org ' + ckan_deps)

Repository URL: https://bitbucket.org/okfn/ckan-debs-public/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list