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


Ignore:
Timestamp:
Feb 19, 2010, 4:17:46 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Adds function pb_check_requirements and use it in pb
  • Adds some conf params for rpmbootstrap in conf file
  • pb_distro_get_param now can expand some variables before returning a value
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r971 r974  
    341341
    342342my ($projectbuilderver,$projectbuilderrev) = pb_version_init();
     343my $appname = "pb";
    343344
    344345# Initialize the syntax string
    345346
    346 pb_syntax_init("pb (aka project-builder.org) Version $projectbuilderver-$projectbuilderrev\n");
     347pb_syntax_init("$appname (aka project-builder.org) Version $projectbuilderver-$projectbuilderrev\n");
    347348
    348349GetOptions("help|?|h" => \$opts{'h'},
     
    417418$action = shift @ARGV;
    418419die pb_syntax(-1,1) if (not defined $action);
     420
     421#
     422# Check for command requirements
     423#
     424my ($req,$opt) = pb_conf_get_if("oscmd","oscmdopt");
     425pb_check_requirements($req->{$appname},$opt->{$appname});
    419426
    420427my ($filteredfiles, $supfiles, $defpkgdir, $extpkgdir);
     
    17901797
    17911798                        pb_system("sudo /usr/sbin/rinse --directory \"$vepath->{$ENV{'PBPROJ'}}/$ddir/$dver/$darch\" --arch \"$darch\" --distribution \"$ddir-$dver\" --config \"$veconf->{$ENV{'PBPROJ'}}\" $b4post $post $addpkgs $rinseverb","Creating the rinse VE for $ddir-$dver ($darch)", "verbose");
     1799                    } elsif ($verpmstyle eq "rpmbootstrap") {
     1800                        my $rbsverb = "";
     1801                        $rbsverb = "--verbose" if ($pbdebug gt 0);
     1802                        pb_system("sudo /usr/bin/rpmbootstrap $ddir-$dver-$darch $rbsverb","Creating the rpmboostrap VE for $ddir-$dver ($darch)", "verbose");
    17921803                    } elsif ($verpmstyle eq "mock") {
    17931804                        pb_system("sudo /usr/sbin/mock --init --resultdir=\"/tmp\" --configdir=\"$veconf->{$ENV{'PBPROJ'}}\" -r $v","Creating the mock VE for $ddir-$dver ($darch)");
     
    26842695
    26852696    # Allow for modification
    2686     pb_system("vi $ENV{'PBTMP'}/announce.html","Allowing modification of the announce","noredir");
     2697    my $editor = "vi";
     2698    $editor = $ENV{'EDITOR'} if (defined $ENV{'EDITOR'});
     2699    pb_system("$editor $ENV{'PBTMP'}/announce.html","Allowing modification of the announce","noredir");
    26872700
    26882701    # Store it in DB for external usage (Web pages generation)
Note: See TracChangeset for help on using the changeset viewer.