~xubuntu-dev/ubuntu-cdimage/xubuntu-base

« back to all changes in this revision

Viewing changes to bin/rebuild-requests

  • Committer: Stéphane Graber
  • Date: 2015-06-17 18:34:14 UTC
  • Revision ID: stgraber@ubuntu.com-20150617183414-j88jzfdeyz17bb14
Add minimal sub-project support in rebuild-requests

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
            print("Processing rebuilds for: %s" % project_id)
112
112
 
113
113
        project, build_type = project_id.split("/")
 
114
        sub_project = None
 
115
        if "/" in project:
 
116
            sub_project = project.split("/", 1)[1]
 
117
 
114
118
        arches = " ".join([entry[4] for entry in entries])
115
119
 
116
120
        for entry in entries:
125
129
                       entry[0].requestedby_name, entry[1:]))
126
130
 
127
131
        env = dict(os.environ)
 
132
        if sub_project:
 
133
            env['SUB_PROJECT'] = sub_project
128
134
        env['ARCHES'] = arches
129
135
        env['DIST'] = entries[0][0].series_title.lower()
130
136
        cmd = ["for-project", entry[1], "cron.%s" % entry[2]]
135
141
 
136
142
        if options.dry_run:
137
143
            if not options.quiet:
138
 
                print("Dry-run: ARCHES=%s DIST=%s %s" % (env['ARCHES'],
139
 
                                                         env['DIST'],
140
 
                                                         " ".join(cmd)))
 
144
                if sub_project:
 
145
                    print("Dry-run: SUB_PROJECT=%s ARCHES=%s DIST=%s %s" %
 
146
                          (env['SUB_PROJECT'], env['ARCHES'], env['DIST'],
 
147
                           " ".join(cmd)))
 
148
                else:
 
149
                    print("Dry-run: ARCHES=%s DIST=%s %s" %
 
150
                          (env['ARCHES'], env['DIST'], " ".join(cmd)))
141
151
        else:
142
152
            processes.append(subprocess.Popen(cmd, env=env))
143
153
        if not options.quiet: