Changeset 969 in ProjectBuilder for devel


Ignore:
Timestamp:
Feb 16, 2010, 8:03:47 PM (14 years ago)
Author:
Bruno Cornec
Message:
  • Fix a bug for suffix computation, following the change of interface for pb_distro_get_param
  • pbdistrocheck now has a man page. Build files adapted accordingly
Location:
devel/pb-modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/Makefile.PL

    r915 r969  
    1818    AUTHOR        => 'Bruno Cornec <bruno#project-builder.org>',
    1919    EXE_FILES     => [ qw( bin/pbdistrocheck ) ],
     20    MAN1PODS      => { 'bin/pbdistrocheck' => '$(INST_MAN1DIR)/pbdistrocheck.$(MAN1EXT)', },
    2021    MAN3PODS      => {  'lib/ProjectBuilder/Distribution.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Distribution.$(MAN3EXT)',
    2122                        'lib/ProjectBuilder/Conf.pm' => '$(INST_MAN3DIR)/ProjectBuilder::Conf.$(MAN3EXT)',
  • devel/pb-modules/bin/pbdistrocheck

    r839 r969  
    1414use ProjectBuilder::Distribution;
    1515use ProjectBuilder::Base;
     16
     17=pod
     18
     19=head1 NAME
     20
     21pb, aka project-builder.org - builds packages for your projects
     22
     23=head1 DESCRIPTION
     24
     25pb helps you build various packages directly from your project sources.
     26pbdistrocheck is a command from the pb project providing the same type of services as lsb_release, but extended.
     27
     28=head1 SYNOPSIS
     29
     30pbdistrocheck [-d][-v] [distro-ver-arch]
     31
     32=head1 OPTIONS
     33
     34=over 4
     35
     36=item B<-v|--verbose>
     37
     38Print a brief help message and exits.
     39
     40=item B<-d|--description>
     41
     42generate a short format user friendly
     43(by default, generate a longer format, comma separated allowing parsing)
     44
     45=back
     46
     47=head1 ARGUMENTS
     48
     49arguments are optional. If none given, analyzes the underlying operating system
     50If one is given, it should have the format osname-version-architecture, and in that case pbdistrocheck will provide all the information related to that OS needed by pb.
     51
     52=head1 WEB SITES
     53
     54The main Web site of the project is available at L<http://www.project-builder.org/>. Bug reports should be filled using the trac instance of the project at L<http://trac.project-builder.org/>.
     55
     56=head1 USER MAILING LIST
     57
     58Cf: L<http://www.mondorescue.org/sympa/info/pb-announce> for announces and L<http://www.mondorescue.org/sympa/info/pb-devel> for the development of the pb project.
     59
     60=head1 CONFIGURATION FILES
     61
     62Uses the main /etc/pb/pb.conf (or /usr/local/etc/pb/pb.conf if installed from files) configuration file to give its answers.
     63
     64=head1 AUTHORS
     65
     66The Project-Builder.org team L<http://trac.project-builder.org/> lead by Bruno Cornec L<mailto:bruno@project-builder.org>.
     67
     68=head1 COPYRIGHT
     69
     70Project-Builder.org is distributed under the GPL v2.0 license
     71described in the file C<COPYING> included with the distribution.
     72
     73=cut
    1674
    1775my %opts;                   # CLI Options
     
    3189pb_log_init($pbdebug, $pbLOG);
    3290
    33 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init();
     91my $dist = shift @ARGV || undef ;
     92my @param = undef;
     93@param = split(/-/,$dist) if (defined $dist);
     94
     95my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init(@param);
    3496if (defined $opts{'d'}) {
    35     print "\u$ddir $dver\n";
     97    print "\u$ddir $dver $arch\n";
    3698} else {
    3799    print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch))."\n";
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r964 r969  
    114114my ($osfamily,$ostype,$osupd,$ossuffix,$osnover,$osremovedotinver) = pb_conf_get("osfamily","ostype","osupd","ossuffix","osnover","osremovedotinver");
    115115
     116# Dig into the tuple to find the best answer
    116117$dfam = pb_distro_get_param($ddir,$dver,$darch,$osfamily);
    117118$dtype = $ostype->{$dfam} if (defined $ostype->{$dfam});
     
    127128$dver =~ s/\.// if ($drmdot eq "true");
    128129
    129 if ((not defined $dsuf) || ($dsuf eq "unknown")) {
     130if ((not defined $dsuf) || ($dsuf eq "")) {
    130131    # By default suffix is a concatenation of .ddir and dver
    131132    $dsuf = ".$ddir$dver"
Note: See TracChangeset for help on using the changeset viewer.