Changeset 1192 in ProjectBuilder for devel/pb/lib/ProjectBuilder/Changelog.pm


Ignore:
Timestamp:
Feb 16, 2011, 12:17:55 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Fix pb_get_filters to also support filter based on os name and os-ver-arch as well to be coherent, and also fix bugs in the tests made for filter exitence.
  • Fix pb_changelog with test for correct pb hash values which were changed previously
  • Revert back using no arch subdir for deb based repo
  • Introduce new parameter oscmdpath to support external commands full path name easier (could also be very useful for MondoRescue)
  • Another set of fixes for sudo comands support: no parameter taken in account, replace localhost by ALL to avoid nightmares with VMs naming
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/Changelog.pm

    r1156 r1192  
    6161
    6262my $pb = shift;
    63 my $dtype = $pb->{'dtype'};
     63
     64my $dtype = $pb->{'pbos'}->{'type'};
    6465my $pbrealpkg = $pb->{'realpkg'};
    6566my $pbver = $pb->{'ver'};
    6667my $pbtag = $pb->{'tag'};
    67 my $pbsuf = $pb->{'suf'};
     68my $pbsuf = $pb->{'pbos'}->{'suffix'};
    6869my $OUTPUT = shift;
    6970my $doit = shift;
     
    7273my $log = "";
    7374
     75pb_log(2,"Entering pb_changelog - pb: ".Dumper($pb)."\n");
     76pb_log(2,"Entering pb_changelog - doit: $doit\n") if (defined $doit);
     77pb_log(2,"Entering pb_changelog - OUTPUT: $OUTPUT\n") if (defined $OUTPUT);
    7478# For date handling
    7579$ENV{LANG}="C";
     
    8286        (not (defined $OUTPUT)) || ($OUTPUT eq "") ||
    8387        (not (defined $doit)) || ($doit eq "")) {
    84     print $OUTPUT "\n";
    85     return;
    86 }
    87 
    88 if (((not defined $chglog) || (! -f $chglog)) && ($doit eq "yes")) {
    89     #pb_log(2,"No ChangeLog file ($chglog) for $pbrealpkg\n";
     88    pb_log(2,"Not enough input params\n");
    9089    print $OUTPUT "\n";
    9190    return;
     
    106105# If we don't need to do it, or don't have it fake something
    107106if (((not defined $chglog) || (! -f $chglog)) && ($doit ne "yes")) {
     107    pb_log(2,"No ChangeLog file for $pbrealpkg - faking one\n");
    108108    $date = strftime("%Y-%m-%d", @date);
    109109    $ndate = &UnixDate($date,"%a", "%b", "%d", "%Y");
    110110    $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
    111     if (($dtype eq "rpm") || ($dtype eq "fc")) {
     111    if ($dtype eq "rpm") {
    112112        $ver2 = "$pbver-$pbtag";
    113113        print $OUTPUT "* $ndate $pbpackager->{$ENV{'PBPROJ'}} $ver2\n";
    114114        print $OUTPUT "- Updated to $pbver\n";
    115         }
    116     if ($dtype eq "deb") {
     115    } elsif ($dtype eq "deb") {
    117116        if ($pbver !~ /^[0-9]/) {
    118117            # dpkg-deb doesn't accept non digit versions.
     
    123122        print $OUTPUT "  * Updated to $pbver\n";
    124123        print $OUTPUT " -- $pbpackager->{$ENV{'PBPROJ'}}  $n2date\n\n\n";
    125         }
     124    } else {
     125        pb_log(0,"No ChangeLog file for $pbrealpkg and no way faking one for type $dtype\n");
     126    }
    126127    return;
    127128}
     
    208209}
    209210close(INPUT);
     211pb_log(2,"Exiting pb_changelog\n");
    210212}
    211213
Note: See TracChangeset for help on using the changeset viewer.