Ignore:
Timestamp:
Nov 16, 2012, 9:06:13 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Exports function pb_vcs_add_if_not_in
  • replace most die by confess
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1653 r1678  
    266266if (not defined $lsbf) {
    267267    print STDERR "no lsb entry defined for osrelambfile\n";
    268     die "You modified upstream delivery and lost !\n";
     268    confess "You modified upstream delivery and lost !\n";
    269269}
    270270
     
    296296} else {
    297297    print STDERR "Unable to read $lsbf file\n";
    298     die "Please report to the maintainer bruno_at_project-builder.org\n";
     298    confess "Please report to the maintainer bruno_at_project-builder.org\n";
    299299}
    300300}
     
    328328
    329329# Protection
    330 die "Missing install command for $pbos->{name}-$pbos->{version}-$pbos->{arch}" unless (defined $pbos->{install} && $pbos->{install} =~ /\w/);
     330confess "Missing install command for $pbos->{name}-$pbos->{version}-$pbos->{arch}" unless (defined $pbos->{install} && $pbos->{install} =~ /\w/);
    331331pb_apply_conf_proxy($pbos);
    332332
     
    347347# Check that all deps have been installed correctly
    348348$deps = pb_distro_getdeps($f, $pbos);
    349 die "Some dependencies did not install ($deps)" if ((defined $deps) && ($deps =~ /\S/));
     349confess "Some dependencies did not install ($deps)" if ((defined $deps) && ($deps =~ /\S/));
    350350}
    351351
     
    387387my $oldsep = $/;
    388388$/ = $sep;
    389 open(DESC,"$f") || die "Unable to open $f";
     389open(DESC,"$f") || confess "Unable to open $f";
    390390while (<DESC>) {
    391391    pb_log(4,"read: $_\n");
     
    459459        my $res = pb_system("dpkg -L $p","Looking for $p","mayfail");
    460460        next if ($res eq 0);
    461         open(CMD,"dpkg -l $p |") or die "Unable to run dpkg -l $p: $!";
     461        open(CMD,"dpkg -l $p |") or confess "Unable to run dpkg -l $p: $!";
    462462        my $ok = 0;
    463463        while (<CMD>) {
     
    583583                $dirdest = "/etc/zypp/repos.d";
    584584            } else {
    585                 die "Unknown location for repository file for '$pbos->{install}' command";
     585                confess "Unknown location for repository file for '$pbos->{install}' command";
    586586            }
    587587            my $dest = "$dirdest/$bn";
    588588            return if (pb_distro_compare_repo($ENV{'PBTMP'}/$bn,$dest));
    589             die "Missing directory $dirdest ($reponame)" unless (-d $dirdest);
     589            confess "Missing directory $dirdest ($reponame)" unless (-d $dirdest);
    590590            pb_system("sudo mv $ENV{'PBTMP'}/$bn $dirdest/$bn","Adding $reponame repository") if (not -f "$dirdest/$bn");
    591591        } elsif ($bn =~ /\.addmedia/) {
Note: See TracChangeset for help on using the changeset viewer.