580 |
580 |
$changedesc = "Overwrote previous installation of {$pkg_info['name']}.";
|
581 |
581 |
$to_output = "overwrite!\n";
|
582 |
582 |
}
|
|
583 |
|
583 |
584 |
if(file_exists('/conf/needs_package_sync'))
|
584 |
585 |
@unlink('/conf/needs_package_sync');
|
585 |
|
conf_mount_ro();
|
586 |
586 |
write_config("Intermediate config write during package install for {$pkg_info['name']}.");
|
|
587 |
conf_mount_rw(); //Compensate write_config() sending to _ro
|
|
588 |
|
587 |
589 |
$static_output .= $to_output;
|
588 |
590 |
update_output_window($static_output);
|
589 |
591 |
/* install other package components */
|
... | ... | |
602 |
604 |
if($pkg_info['after_install_info'])
|
603 |
605 |
update_output_window($pkg_info['after_install_info']);
|
604 |
606 |
}
|
|
607 |
conf_mount_ro();
|
605 |
608 |
}
|
606 |
609 |
|
607 |
610 |
function get_after_install_info($package) {
|
... | ... | |
1024 |
1027 |
* Same is done during installation.
|
1025 |
1028 |
*/
|
1026 |
1029 |
write_config("Intermediate config write during package removal for {$pkg}.");
|
|
1030 |
conf_mount_rw(); //Compensate for write_config() sending to _ro
|
1027 |
1031 |
|
1028 |
1032 |
/*
|
1029 |
1033 |
* If a require exists, include it. this will
|
... | ... | |
1202 |
1206 |
@unlink('/conf/needs_package_sync');
|
1203 |
1207 |
$pkg_id = 0;
|
1204 |
1208 |
$todo = array();
|
1205 |
|
if (is_array($config['installedpackages']['package']))
|
|
1209 |
if (is_array($config['installedpackages']['package'])) {
|
1206 |
1210 |
foreach($config['installedpackages']['package'] as $package)
|
1207 |
1211 |
$todo[] = array('name' => $package['name'], 'version' => $package['version']);
|
1208 |
|
echo "One moment please, reinstalling packages...\n";
|
1209 |
|
echo " >>> Trying to fetch package info...";
|
1210 |
|
$pkg_info = get_pkg_info();
|
1211 |
|
if ($pkg_info) {
|
1212 |
|
echo " Done.\n";
|
1213 |
|
} else {
|
1214 |
|
$xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
|
1215 |
|
echo "\n" . sprintf(gettext(' >>> Unable to communicate with %1$s. Please verify DNS and interface configuration, and that %2$s has functional Internet connectivity.'), $xmlrpc_base_url, $g['product_name']) . "\n";
|
1216 |
|
return;
|
1217 |
|
}
|
1218 |
|
if(is_array($todo)) {
|
|
1212 |
|
|
1213 |
echo "One moment please, reinstalling packages...\n";
|
|
1214 |
echo " >>> Trying to fetch package info...";
|
|
1215 |
$pkg_info = get_pkg_info();
|
|
1216 |
if ($pkg_info) {
|
|
1217 |
echo " Done.\n";
|
|
1218 |
} else {
|
|
1219 |
$xmlrpc_base_url = isset($config['system']['altpkgrepo']['enable']) ? $config['system']['altpkgrepo']['xmlrpcbaseurl'] : $g['xmlrpcbaseurl'];
|
|
1220 |
echo "\n" . sprintf(gettext(' >>> Unable to communicate with %1$s. Please verify DNS and interface configuration, and that %2$s has functional Internet connectivity.'), $xmlrpc_base_url, $g['product_name']) . "\n";
|
|
1221 |
return;
|
|
1222 |
}
|
1219 |
1223 |
foreach($todo as $pkgtodo) {
|
1220 |
1224 |
$static_output = "";
|
1221 |
1225 |
if($pkgtodo['name']) {
|
Compenstate for the write_config calls sending the filesystem to ro during pacakge installation.