Changeset 1111 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/Distribution.pm
- Timestamp:
- Nov 18, 2010, 2:06:01 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/Distribution.pm
r1102 r1111 42 42 # Return information on the running distro 43 43 # 44 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $dos, $pbupd, $ arch) = pb_distro_init();45 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $ arch)."\n";44 my ($ddir, $dver, $dfam, $dtype, $pbsuf, $dos, $pbupd, $pbins, $arch) = pb_distro_init(); 45 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $pbins, $arch)."\n"; 46 46 # 47 47 # Return information on the requested distro 48 48 # 49 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $ arch) = pb_distro_init("ubuntu","7.10","x86_64");50 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $ arch)."\n";49 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init("ubuntu","7.10","x86_64"); 50 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $pbins, $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, $dos, $pbsuf, $pbupd, $ arch) = pb_distro_init($ddir,$dver);56 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $ arch)."\n";55 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init($ddir,$dver); 56 print "distro tuple: ".Dumper($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd, $pbins, $arch)."\n"; 57 57 58 58 =head1 USAGE … … 74 74 =item B<pb_distro_init> 75 75 76 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 7fields may be "unknown" in case the function was unable to recognize on which distribution it is running.76 This function returns a list of 8 parameters indicating the distribution name, version, family, type of build system, suffix of packages, update command line, installation command line and architecture of the underlying Linux distribution. The value of the 8 fields may be "unknown" in case the function was unable to recognize on which distribution it is running. 77 77 78 78 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. … … 98 98 my $dsuf = "unknown"; 99 99 my $dupd = "unknown"; 100 my $dins = "unknown"; 100 101 my $darch = shift || undef; 101 102 my $dnover = "false"; … … 113 114 $darch=pb_get_arch() if (not defined $darch); 114 115 115 my ($osfamily,$ostype,$osupd,$os suffix,$osnover,$osremovedotinver,$os) = pb_conf_get("osfamily","ostype","osupd","ossuffix","osnover","osremovedotinver","os");116 my ($osfamily,$ostype,$osupd,$osins,$ossuffix,$osnover,$osremovedotinver,$os) = pb_conf_get("osfamily","ostype","osupd","osins","ossuffix","osnover","osremovedotinver","os"); 116 117 117 118 # Dig into the tuple to find the best answer … … 120 121 $dos = pb_distro_get_param($ddir,$dver,$darch,$os,$dfam,$dtype); 121 122 $dupd = pb_distro_get_param($ddir,$dver,$darch,$osupd,$dfam,$dtype,$dos); 123 $dins = pb_distro_get_param($ddir,$dver,$darch,$osins,$dfam,$dtype,$dos); 122 124 $dsuf = pb_distro_get_param($ddir,$dver,$darch,$ossuffix,$dfam,$dtype,$dos); 123 125 $dnover = pb_distro_get_param($ddir,$dver,$darch,$osnover,$dfam,$dtype,$dos); … … 141 143 # $opt="--exclude=*.i?86"; 142 144 # } 143 pb_log(2,"DEBUG: pb_distro_init: $ddir, $dver, $dfam, $dtype, $dsuf, $dupd, $d arch\n");144 145 return($ddir, $dver, $dfam, $dtype, $dos, $dsuf, $dupd, $d arch);145 pb_log(2,"DEBUG: pb_distro_init: $ddir, $dver, $dfam, $dtype, $dsuf, $dupd, $dins, $darch\n"); 146 147 return($ddir, $dver, $dfam, $dtype, $dos, $dsuf, $dupd, $dins, $darch); 146 148 } 147 149
Note:
See TracChangeset
for help on using the changeset viewer.