Changeset 1651 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder
- Timestamp:
- Oct 7, 2012, 6:07:09 AM (12 years ago)
- Location:
- devel/pb-modules/lib/ProjectBuilder
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Base.pm
r1647 r1651 135 135 The first parameter is the shell command to call. This command should NOT use redirections. 136 136 The second parameter is the message to print on screen. If none is given, then the command is printed. 137 The third parameter prints the result of the command after correct execution if value is "verbose". If value is "noredir", it avoids redirecting outputs (e.g. for vi). If value is "quiet", doesn't print anything at all. If value is "mayfail", failure of the command is ok even if $Global::pb_stop_on_error is set, because the caller will be handling the error. 137 The third parameter prints the result of the command after correct execution if value is "verbose". If value is "noredir", it avoids redirecting outputs (e.g. for vi). If value is "quiet", doesn't print anything at all. If value is "mayfail", failure of the command is ok even if $Global::pb_stop_on_error is set, because the caller will be handling the error. A "verbose" can be added to mayfail to have it explain why it failed 138 138 This function returns as a result the return value of the system command. 139 139 … … 160 160 my $res = $?; 161 161 # Exit now if the command may fail 162 if ((defined $verbose) and ($verbose eq "mayfail")) {162 if ((defined $verbose) and ($verbose =~ /mayfail/)) { 163 163 pb_log(0,"NOT OK but non blocking\n") if ($res != 0); 164 164 pb_log(0,"OK\n") if ($res == 0); 165 pb_display_file("$ENV{'PBTMP'}/system.$$.log") if ((-f "$ENV{'PBTMP'}/system.$$.log") and (defined $verbose) and ($verbose =~ /verbose/)); 165 166 return($res) 166 167 } … … 178 179 confess("ERROR running command ($cmd) with cwd=$cwd, pid=$$"); 179 180 } else { 180 pb_log(0,"ERROR running command ($cmd) with cwd=$cwd, pid=$$ ");181 pb_log(0,"ERROR running command ($cmd) with cwd=$cwd, pid=$$\n"); 181 182 } 182 183 } else { -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1597 r1651 33 33 34 34 our @ISA = qw(Exporter); 35 our @EXPORT = qw(pb_distro_conffile pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_get_param pb_distro_get_context pb_distro_to_keylist );35 our @EXPORT = qw(pb_distro_conffile pb_distro_get pb_distro_getlsb pb_distro_installdeps pb_distro_getdeps pb_distro_only_deps_needed pb_distro_setuprepo pb_distro_setuposrepo pb_distro_get_param pb_distro_get_context pb_distro_to_keylist pb_apply_conf_proxy); 36 36 ($VERSION,$REVISION) = pb_version_init(); 37 37 … … 306 306 307 307 # We do not overwrite shell settings 308 $ENV{ftp_proxy} ||= $ftp_proxy ;309 $ENV{http_proxy} ||= $http_proxy ;308 $ENV{ftp_proxy} ||= $ftp_proxy if ((defined $ftp_proxy) && ($ftp_proxy ne "")); 309 $ENV{http_proxy} ||= $http_proxy if ((defined $http_proxy) && ($http_proxy ne "")); 310 310 } 311 311
Note:
See TracChangeset
for help on using the changeset viewer.