Changeset 622 for devel/pb/bin/pb


Ignore:
Timestamp:
Nov 30, 2008, 12:32:47 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • pb now uses pb_distro_installdeps in VM/VE setup
  • pb_get_distro => pb_distro_get for homogeneity
  • before installing packages, call the update of the pkg db before (may create issues, but is generally better)
  • Adds pb_distro_only_deps_needed to compute the packages in a list whose installation is really needed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r621 r622  
    19441944    pb_system("yum clean all","Cleaning yum env");
    19451945    if ($dver == 4) {
    1946         pb_system("$pbupd rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker",$cmtall);
     1946        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker"));
    19471947        pb_system("$insmb","$cmtmb");
    19481948        pb_system("$insfm","$cmtfm");
     
    19511951        pb_system("$inslg","$cmtlg");
    19521952    } else {
    1953         pb_system("$pbupd rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker perl-File-MimeInfo perl-Mail-Sendmail",$cmtall);
     1953        my $addp = "";
    19541954        if ($dver > 9) {
    1955             pb_system("$pbupd perl-gettext",$cmtall);
     1955            $addp = "perl-gettext";
    19561956        } else {
    19571957            pb_system("$inslg","$cmtlg");
    19581958        }
     1959        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"rpm-build wget patch ntp sudo perl-DateManip perl-ExtUtils-MakeMaker perl-File-MimeInfo perl-Mail-Sendmail $addp"));
    19591960    }
    19601961} elsif (( $dfam eq "rh" ) || ($ddir eq "sles") || (($ddir eq "suse") && (($dver eq "10.1") || ($dver eq "10.0"))) || ($ddir eq "slackware")) {
     
    19731974    pb_system("$insfb","$cmtfb");
    19741975    pb_system("$insms","$cmtms");
    1975     pb_system("export TERM=linux ; liste=\"\" ; for i in make wget patch sudo perl-DateManip perl-File-HomeDir perl-Mail-Sendmail ntp; do rpm -q \$i 1> /dev/null 2> /dev/null ; if [ \$\? != 0 ]; then liste=\"\$liste \$i\"; fi; done; echo \"Liste: \$liste\" ; if [ \"\$liste\" != \"\" ]; then $pbupd \$liste ; fi","$cmtall");
     1976    pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"make wget patch sudo perl-DateManip perl-File-HomeDir perl-Mail-Sendmail ntp"));
    19761977} elsif ( $dfam eq "md" ) {
    1977         pb_system("urpmi.update -a ; $pbupd rpm-build wget sudo patch ntp-client perl-File-MimeInfo perl-Mail-Sendmail perl-Locale-gettext","$cmtall");
     1978        my $addp = "";
    19781979        if (($ddir eq "mandrake") && ($dver eq "10.1")) {
    19791980            pb_system("$insdm","$cmtdm");
    19801981            pb_system("$inslg","$cmtlg");
    19811982        } else {
    1982             pb_system("$pbupd perl-DateManip","$cmtdm");
    1983             pb_system("$pbupd perl-Locale-gettext","$cmtdm");
    1984         }
     1983            $addp ="perl-DateManip perl-Locale-gettext";
     1984        }
     1985        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"rpm-build wget sudo patch ntp-client perl-File-MimeInfo perl-Mail-Sendmail perl-Locale-gettext $addp"));
    19851986} elsif ( $dfam eq "du" ) {
    19861987    if (( $dver eq "3.1" ) && ($ddir eq "debian")) {
    1987         #system "apt-get update";
    19881988        pb_system("$insfb","$cmtfb");
    19891989        pb_system("$insfm","$cmtfm");
    1990         pb_system("apt-get -y install wget patch ssh sudo debian-builder dh-make fakeroot ntpdate libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl","$cmtall");
     1990        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"wget patch ssh sudo debian-builder dh-make fakeroot ntpdate libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl"));
    19911991    } else  {
    1992         pb_system("apt-get update; $pbupd wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl","$cmtall");
     1992        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl"));
    19931993    }
    19941994} elsif ( $dfam eq "gen" ) {
    19951995        #system "emerge -u system";
    1996         pb_system("$pbupd wget sudo ntp DateManip File-MimeInfo Mail-Sendmail Locale-gettext","$cmtall");
     1996        pb_distro_installdeps(undef,$dtype,$pbupd,pb_distro_only_deps_needed($dtype,"wget sudo ntp DateManip File-MimeInfo Mail-Sendmail Locale-gettext"));
    19971997} else {
    19981998    pb_log(0,"No pkg to install\n");
Note: See TracChangeset for help on using the changeset viewer.