Add package to build submission zephyrs
[invirt/packages/invirt-dev.git] / invirtibuilder
index 8a6b077..fd1417f 100755 (executable)
@@ -202,8 +202,10 @@ def uploadBuild(pocket, workdir):
         except subprocess.CalledProcessError, e:
             if not force:
                 raise
         except subprocess.CalledProcessError, e:
             if not force:
                 raise
-            packages = deb822.Changes(open(changes).read())['Binary']
-            for package in packages.split():
+            changelog = deb822.Changes(open(changes).read())
+            packages = set(changelog['Binary'].split())
+            packages.add(changelog['Source'])
+            for package in packages:
                 logAndRun(['reprepro-env', 'remove', apt, package])
             logAndRun(upload)
 
                 logAndRun(['reprepro-env', 'remove', apt, package])
             logAndRun(upload)
 
@@ -285,8 +287,8 @@ def packageWorkdir(package, commit, build_id):
     workdir = tempfile.mkdtemp(prefix=("b%d-" % build_id))
     try:
         p_archive = subprocess.Popen(
     workdir = tempfile.mkdtemp(prefix=("b%d-" % build_id))
     try:
         p_archive = subprocess.Popen(
-            ['git', 'archive',
-             '--remote=file://%s' % b.getRepo(package),
+            ['git', '--git-dir=%s' % (b.getRepo(package),),
+             'archive',
              '--prefix=%s/' % package,
              commit,
              ],
              '--prefix=%s/' % package,
              commit,
              ],