Changeset 756 in ProjectBuilder for devel/pb-modules
- Timestamp:
- Apr 4, 2009, 7:42:24 PM (16 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/bin/pbdistrocheck
r620 r756 28 28 pb_log_init($pbdebug, $pbLOG); 29 29 30 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd ) = pb_distro_init();31 print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd ))."\n";30 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init(); 31 print "distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch))."\n"; -
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r751 r756 42 42 # Return information on the running distro 43 43 # 44 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd ) = pb_distro_init();45 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd )."\n";44 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init(); 45 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch)."\n"; 46 46 # 47 47 # Return information on the requested distro 48 48 # 49 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd ) = pb_distro_init("ubuntu","7.10");50 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd )."\n";49 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init("ubuntu","7.10","x86_64"); 50 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch)."\n"; 51 51 # 52 52 # Return information on the running distro 53 53 # 54 54 my ($ddir,$dver) = pb_distro_get(); 55 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd ) = pb_distro_init($ddir,$dver);56 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd )."\n";55 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch) = pb_distro_init($ddir,$dver); 56 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $arch)."\n"; 57 57 58 58 =head1 USAGE … … 60 60 =over 4 61 61 62 63 =item B<pb_distro_get> 64 65 This function returns a list of 2 parameters indicating the distribution name and version of the underlying Linux distribution. The value of those 2 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 66 67 On my home machine it would currently report ("mandriva","2008.0"). 68 69 =cut 62 =item B<pb_distro_init> 63 64 This function returns a list of 7 parameters indicating the distribution name, version, family, type of build system, suffix of packages, update command line and architecture of the underlying Linux distribution. The value of the 7 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 65 66 As an example, Ubuntu and Debian are in the same "du" family. As well as RedHat, RHEL, CentOS, fedora are on the same "rh" family. 67 Mandriva, Open SuSE and Fedora have all the same "rpm" type of build system. Ubuntu ad Debian have the same "deb" type of build system. 68 And "fc" is the extension generated for all Fedora packages (Version will be added by pb). 69 70 When passing the distribution name and version as parameters, the B<pb_distro_init> function returns the parameter of that distribution instead of the underlying one. 71 72 Cf: http://linuxmafia.com/faq/Admin/release-files.html 73 Ideas taken from http://search.cpan.org/~kerberus/Linux-Distribution-0.14/lib/Linux/Distribution.pm 74 75 =cut 76 70 77 71 78 sub pb_distro_init { … … 171 178 } 172 179 173 return($ddir, $dver, $dfam, $dtype, $dsuf, $dupd); 174 } 175 176 =item B<pb_distro_init> 177 178 This function returns a list of 5 parameters indicating the distribution name, version, family, type of build system and suffix of packages of the underlying Linux distribution. The value of the 5 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 179 180 As an example, Ubuntu and Debian are in the same "du" family. As well as RedHat, RHEL, CentOS, fedora are on the same "rh" family. 181 Mandriva, Open SuSE and Fedora have all the same "rpm" type of build system. Ubuntu ad Debian have the same "deb" type of build system. 182 And "fc" is the extension generated for all Fedora packages (Version will be added by pb). 183 184 When passing the distribution name and version as parameters, the B<pb_distro_init> function returns the parameter of that distribution instead of the underlying one. 185 186 Cf: http://linuxmafia.com/faq/Admin/release-files.html 187 Ideas taken from http://search.cpan.org/~kerberus/Linux-Distribution-0.14/lib/Linux/Distribution.pm 180 return($ddir, $dver, $dfam, $dtype, $dsuf, $dupd, $arch); 181 } 182 183 =item B<pb_distro_get> 184 185 This function returns a list of 2 parameters indicating the distribution name and version of the underlying Linux distribution. The value of those 2 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 186 187 On my home machine it would currently report ("mandriva","2009.0"). 188 188 189 189 =cut … … 344 344 345 345 This function install the dependencies required to build the package on an RPM based distro 346 dependencies can be passed as a p rameter in which case they are not computed346 dependencies can be passed as a parameter in which case they are not computed 347 347 348 348 =cut
Note:
See TracChangeset
for help on using the changeset viewer.