tiny-slitaz rev 32

Do not suggest packages twice
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Sep 26 13:55:40 2019 +0200 (2019-09-26)
parents f03cb925353c
children b79cb203da62
files step1.php step4.php
line diff
     1.1 --- a/step1.php	Wed Sep 25 19:08:26 2019 +0200
     1.2 +++ b/step1.php	Thu Sep 26 13:55:40 2019 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4  
     1.5  shell_exec("sudo ./helper --chkdist"); 
     1.6  $usedvars = array( "kernel", "modules", "packages", "toconfigure",
     1.7 -	"continue", "configuring", "tmp_dir" );
     1.8 +	"continue", "configuring", "already_suggested", "tmp_dir" );
     1.9  
    1.10  function set_tmp_dir()
    1.11  {
    1.12 @@ -51,6 +51,10 @@
    1.13  	}
    1.14  }
    1.15  
    1.16 +if (isset($_POST['EXTRA_SUGGESTED'])) {
    1.17 +	$_POST['already_suggested'] .= " ".$_POST['EXTRA_SUGGESTED'];
    1.18 +}
    1.19 +
    1.20  if (isset($_POST['mykernel']) && !isset($_POST['packages'])) {
    1.21          $_POST['kernel'] = "custom";
    1.22  	upload("uploadkernel","kernel");
     2.1 --- a/step4.php	Wed Sep 25 19:08:26 2019 +0200
     2.2 +++ b/step4.php	Thu Sep 26 13:55:40 2019 +0200
     2.3 @@ -35,7 +35,8 @@
     2.4  		unset($pkgs[$key]);
     2.5  		$_POST['toconfigure'] = implode(" ", $pkgs);
     2.6  		$output .= shell_exec("./helper --list-suggested $pkg ".
     2.7 -			$_POST['tmp_dir']." ".$_POST['packages']); 
     2.8 +			$_POST['tmp_dir']." ".$_POST['packages'].
     2.9 +			$_POST['already_suggested']); 
    2.10  		if ($output == "") {
    2.11  			shell_exec("sudo ./helper --post-install $pkg ".
    2.12  				   $_POST['tmp_dir']);