aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsboinstall17
-rwxr-xr-xsboupgrade8
2 files changed, 17 insertions, 8 deletions
diff --git a/sboinstall b/sboinstall
index 83c9c02..13c07f0 100755
--- a/sboinstall
+++ b/sboinstall
@@ -93,9 +93,18 @@ if ($no_reqs or $non_int) {
}
}
+# get lists of installed packages and perl modules from CPAN
+my $inst_names = get_inst_names(get_installed_packages 'ALL');
+my $pms = get_installed_cpans();
+s/::/-/g for @$pms;
+my %inst_names;
+$inst_names{$_} = 1 for @$inst_names;
+
# populate %locations and sanity check
%locations = get_sbo_locations($build_queue);
for my $sbo (@$build_queue) {
+ next if $inst_names{$sbo};
+
usage_error("Unable to locate $sbo in the SlackBuilds.org tree.") unless
$locations{$sbo};
if ($compat32) {
@@ -104,17 +113,9 @@ for my $sbo (@$build_queue) {
}
}
-# get lists of installed packages and perl modules from CPAN
-my $inst_names = get_inst_names(get_installed_packages 'ALL');
-my $pms = get_installed_cpans();
-s/::/-/g for @$pms;
-
# check for already-installeds and prompt for the rest
my (@temp_queue, %commands, %options);
my $added = ' added to install queue.';
-my %inst_names;
-$inst_names{$_} = 1 for @$inst_names;
-
FIRST: for my $sbo (@$build_queue) {
my $name = $compat32 ? "$sbo-compat32" : $sbo;
diff --git a/sboupgrade b/sboupgrade
index 0739078..cb5cc10 100755
--- a/sboupgrade
+++ b/sboupgrade
@@ -98,6 +98,12 @@ slackbuilds_or_fetch();
my @sbos = uniq @ARGV;
+# Filter out standard packages
+my $std_installs = get_inst_names(get_installed_packages('STD'));
+my %std_names;
+$std_names{$_} = 1 for @$std_installs;
+@sbos = grep { not $std_names{$_} } @sbos;
+
# pull locations for everything specified on command line.
my %locations;
for my $sbo (@sbos) {
@@ -169,6 +175,8 @@ if ($non_int) {
# Get user input regarding upgrades
my (@temp_queue, %commands, %options);
FIRST: for my $sbo (@$upgrade_queue) {
+ next FIRST if $std_names{$sbo};
+
unless ($non_int) {
my ($cmds, $opts, $exit) = user_prompt($sbo, $locations{$sbo});
if ($exit) {