fix source-dist for new repository layout
authorTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 14:49:09 +0000 (17:49 +0300)
committerTimo Savola <tsavola@movial.fi>
Fri, 4 Apr 2008 14:49:09 +0000 (17:49 +0300)
matrix/matrix.py

index 4e3f5ea..36ce2c8 100644 (file)
@@ -597,7 +597,7 @@ def source_dist_components(targets):
                package_component_sources(c, 'dist')
 
 def generate_component_changes(c, location):
                package_component_sources(c, 'dist')
 
 def generate_component_changes(c, location):
-       print 'Generating component change log:', c.name
+       print 'Generating change log for', c.repo.path
 
        path = os.path.join(location, c.name) + '.changes'
 
 
        path = os.path.join(location, c.name) + '.changes'
 
@@ -606,17 +606,18 @@ def generate_component_changes(c, location):
                os.makedirs(pathdir)
 
        fd = os.open(path, os.O_WRONLY | os.O_CREAT, 0644)
                os.makedirs(pathdir)
 
        fd = os.open(path, os.O_WRONLY | os.O_CREAT, 0644)
-       git.log(c.name, [c.get_active_tag()], fd=fd)
+       git.log(c.repo.path, [c.get_active_tag()], fd=fd)
        os.close(fd)
 
 def package_component_sources(c, location):
        os.close(fd)
 
 def package_component_sources(c, location):
-       print 'Packaging component sources:', c.name
+       print 'Archiving', c.repo.path
 
 
-       rev=git.describe(c.name)
+       rev = git.describe(c.repo.path)
        if rev:
        if rev:
-               rev = '_'+rev
+               rev = '_' + rev
        else:
                rev = ''
        else:
                rev = ''
+
        path = os.path.join(location, c.name) + rev + '.tar.bz2'
        if os.path.exists(path):
                os.remove(path)
        path = os.path.join(location, c.name) + rev + '.tar.bz2'
        if os.path.exists(path):
                os.remove(path)
@@ -625,9 +626,9 @@ def package_component_sources(c, location):
        if not os.path.exists(pathdir):
                os.makedirs(pathdir)
 
        if not os.path.exists(pathdir):
                os.makedirs(pathdir)
 
-       git.archive(c.name,path,
-                               prefix=os.path.basename(c.name)+'/',
-                               branch=c.get_active_tag())
+       git.archive(c.repo.path, path,
+                   prefix=os.path.basename(c.name) + '/',
+                   branch=c.get_active_tag())
 
 def build_rootfs(clean=True, rootfs_only=False, jffs2_only=False, devrootfs_only=False):
        parse_config('rootfs')
 
 def build_rootfs(clean=True, rootfs_only=False, jffs2_only=False, devrootfs_only=False):
        parse_config('rootfs')