Changeset 1132 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Dec 23, 2010, 2:01:37 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Adds params to pb_distro_setuprepo to support generic family/os templates
  • Fix pbinstalltype issue (setupve was broken) by useing a dsitro based hash
  • Use new pb.conf variable (ospkg and osrepo for pkg install)
  • Adds function pb_distro_setuposrepo to setup pb install repo
  • Adds a private pb_distro_setuprepo_gen function for code share between pb_distro_setuposrepo and pb_distro_setuprepo
  • Move the relative conf parameters from pb.pb to pb.conf
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r1130 r1132  
    10261026
    10271027    # Additional potential repo
    1028     pb_distro_setuprepo($ddir,$dver,$arch,$dtype);
     1028    pb_distro_setuprepo($ddir,$dver,$arch,$dtype,$dfam,$dos);
    10291029    foreach my $pbpkg (@pkgs) {
    10301030        # We need to install the package to test, and deps brought with it
     
    10871087
    10881088            # If needed we may add repository to the build env
    1089             pb_distro_setuprepo($ddir,$dver,$arch,$dtype);
     1089            pb_distro_setuprepo($ddir,$dver,$arch,$dtype,$dfam,$dos);
    10901090            foreach my $f (@specfile) {
    10911091                if ($f =~ /\.spec$/) {
     
    11151115            chmod 0755,"debian/rules";
    11161116
    1117             pb_distro_setuprepo($ddir,$dver,$arch,$dtype);
     1117            pb_distro_setuprepo($ddir,$dver,$arch,$dtype,$dfam,$dos);
    11181118            pb_distro_installdeps("debian/control",$dtype,$pbins);
    11191119            pb_system("dpkg-buildpackage -us -uc -rfakeroot","Building package","verbose");
     
    27042704
    27052705EOF
    2706     my $itype = pb_conf_get("pbinstalltype");
    2707     if ($itype->{$ENV{'PBPROJ'}} =~ /^file/) {
     2706    my ($instype) = pb_conf_get("pbinstalltype");
     2707    my $itype = pb_distro_get_param($ddir,$dver,$darch,$instype,$dfam,$dtype,$dos);
     2708    if ($itype =~ /^file/) {
    27082709        print SCRIPT << 'EOF';
    27092710# Then install manually the missing perl modules
     
    27212722pb_system("rm -rf ProjectBuilder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/ProjectBuilder-latest.tar.gz ; gzip -cd ProjectBuilder-latest.tar.gz | tar xf - ; cd ProjectBuilder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf ProjectBuilder-* ; rm -rf project-builder-* ; wget --passive-ftp ftp://ftp.mondorescue.org/src/project-builder-latest.tar.gz ; gzip -cd project-builder-latest.tar.gz | tar xf - ; cd project-builder-* ; perl Makefile.PL ; make ; make install ; cd .. ; rm -rf project-builder-* ;","Building Project-Builder");
    27222723EOF
    2723     } elsif ($itype->{$ENV{'PBPROJ'}} =~ /^pkg/) {
     2724    } elsif ($itype =~ /^pkg/) {
    27242725        # pkg based install. We need to point to the project-builder.org repository
    27252726        print SCRIPT << 'EOF';
    2726 my ($pbpkg) = pb_conf_get_if("pbpkg");
    2727 
    2728 my $pkgforpb = pb_distro_get_param($ddir,$dver,$darch,$pbpkg,$dfam,$dtype,$depdos);
    2729 pb_distro_setuprepo($ddir,$dver,$darch,$dtype);
     2727my ($ospkg) = pb_conf_get_if("ospkg");
     2728
     2729my $pkgforpb = pb_distro_get_param($ddir,$dver,$darch,$ospkg,$dfam,$dtype,$dos);
     2730pb_distro_setuposrepo($ddir,$dver,$darch,$dtype,$dfam,$dos);
    27302731pb_distro_installdeps(undef,$dtype,$pbins,pb_distro_only_deps_needed($dtype,join(' ',split(/,/,$pkgforpb))));
    27312732EOF
Note: See TracChangeset for help on using the changeset viewer.