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


Ignore:
Timestamp:
Nov 29, 2009, 3:12:56 AM (14 years ago)
Author:
Bruno Cornec
Message:
  • Improves Debian support by a/ allowing PBDESC to be used in control file with space prepended. b/ prepend 0 to non digit versions such as devel. c/ creating debian pbfilter files for PBDEBSTD and PBDEBCOMP macros used in control.
  • Uses pbtag for ebuild and pkg packages
  • Improves pb Solaris pkgs
  • Improves pb Debian pkgs (only some warnings remaining for lintian)
  • Adds a PBSUMMARY macro and use it. Now also generated for newproj.
File:
1 edited

Legend:

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

    r642 r916  
    4848Function that generates the changelog used in build files, or for announcements (web, mailing-list, ...)
    4949
    50 It takes up to 9 parameters:
    51 The first parameter is the type of the distribution.
    52 The second parameter is the package name generated.
    53 The third parameter is the version of the package.
    54 The fourth parameter is the tag of the package.
    55 The fifth parameter is the suffix of the package.
    56 The sixth parameter is now unused.
    57 The seventh parameter is the file descriptor on which to write the changelog content.
    58 The eighth parameter is a flag in the configuration file indicating whether we want changelog expansion or not.
    59 The nineth parameter is the potential changelog file pbcl.
     50It takes 3 parameters:
     51The first parameter is the %pb hash containing packge info
     52The second parameter is the file descriptor on which to write the changelog content.
     53The third parameter is a flag in the configuration file indicating whether we want changelog expansion or not.
    6054
    6155=cut
     
    119113    if ($dtype eq "deb") {
    120114        if ($pbver !~ /^[0-9]/) {
    121             # dpkg-deb doesn't accept non digit versions. Prepending date
    122             my $ldate = strftime("%Y%m%d", @date);
    123             $pbver =~ s/^/$ldate/;
    124         }
    125         print $OUTPUT "$pbrealpkg ($pbver) unstable; urgency=low\n";
    126         print $OUTPUT "\n";
     115            # dpkg-deb doesn't accept non digit versions.
     116            # Prepending 0 in order to make updates easy hopefully
     117            $pbver =~ s/^/0/;
     118        }
     119        print $OUTPUT "$pbrealpkg ($pbver-$pbtag) unstable; urgency=low\n";
     120        print $OUTPUT "  * Updated to $pbver\n";
    127121        print $OUTPUT " -- $pbpackager->{$ENV{'PBPROJ'}}  $n2date\n\n\n";
    128122        }
     
    154148    chomp($date);
    155149    $date =~ s/\(([0-9-]+)\)/$1/;
    156     #pb_log(2,"**$date**\n";
     150    pb_log(3,"**Date:$date**\n");
    157151    $ndate = UnixDate($date,"%a", "%b", "%d", "%Y");
    158152    $n2date = UnixDate($date,"%a, %d %b %Y %H:%M:%S %z");
    159     #pb_log(2,"**$ndate**\n";
     153    pb_log(3,"**nDate:$ndate**\n");
     154
     155    pb_log(3,"**Ver:$ver**\n");
     156    if ($ver !~ /-/) {
     157        if ($first eq 1) {
     158            $ver2 = "$ver-$pbtag";
     159            $first = 0;
     160        } else {
     161            $ver2 = "$ver-1";
     162        }
     163    } else {
     164        $ver2 = $ver;
     165    }
     166    pb_log(3,"**Ver2:$ver2**\n");
    160167
    161168    if (($dtype eq "rpm") || ($dtype eq "fc")) {
    162         if ($ver !~ /-/) {
    163             if ($first eq 1) {
    164                 $ver2 = "$ver-$pbtag";
    165                 $first=0;
    166             } else {
    167                 $ver2 = "$ver-1";
    168             }
    169         } else {
    170             $ver2 = "$ver";
    171         }
    172169        print $OUTPUT "* $ndate $pbpackager->{$ENV{'PBPROJ'}} $ver2\n";
    173170        print $OUTPUT "- Updated to $ver\n";
    174171        }
    175172    if ($dtype eq "deb") {
    176         if ($ver !~ /^[0-9]/) {
    177             # dpkg-deb doesn't accept non digit versions. Prepending date
    178             my $ldate = strftime("%Y%m%d", @date);
    179             $ver =~ s/^/$ldate/;
    180         }
    181         print $OUTPUT "$pbrealpkg ($ver) unstable; urgency=low\n";
     173        if ($ver2 !~ /^[0-9]/) {
     174            # dpkg-deb doesn't accept non digit versions.
     175            # Prepending 0 in order to make updates easy hopefully
     176            $ver2 =~ s/^/0/;
     177        }
     178        print $OUTPUT "$pbrealpkg ($ver2) unstable; urgency=low\n";
    182179        print $OUTPUT "\n";
    183180        }
Note: See TracChangeset for help on using the changeset viewer.