Changeset 1524


Ignore:
Timestamp:
May 12, 2012, 2:26:43 AM (7 years ago)
Author:
bruno
Message:
  • Distribution.pm: check that package was installed failed because package name could be truncated if COLUMNS env var is set. Also log out missing dependencies at log level 1. Add missing newlines on some log messages. (Eric Anderson)
File:
1 edited

Legend:

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

    r1523 r1524  
    435435my $deps2 = "";
    436436# Avoid to install what is already there
     437delete $ENV{COLUMNS};
    437438foreach my $p (split(/\s+/,$deps)) {
    438439    next if $p =~ /^\s*$/o;
     
    440441        my $res = pb_system("rpm -q --whatprovides --quiet $p","","quiet", 1);
    441442        next if ($res eq 0);
     443        pb_log(1, "INFO: missing dependency $p\n");
    442444    } elsif ($pbos->{'type'} eq "deb") {
    443445        my $res = pb_system("dpkg -L $p","","quiet", 1);
     
    449451        }
    450452        next if $ok;
     453        pb_log(1, "INFO: missing dependency $p\n");
    451454    } elsif ($pbos->{'type'} eq "ebuild") {
    452455    } else {
     
    495498
    496499if (not -f $dest) {
    497     pb_log(1, "Creating new file $dest");
     500    pb_log(1, "INFO: Creating new file $dest\n");
    498501} elsif (-f $dest && -s $dest == 0) {
    499     pb_log(1, "Overwriting empty file $dest");
     502    pb_log(1, "INFO: Overwriting empty file $dest\n");
    500503} elsif (-f $dest && compare("$src", $dest) == 0) {
    501     pb_log(1, "Overwriting identical file $dest");
     504    pb_log(1, "INFO: Overwriting identical file $dest\n");
    502505} else {
    503506    pb_log(0, "ERROR: destination file $dest exists and is different than source $src\n");
    504     pb_system("cat $dest","Dest...");
    505     pb_system("cat $src","New...");
    506     pb_log("Returning...\n");
     507    pb_system("cat $dest","INFO: Dest...\n");
     508    pb_system("cat $src","INFO: New...\n");
     509    pb_log("INFO: Returning...\n");
    507510    return(0);
    508511}
Note: See TracChangeset for help on using the changeset viewer.