Changeset 2324


Ignore:
Timestamp:
Sep 24, 2017, 12:09:33 AM (4 weeks ago)
Author:
bruno
Message:

Fix #167 by adding an oslocalins option

Location:
devel
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/etc/pb.yml

    r2298 r2324  
    279279  sol: sudo /usr/sbin/pkgadd -d
    280280  lsb: /bin/true
     281
     282# On Debian based distro, we can not use apt-get to install local packages just built, so use dpkg
     283oslocalins:
     284  du: sudo /usr/bin/dpkg -i
     285# rpm: sudo /usr/bin/rpm -Uvh
    281286
    282287# From the most generic to the most specialized, in term of granularity,
  • devel/pb-modules/etc/pb.yml.pod

    r2292 r2324  
    303303 Nature: Mandatory
    304304 Key: tool (pb or rpmbootstrap)
    305  Value: come separated list of commands that are mandatory on the underlying system
     305 Value: coma separated list of commands that are mandatory on the underlying system
    306306 Conffile: pb
    307307 Example: oscmd pb = tar,ls
     
    338338 Conffile: pb
    339339 Example: osins fedora = sudo yum -y install
     340
     341=item B<oslocalins>
     342
     343 Nature: Optional
     344 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.
     345 Value: OS command to lauch in order to automatically install local packages on it.
     346 Conffile: pb
     347 Example: oslocalins debian = sudo dpkg -i
    340348
    341349=item B<osmindep>
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r2289 r2324  
    165165$pbos->{'family'} = pb_distro_get_param($pbos,pb_conf_get("osfamily"));
    166166$pbos->{'type'} = pb_distro_get_param($pbos,pb_conf_get("ostype"));
    167 ($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'}) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd"));
     167($pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'},$pbos->{'localinstall'}) = pb_distro_get_param($pbos,pb_conf_get("os","osins","ossuffix","osnover","osremovedotinver","osupd","oslocalins"));
    168168#($pbos->{'family'},$pbos->{'type'},$pbos->{'os'},$pbos->{'install'},$pbos->{'suffix'},$pbos->{'nover'},$pbos->{'rmdot'},$pbos->{'update'}) = pb_distro_get_param($pbos,pb_conf_get("osfamily","ostype","os","osins","ossuffix","osnover","osremovedotinver","osupd"));
    169169
     
    354354my $forcerepo = shift;
    355355my $deps = shift;   # optional list of deps to install
     356my $local = shift;   # optional should we install local packages or remote (for deb command is different)
    356357
    357358# Protection
     
    369370# This may not be // proof. We should test for availability of repo and sleep if not
    370371my $cmd = "$pbos->{'install'} $deps";
     372$cmd = "$pbos->{'localinstall'} $deps" if (defined $local);
    371373my $ret = pb_system($cmd, "Installing dependencies ($cmd)","mayfail");
    372374# Try to accomodate deficient proxies
  • devel/pb/bin/pb

    r2322 r2324  
    21162116    print KEEP "$made\n";
    21172117    close(KEEP);
    2118     pb_distro_installdeps(undef,$pbos,undef,$ret) if ($do_install);
     2118    pb_distro_installdeps(undef,$pbos,undef,$ret,"local") if ($do_install);
    21192119}
    21202120
Note: See TracChangeset for help on using the changeset viewer.