| Paste number 10262: | Like this instead |
| Pasted by: | vasi |
| When: | 5 years, 2 days ago |
| Share: | Tweet this! | http://paste.lisp.org/+7X2 |
| Channel: | #fink |
| Paste contents: |
# check dependencies
next PACKAGELOOP if grep { ($_->[FLAG] & 2) == 0 } @extendeddeps;
### switch debs during long builds
foreach $dep (@extendeddeps) {
if (!$dep->[PKGVER]->is_installed()) {
### Guess we should build/install it then
### If the deb exists, we install it without asking
if ($dep->[PKGVER]->is_present()) {
&real_install($OP_INSTALL, 0, 1, $dryrun, $dep->[PKGVER]->get_name());
} else {
### Ask the user... unlike the previous version of this
### code, the default answer is "no", to avoid possibly
### infinite loops during automated builds
my $prompt = "To continue ".$dep->[PKGNAME]." is required, do you want to install it now?";
my $continue = prompt_boolean($prompt, default => 0, timeout => 60);
if ($continue) {
&real_install($OP_INSTALL, 0, 1, $dryrun, $dep->[PKGVER]->get_name());
} else {
die "Failed to switch in ".$dep->[PKGNAME]."!\n";
}
}
}
}
This paste has no annotations.