Changeset 540


Ignore:
Timestamp:
09/15/08 13:11:19 (5 years ago)
Author:
bruno
Message:

Fix #32 for RPMS based packages

Location:
devel/pb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r539 r540  
    541541        $pb{'rev'} = $pbrev; 
    542542        $pb{'ver'} = $pbver; 
     543        $pb{'pkg'} = $pbpkg; 
    543544        $pb{'date'} = $pbdate; 
    544545        $pb{'defpkgdir'} = $defpkgdir; 
     
    560561 
    561562            # We need to compute the real name of the package 
    562             my $pbpkgreal = pb_cms_get_real_pkg($pbpkg,$pb{'dtype'}); 
    563             $pb{'pkg'} = $pbpkgreal; 
     563            my $pbrealpkg = pb_cms_get_real_pkg($pbpkg,$pb{'dtype'}); 
     564            $pb{'realpkg'} = $pbrealpkg; 
    564565 
    565566            # Filter build files from the less precise up to the most with overloading 
     
    783784                } 
    784785            } 
    785             $made="$made RPMS/*/$pbpkg-$pbver-$pbtag$pbsuf.*.rpm SRPMS/$pbpkg-$pbver-$pbtag$pbsuf.src.rpm"; 
     786            # Get the name of the generated packages 
     787            open(LOG,"$ENV{'PBTMP'}/system.log") || die "Unable to open $ENV{'PBTMP'}/system.log"; 
     788            while (<LOG>) { 
     789                chomp(); 
     790                next if ($_ !~ /^Wrote:/); 
     791                s|.*/([S]*RPMS.*)|$1|; 
     792                $made="$made $_"; 
     793            } 
     794 
    786795            if (-f "/usr/bin/rpmlint") { 
    787796                pb_system("rpmlint $made","Checking validity of rpms with rpmlint","verbose"); 
  • devel/pb/lib/ProjectBuilder/Env.pm

    r539 r540  
    484484# PBSRC is replaced by the source package location after the repo 
    485485#filter PBSRC = src/%{name}-%{version}.tar.gz 
     486# Used if virtual name != real name (perl, ...) 
     487#filter PBSRC = src/%{srcname}-%{version}.tar.gz 
    486488 
    487489# PBVER is replaced by the version (\$pb->{'ver'} in code) 
     
    505507# PBREV is replaced by the revision (\$pb->{'rev'} in code) 
    506508filter PBREV = \$pb->{'rev'} 
     509 
     510# PBREALPKG is replaced by the package name (\$pb->{'realpkg'} in code) 
     511filter PBREALPKG = \$pb->{'realpkg'} 
    507512 
    508513# PBPKG is replaced by the package name (\$pb->{'pkg'} in code) 
     
    842847# $Id$ 
    843848# 
     849# Used if virtual name != real name (perl, ...) 
     850#%define srcname    PBPKG 
    844851 
    845852Summary:        bla-bla 
    846853Summary(fr):    french bla-bla 
    847854 
    848 Name:           PBPKG 
     855Name:           PBREALPKG 
    849856Version:        PBVER 
    850857Release:        PBTAGPBSUF 
     
    865872%prep 
    866873%setup -q 
     874# Used if virtual name != real name (perl, ...) 
     875#%setup -q -n %{srcname}-%{version} 
    867876#PBPATCHCMD 
    868877 
Note: See TracChangeset for help on using the changeset viewer.