~ubuntu-branches/ubuntu/karmic/sbuild/karmic-proposed

« back to all changes in this revision

Viewing changes to bin/sbuild

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-02-18 16:31:54 UTC
  • Revision ID: james.westby@ubuntu.com-20090218163154-4bzfypsb5i3pn7lz
Tags: 0.57.7-1ubuntu2
bin/sbuild, lib/Sbuild.pm, lib/Sbuild/Conf.pm: add --setup-cmd
to allow pre-build modifications to underlying chroots (needed
to adjust pockets and components in sources.list).  (debian bug
500746).

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
            goto cleanup_close;
185
185
        }
186
186
 
 
187
        # Setup command
 
188
        if ($conf::setup_cmd) {
 
189
            my $cmd = $session->get_command("$conf::setup_cmd *.dsc ".$options->get('Distribution'), "root", 1);
 
190
            if (!open(PIPE, $cmd." 2>&1 |")) {
 
191
                print PLOG "Can't open pipe to setup-cmd ($cmd): $!\n";
 
192
                return 0;
 
193
            }
 
194
            while(<PIPE>) {
 
195
                print PLOG $_;
 
196
            }
 
197
            close(PIPE);
 
198
            if ($?) {
 
199
                print PLOG "setup-cmd ($cmd) failed\n" ;
 
200
                $build->{'Pkg Status'} = "skipped";
 
201
                goto cleanup_packages;
 
202
            }
 
203
        }
 
204
 
187
205
        $build->{'Pkg Fail Stage'} = "install-deps";
188
206
        if (!$build->install_deps()) {
189
207
            print PLOG "Source-dependencies not satisfied; skipping " .