Changeset 1192 in ProjectBuilder for devel/pb/lib/ProjectBuilder/Changelog.pm
- Timestamp:
- Feb 16, 2011, 12:17:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/lib/ProjectBuilder/Changelog.pm
r1156 r1192 61 61 62 62 my $pb = shift; 63 my $dtype = $pb->{'dtype'}; 63 64 my $dtype = $pb->{'pbos'}->{'type'}; 64 65 my $pbrealpkg = $pb->{'realpkg'}; 65 66 my $pbver = $pb->{'ver'}; 66 67 my $pbtag = $pb->{'tag'}; 67 my $pbsuf = $pb->{' suf'};68 my $pbsuf = $pb->{'pbos'}->{'suffix'}; 68 69 my $OUTPUT = shift; 69 70 my $doit = shift; … … 72 73 my $log = ""; 73 74 75 pb_log(2,"Entering pb_changelog - pb: ".Dumper($pb)."\n"); 76 pb_log(2,"Entering pb_changelog - doit: $doit\n") if (defined $doit); 77 pb_log(2,"Entering pb_changelog - OUTPUT: $OUTPUT\n") if (defined $OUTPUT); 74 78 # For date handling 75 79 $ENV{LANG}="C"; … … 82 86 (not (defined $OUTPUT)) || ($OUTPUT eq "") || 83 87 (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"); 90 89 print $OUTPUT "\n"; 91 90 return; … … 106 105 # If we don't need to do it, or don't have it fake something 107 106 if (((not defined $chglog) || (! -f $chglog)) && ($doit ne "yes")) { 107 pb_log(2,"No ChangeLog file for $pbrealpkg - faking one\n"); 108 108 $date = strftime("%Y-%m-%d", @date); 109 109 $ndate = &UnixDate($date,"%a", "%b", "%d", "%Y"); 110 110 $n2date = &UnixDate($date,"%a, %d %b %Y %H:%M:%S %z"); 111 if ( ($dtype eq "rpm") || ($dtype eq "fc")) {111 if ($dtype eq "rpm") { 112 112 $ver2 = "$pbver-$pbtag"; 113 113 print $OUTPUT "* $ndate $pbpackager->{$ENV{'PBPROJ'}} $ver2\n"; 114 114 print $OUTPUT "- Updated to $pbver\n"; 115 } 116 if ($dtype eq "deb") { 115 } elsif ($dtype eq "deb") { 117 116 if ($pbver !~ /^[0-9]/) { 118 117 # dpkg-deb doesn't accept non digit versions. … … 123 122 print $OUTPUT " * Updated to $pbver\n"; 124 123 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 } 126 127 return; 127 128 } … … 208 209 } 209 210 close(INPUT); 211 pb_log(2,"Exiting pb_changelog\n"); 210 212 } 211 213
Note:
See TracChangeset
for help on using the changeset viewer.