Changeset 1651 in ProjectBuilder for devel/pb-modules


Ignore:
Timestamp:
Oct 7, 2012, 6:07:09 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Avoid to emit msgs when sed -i doesn't work (as on RedHat 6.2)
  • Factorize the proxy usages in pb_apply_conf_proxy and make it public (was partly done only)
  • debug level is now passed to the vescrip improving debug capabilities in that script
  • /dev/null shouldn't be touched on RedHat 6.2 as recreating it doesn't seem to work
  • Allow usage of mayfailverbose in pb_system when both features are needed to help debuging
  • Imrpove again RedHat 6.2 support up to setupve now (however needs a manual install of perl 5.6.2 to work as the minimum version for pb)
Location:
devel/pb-modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.conf

    r1645 r1651  
    296296# On RedHat 6.2 we do not give any package here to avoid problems to add them as there is no repo nor yum mecanism
    297297osmindep redhat =
    298 osmindep redhat-6.2 =
     298osmindep redhat-6.2 = ftp://ftp.pbone.net/mirror/archive.download.redhat.com/pub/redhat/linux/6.2/en/powertools/i386/i386/sudo-1.6.1-1.i386.rpm
    299299osmindep default = perl,sudo,wget,tar,make,gzip
    300300
    301301# These deps are needed for rpmbootstrap to install a base distribution
    302302# Originally reuse from rinse conf files
    303 rbsmindep redhat-6.2 = MAKEDEV,SysVinit,authconfig,basesystem,bash,binutils,bzip2,chkconfig,console-tools,cracklib,cracklib-dicts,dev,dev86,diffutils,dhcpcd,e2fsprogs,file,filesystem,fileutils,findutils,gawk,gdbm,glib,glibc,gmp,grep,gzip,info,initscripts,iproute,iputils,kernel,krb5-configs,krb5-libs,ldconfig,ld.so,libc,libelf,libstdc++,libtermcap,logrotate,make,mingetty,mktemp,modutils,mount,newt,ncurses,net-tools,pam,passwd,perl,popt,procps,psmisc,pwdb,python,readline,rpm,rpm-python,sed,setup,shadow-utils,sh-utils,slang,sysklogd,tar,tcsh,termcap,textutils,util-linux,vim-common,vim-minimal,vixie-cron,which,wget,zlib
     303rbsmindep redhat-6.2 = MAKEDEV,SysVinit,authconfig,basesystem,bash,binutils,bzip2,chkconfig,console-tools,cracklib,cracklib-dicts,dev,dev86,diffutils,dhcpcd,e2fsprogs,file,filesystem,fileutils,findutils,gawk,gdbm,glib,glibc,gmp,grep,gzip,info,initscripts,iproute,iputils,kernel,krb5-configs,krb5-libs,ldconfig,ld.so,libc,libelf,libstdc++,libtermcap,logrotate,make,mingetty,mktemp,modutils,mount,newt,ncurses,net-tools,pam,passwd,patch,perl,popt,procps,psmisc,pwdb,python,readline,redhat-release,rpm,rpm-python,sed,setup,shadow-utils,sh-utils,slang,sysklogd,tar,tcsh,termcap,textutils,util-linux,vim-common,vim-minimal,vixie-cron,which,wget,xntp3,zlib
    304304#
    305305rbsmindep fedora-4 = MAKEDEV,SysVinit,audit-libs,basesystem,bash,beecrypt,bzip2-libs,chkconfig,coreutils,cracklib,cracklib-dicts,db4,device-mapper,e2fsprogs,elfutils-libelf,ethtool,expat,filesystem,findutils,gawk,gdbm,glib2,glibc,glibc-common,grep,info,initscripts,iproute,iputils,krb5-libs,libacl,libattr,libcap,libgcc,libidn,libselinux,libsepol,libstdc++,libtermcap,libxml2,libxml2-python,mingetty,mktemp,module-init-tools,ncurses,neon,net-tools,openssl,pam,pcre,popt,procps,psmisc,python,python-elementtree,python-sqlite,python-urlgrabber,readline,rpm,rpm-libs,rpm-python,sed,setup,shadow-utils,sqlite,sysklogd,termcap,tzdata,udev,util-linux,yum,zlib
     
    533533# Old RedHat - Module-Build first for processing as needed by others
    534534osperldep redhat = Module-Build,Date-Manip,File-MimeInfo,File-BaseDir
    535 ospkgdep redhat = wget,make,ntp,patch,diffutils
     535ospkgdep redhat =
    536536# Old SuSE - Module-Build first for processing as needed by others
    537537osperldep suse = Module-Build,Date-Manip,File-MimeInfo,File-BaseDir
     
    652652ospkg default = project-builder
    653653# Where is the associated repo
     654osrepo redhat-6.2 =
    654655osrepo rpm = ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/$pbos->{'arch'}/pb.repo
    655656osrepo deb = ftp://ftp.project-builder.org/$pbos->{'name'}/$pbos->{'version'}/pb.sources.list
     
    673674ossha rpm = sha256
    674675# RHEL before 6 had python 2.4
     676ossha redhat-6.2 = sha
    675677ossha rhel-2.1 = sha
    676678ossha rhel-3 = sha
  • devel/pb-modules/lib/ProjectBuilder/Base.pm

    r1647 r1651  
    135135The first parameter is the shell command to call. This command should NOT use redirections.
    136136The 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.
     137The 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
    138138This function returns as a result the return value of the system command.
    139139
     
    160160my $res = $?;
    161161# Exit now if the command may fail
    162 if ((defined $verbose) and ($verbose eq "mayfail")) {
     162if ((defined $verbose) and ($verbose =~ /mayfail/)) {
    163163    pb_log(0,"NOT OK but non blocking\n") if ($res != 0);
    164164    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/));
    165166    return($res)
    166167}
     
    178179        confess("ERROR running command ($cmd) with cwd=$cwd, pid=$$");
    179180    } 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");
    181182    }
    182183} else {
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r1597 r1651  
    3333 
    3434our @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);
     35our @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);
    3636($VERSION,$REVISION) = pb_version_init();
    3737
     
    306306
    307307# 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 ""));
    310310}
    311311
Note: See TracChangeset for help on using the changeset viewer.