Changeset 539 for devel/pb/bin/pb


Ignore:
Timestamp:
Sep 15, 2008, 2:54:42 AM (11 years ago)
Author:
Bruno Cornec
Message:

First attempt to code support for real/virtual names for packages in order to support perl naming in both Debian and RPM distributions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r537 r539  
    483483        pb_log(0,"Management of $pbpkg $pbver-$pbtag (rev $pbrev)\n");
    484484        die "Unable to get env var PBDESTDIR" if (not defined $ENV{'PBDESTDIR'});
     485
    485486        # Clean up dest if necessary. The export will recreate it
    486487        my $dest = "$ENV{'PBDESTDIR'}/$pbpkg-$pbver";
     
    536537        }
    537538
    538         # Setup %pb structure to allow filtering later on on files using that structure
     539        # Setup %pb structure to allow filtering later on, on files using that structure
    539540        $pb{'tag'} = $pbtag;
    540541        $pb{'rev'} = $pbrev;
    541         $pb{'pkg'} = $pbpkg;
    542542        $pb{'ver'} = $pbver;
    543543        $pb{'date'} = $pbdate;
     
    558558            pb_log(2,"DEBUG: distro tuple: ".Dumper($ddir, $dver, $dfam, $pb{'dtype'}, $pb{'suf'})."\n");
    559559            pb_log(2,"DEBUG Filtering PBDATE => $pbdate, PBTAG => $pbtag, PBVER => $pbver\n");
     560
     561            # 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;
    560564
    561565            # Filter build files from the less precise up to the most with overloading
     
    703707    pb_log(2,"DEBUG pkgs: ".Dumper(%pkgs)."\n");
    704708    open(PKG,"> $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb") || die "Unable to create $ENV{'PBDESTDIR'}/$ENV{'PBPROJVER'}-$ENV{'PBPROJTAG'}.pb";
    705     foreach my $pbpkg (@pkgs) {
     709    foreach my $pbpkg (keys %pkgs) {
    706710        print PKG "pbpkg $pbpkg = $pkgs{$pbpkg}\n";
    707711    }
Note: See TracChangeset for help on using the changeset viewer.