Changeset 1111 in ProjectBuilder for devel/pb-modules
- Timestamp:
- Nov 18, 2010, 2:06:01 AM (14 years ago)
- Location:
- devel/pb-modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/bin/pbdistrocheck
r1071 r1111 121 121 @param = split(/-/,$dist) if (defined $dist); 122 122 123 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $ arch) = pb_distro_init(@param);123 my ($ddir, $dver, $dfam, $dtype, $dos, $pbsuf, $pbupd, $pbins, $arch) = pb_distro_init(@param); 124 124 my $sep = "\n"; 125 125 if (defined $opts{'l'}) { … … 144 144 $pbsuf = "Suffix:\t$pbsuf"; 145 145 $pbupd = "Update:\t$pbupd"; 146 $pbins = "Install:\t$pbupd"; 146 147 $arch = "Arch:\t$arch"; 147 148 print "Project-Builder tuple:\n"; 148 149 } 149 print join($sep,($dos, $ddir, $dver, $arch, $dtype, $dfam, $pbsuf, $pbupd ))."\n";150 print join($sep,($dos, $ddir, $dver, $arch, $dtype, $dfam, $pbsuf, $pbupd, $pbins))."\n"; 150 151 } -
devel/pb-modules/etc/pb.conf
r1109 r1111 194 194 # key depends on granularity, value is install command 195 195 196 # Command to update the distribution to latest state 197 osupd du = sudo apt-get update 198 osupd gen = sudo emerge 199 osupd rpm = sudo yum clean all; sudo yum -y update 200 osupd md = sudo urpmi.update -a ; sudo urpmi --autoa--auto-select 201 osupd opensuse = sudo zypper -n update 202 osupd sol = /bin/true 203 osupd lsb = /bin/true 204 196 205 # Chaining the commands allow to only test for what is able to be installed, 197 206 # not the update of the repo which may well be unaccessible if too old 198 os upddu = sudo apt-get update ; sudo apt-get -y install199 os updgen = sudo emerge200 os updrpm = sudo yum clean all; sudo yum -y update ; sudo yum -y install201 os updrhel-2.1 = sudo up2date -y202 os updrhel-3 = sudo up2date -y203 os updrhel-4 = sudo up2date -y204 os updmd = sudo urpmi.update -a ; sudo urpmi --auto205 os updnovell = export TERM=linux ; export PATH=\$PATH:/sbin:/usr/sbin ; sudo yast2 -i206 os updopensuse-10.2 = sudo yes | zypper install207 os updopensuse = sudo zypper -n install208 os updsol = sudo pkgadd -d209 os updlsb = /bin/true207 osins du = sudo apt-get update ; sudo apt-get -y install 208 osins gen = sudo emerge 209 osins rpm = sudo yum clean all; sudo yum -y update ; sudo yum -y install 210 osins rhel-2.1 = sudo up2date -y 211 osins rhel-3 = sudo up2date -y 212 osins rhel-4 = sudo up2date -y 213 osins md = sudo urpmi.update -a ; sudo urpmi --auto 214 osins novell = export TERM=linux ; export PATH=\$PATH:/sbin:/usr/sbin ; sudo yast2 -i 215 osins opensuse-10.2 = sudo yes | zypper install 216 osins opensuse = sudo zypper -n install 217 osins sol = sudo pkgadd -d 218 osins lsb = /bin/true 210 219 211 220 # From the most generic to the most specialized, in term of granularity, -
devel/pb-modules/etc/pb.conf.pod
r1109 r1111 102 102 Conffile: pb 103 103 Example: osfamily debian = du 104 105 =item B<osins> 106 107 Nature: Optional 108 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 109 Value: OS command to lauch in order to automatically install packages on it. 110 Conffile: pb 111 Example: osins fedora = sudo yum -y install 104 112 105 113 =item B<osmindep> … … 196 204 Nature: Optional 197 205 Key: OS (could be from the most generic up to the most specific from ostype, osfamily, os, os-ver, os-ver-arch). The family name is generaly used here. 198 Value: OS command to lauch in order to automatically install packages on it.199 Conffile: pb 200 Example: os type rh = rpm, ostype md = rpm, ostype novell = rpm206 Value: OS command to lauch in order to automatically update th VM|VE 207 Conffile: pb 208 Example: osupd fedora = sudo yum -y update 201 209 202 210 =item B<pbconfurl> -
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.