Changeset 2434


Ignore:
Timestamp:
Sep 6, 2019, 3:35:27 PM (6 weeks ago)
Author:
bruno
Message:

force explicit analysis of boolean and when using cluck

Location:
devel
Files:
5 edited

Legend:

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

    r2426 r2434  
    185185# Read the content of the config file and cache it in the %h hash then available for queries
    186186if ($PBCONFVER < 1) {
    187     open(CONF,$cf) || cluck "Unable to open $cf" && return($lh);
     187    open(CONF,$cf) || (cluck "Unable to open $cf" && return($lh));
    188188    # This is the original conf file format for versions up to 0.14
    189189    while(<CONF>) {
     
    337337confess "No configuration file defined to write into !" if (not defined $conffile);
    338338confess "No hash defined to read from !" if (not defined $h);
    339 open(CONF,"> $conffile") || cluck "Unable to write into $conffile" && return;
     339open(CONF,"> $conffile") || (cluck "Unable to write into $conffile" && return);
    340340
    341341if ($PBCONFVER < 1) {
     
    553553my $dest = shift;
    554554
    555 open(ORIG,$orig) || cluck "Unable to open $orig" && return;
     555open(ORIG,$orig) || (cluck "Unable to open $orig" && return);
    556556confess "Will not erase existing $dest while transforming $orig" if (-f $dest);
    557 open(DEST,"> $dest") || cluck "Unable to write into $dest" && close(ORIG) && return;
     557open(DEST,"> $dest") || (cluck "Unable to write into $dest" && close(ORIG) && return);
    558558print DEST "---\n";
    559559my $pbconfverbkp = $PBCONFVER;
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r2429 r2434  
    472472my $oldsep = $/;
    473473$/ = $sep;
    474 open(DESC,"$f") || cluck "Unable to open $f" && return("");
     474open(DESC,"$f") || (cluck "Unable to open $f" && return(""));
    475475while (<DESC>) {
    476476    pb_log(4,"read: $_\n");
     
    563563        my $res = pb_system("dpkg -L $p","Looking for $p","mayfail");
    564564        next if ($res eq 0);
    565         open(CMD,"dpkg -l $p |") || cluck "Unable to run dpkg -l $p: $!" && next;
     565        open(CMD,"dpkg -l $p |") || (cluck "Unable to run dpkg -l $p: $!" && next);
    566566        my $ok = 0;
    567567        while (<CMD>) {
     
    749749            if ($pbos->{install} =~ /\bzypper\b/) {
    750750                my $keyfile = undef;
    751                 open(REPO,"$dest") || cluck "Unable to open $dest" && next;
     751                open(REPO,"$dest") || (cluck "Unable to open $dest" && next);
    752752                while (<REPO>) {
    753753                    $keyfile = $_;
     
    767767            # URPMI repo
    768768            # We should test that it's not an already setup urpmi repo
    769             open(URPMI,"/etc/urpmi/urpmi.cfg") || cluck "Unable to open /etc/urpmi/urpmi.cfg" && next;
     769            open(URPMI,"/etc/urpmi/urpmi.cfg") || (cluck "Unable to open /etc/urpmi/urpmi.cfg" && next);
    770770            my $found = 0;
    771771            my $entry = $bn;
     
    786786            # Check whether GPG keys for this repo are already known and if
    787787            # not add them
    788             open(REPO,"$dest") || cluck "Unable to open $dest" && next;
     788            open(REPO,"$dest") || (cluck "Unable to open $dest" && next);
    789789            my $debrepo;
    790790            while (<REPO>) {
     
    807807            $keyserver = $pbgpgserver->{'default'} if (not defined $keyserver);
    808808            confess "Unable to find a GPG server in configuration, please define correctly pbgpgserver" if (not defined $keyserver);
    809             open(SIGN,"LANGUAGE=C LANG=C gpg --verify --keyid-format=long $ENV{'PBTMP'}/Release.gpg $ENV{'PBTMP'}/Release 2>&1 |") || cluck "Unable to verify GPG signature from Release.gpg\n" && next;
     809            open(SIGN,"LANGUAGE=C LANG=C gpg --verify --keyid-format=long $ENV{'PBTMP'}/Release.gpg $ENV{'PBTMP'}/Release 2>&1 |") || (cluck "Unable to verify GPG signature from Release.gpg\n" && next);
    810810            while(<SIGN>) {
    811811                chomp();
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r2403 r2434  
    869869    }
    870870}
    871 pb_log(1,"pb_vcs_compliant end\n");
     871pb_log(2,"pb_vcs_compliant end\n");
    872872}
    873873
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r2406 r2434  
    194194if ((defined $testver) && (defined $testver->{$ENV{'PBPROJ'}}) && ($testver->{$ENV{'PBPROJ'}} =~ /true/i)) {
    195195    if (! -f "$dest/ChangeLog") {
    196         open(CL,"> $dest/ChangeLog") || cluck "Unable to create $dest/ChangeLog" && return;
     196        open(CL,"> $dest/ChangeLog") || (cluck "Unable to create $dest/ChangeLog" && return);
    197197        # We need a minimal version for debian type of build
    198198        print CL "\n";
  • devel/pbmkbm/bin/pbmkbm

    r2362 r2434  
    457457
    458458my $busycmd = pb_distro_get_param($pbos,pb_conf_get("ospathcmd-busybox"));
    459 open(BUSY,"$busycmd |") || cluck "ERROR: Unable to execute $busycmd" && return;
     459open(BUSY,"$busycmd |") || (cluck "ERROR: Unable to execute $busycmd" && return);
    460460my $cmdlist = 0;
    461461while (<BUSY>) {
Note: See TracChangeset for help on using the changeset viewer.