~ubuntu-branches/ubuntu/natty/sbuild/natty-updates

« back to all changes in this revision

Viewing changes to lib/Sbuild/Conf.pm

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-05-14 23:13:17 UTC
  • mfrom: (8.1.12 upstream) (3.3.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100514231317-hw1e0x09tefx3ocm
Tags: 0.60.0-1ubuntu1
* Merge from Debian unstable (LP: #580724), remaining changes:
  - Do not install debfoster into the chroots because it is in universe
    and not needed for package building itself.
* buildd: Declare Replaces and Breaks on ubuntu-dev-tools (<= 0.83) as
  both packages contain /usr/bin/buildd. (LP: #558461)

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
            # See <http://bugs.debian.org/475777> for details
83
83
            die "The --append-to-version option is incompatible with a source upload\n";
84
84
        }
 
85
 
 
86
        if ($self->get('BUILD_SOURCE') &&
 
87
            $self->get('BIN_NMU')) {
 
88
            print STDERR "Not building source package for binNMU\n";
 
89
            $self->_set_value('BUILD_SOURCE', 0);
 
90
        }
85
91
    };
86
92
 
87
93
    our $HOME = $self->get('HOME');
224
230
            },
225
231
            DEFAULT => ""
226
232
        },
 
233
        'MAILTO_FORCED_BY_CLI'                  => {
 
234
            DEFAULT => 0
 
235
        },
227
236
        'MAILTO_HASH'                           => {
228
237
            DEFAULT => {}
229
238
        },
258
267
        },
259
268
        'TOOLCHAIN_REGEX'                       => {
260
269
            DEFAULT => ['binutils$',
 
270
                        'dpkg-dev$',
261
271
                        'gcc-[\d.]+$',
262
272
                        'g\+\+-[\d.]+$',
263
273
                        'libstdc\+\+',
303
313
        'APT_POLICY'                            => {
304
314
            DEFAULT => 1
305
315
        },
 
316
        'CHECK_SPACE'                           => {
 
317
            DEFAULT => 1
 
318
        },
306
319
        'CHECK_WATCHES'                         => {
307
320
            DEFAULT => 1
308
321
        },
346
359
        'SIGNING_OPTIONS'                       => {
347
360
            DEFAULT => ""
348
361
        },
 
362
        'APT_CLEAN'                             => {
 
363
            DEFAULT => 0
 
364
        },
349
365
        'APT_UPDATE'                            => {
350
366
            DEFAULT => 0
351
367
        },
 
368
        'APT_UPGRADE'                           => {
 
369
            DEFAULT => 0
 
370
        },
 
371
        'APT_DISTUPGRADE'                       => {
 
372
            DEFAULT => 0
 
373
        },
352
374
        'APT_ALLOW_UNAUTHENTICATED'             => {
353
375
            DEFAULT => 0
354
376
        },
424
446
            DEFAULT => undef
425
447
        },
426
448
        'BIN_NMU'                               => {
427
 
            DEFAULT => undef
 
449
            DEFAULT => undef,
 
450
            CHECK => $validate_append_version
428
451
        },
429
452
        'BIN_NMU_VERSION'                       => {
430
453
            DEFAULT => undef
438
461
        },
439
462
        'JOB_FILE'                              => {
440
463
            DEFAULT => 'build-progress'
441
 
        }
 
464
        },
 
465
        'BUILD_DEP_RESOLVER'                    => {
 
466
            DEFAULT => 'internal',
 
467
            CHECK => sub {
 
468
                my $self = shift;
 
469
                my $entry = shift;
 
470
                my $key = $entry->{'NAME'};
 
471
 
 
472
                die '$key: Invalid build-dependency resolver \'' .
 
473
                    $self->get($key) .
 
474
                    "'\nValid algorthms are 'internal' and 'aptitude'\n"
 
475
                    if !isin($self->get($key),
 
476
                             qw(internal aptitude));
 
477
            },
 
478
        },
442
479
    );
443
480
 
444
481
    $self->set_allowed_keys(\%sbuild_keys);
489
526
    my $max_lock_trys = undef;
490
527
    my $lock_interval = undef;
491
528
    my $apt_policy = undef;
 
529
    my $check_space = undef;
492
530
    my $check_watches = undef;
493
531
    my @ignore_watches_no_build_deps;
494
532
    undef @ignore_watches_no_build_deps;
498
536
    my $chroot_split = undef;
499
537
    my $sbuild_mode = undef;
500
538
    my $debug = undef;
 
539
    my $build_source = undef;
501
540
    my $force_orig_source = undef;
502
541
    my $chroot_setup_script = undef;
503
542
    my %individual_stalled_pkg_timeout;
507
546
    my $maintainer_name = undef;
508
547
    my $uploader_name = undef;
509
548
    my $key_id = undef;
 
549
    my $apt_clean = undef;
510
550
    my $apt_update = undef;
 
551
    my $apt_upgrade = undef;
 
552
    my $apt_distupgrade = undef;
511
553
    my $apt_allow_unauthenticated = undef;
512
554
    my %alternatives;
513
555
    undef %alternatives;
518
560
    my $build_arch_all = undef;
519
561
    my $arch = undef;
520
562
    my $job_file = undef;
 
563
    my $build_dir = undef;
 
564
    my $build_dep_resolver = undef;
521
565
 
522
566
    foreach ($Sbuild::Sysconfig::paths{'SBUILD_CONF'}, "$HOME/.sbuildrc") {
523
567
        if (-r $_) {
569
613
    $self->set('LOCK_INTERVAL', $lock_interval);
570
614
    $self->set('APT_POLICY', $apt_policy);
571
615
    $self->set('CHECK_WATCHES', $check_watches);
 
616
    $self->set('CHECK_SPACE', $check_space);
572
617
    $self->set('IGNORE_WATCHES_NO_BUILD_DEPS',
573
618
               \@ignore_watches_no_build_deps)
574
619
        if (@ignore_watches_no_build_deps);
578
623
    $self->set('CHROOT_SPLIT', $chroot_split);
579
624
    $self->set('SBUILD_MODE', $sbuild_mode);
580
625
    $self->set('FORCE_ORIG_SOURCE', $force_orig_source);
 
626
    $self->set('BUILD_SOURCE', $build_source);
581
627
    $self->set('CHROOT_SETUP_SCRIPT', $chroot_setup_script);
582
628
    $self->set('INDIVIDUAL_STALLED_PKG_TIMEOUT',
583
629
               \%individual_stalled_pkg_timeout)
587
633
    $self->set('MAINTAINER_NAME', $maintainer_name);
588
634
    $self->set('UPLOADER_NAME', $uploader_name);
589
635
    $self->set('KEY_ID', $key_id);
 
636
    $self->set('APT_CLEAN', $apt_clean);
590
637
    $self->set('APT_UPDATE', $apt_update);
 
638
    $self->set('APT_UPGRADE', $apt_upgrade);
 
639
    $self->set('APT_DISTUPGRADE', $apt_distupgrade);
591
640
    $self->set('APT_ALLOW_UNAUTHENTICATED', $apt_allow_unauthenticated);
592
641
    $self->set('ALTERNATIVES', \%alternatives)
593
642
        if (%alternatives);
596
645
 
597
646
    $self->set('MAILTO',
598
647
               $self->get('MAILTO_HASH')->{$self->get('DISTRIBUTION')})
599
 
        if $self->get('MAILTO_HASH')->{$self->get('DISTRIBUTION')};
 
648
        if defined($self->get('DISTRIBUTION')) &&
 
649
           $self->get('DISTRIBUTION') &&
 
650
           $self->get('MAILTO_HASH')->{$self->get('DISTRIBUTION')};
600
651
 
601
652
    $self->set('SIGNING_OPTIONS',
602
653
               "-m".$self->get('MAINTAINER_NAME')."")
609
660
        if defined $self->get('KEY_ID');
610
661
    $self->set('MAINTAINER_NAME', $self->get('UPLOADER_NAME')) if defined $self->get('UPLOADER_NAME');
611
662
    $self->set('MAINTAINER_NAME', $self->get('KEY_ID')) if defined $self->get('KEY_ID');
 
663
    $self->set('BUILD_DIR', $build_dir);
 
664
    $self->set('BUILD_DEP_RESOLVER', $build_dep_resolver);
612
665
 
613
666
    if (!defined($self->get('MAINTAINER_NAME')) &&
614
667
        $self->get('BIN_NMU')) {