Browse Source

Adds the --enhances option.

master
freesource 23 years ago
parent
commit
b59992bff6
  1. 8
      SWIM/Ag.pm
  2. 8
      SWIM/DB.pm
  3. 9
      SWIM/DB_Init.pm
  4. 194
      SWIM/Deb.pm
  5. 90
      SWIM/Deps.pm
  6. 21
      SWIM/NDB.pm
  7. 19
      SWIM/NDB_Init.pm
  8. 4
      SWIM/Pn_print.pm

8
SWIM/Ag.pm

@ -179,7 +179,7 @@ sub q_description {
$commands->{"depends"} || $commands->{"pre_depends"} || $commands->{"depends"} || $commands->{"pre_depends"} ||
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"recommends"} || $commands->{"suggests"} ||
$commands->{"conflicts"} || $commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"replaces"} ||
$commands->{"provides"}; $commands->{"provides"} || $commands->{"enhances"};
singular(\%commands); singular(\%commands);
character(\%commands); character(\%commands);
shlibs(\%commands) if $commands->{"shlibs"}; shlibs(\%commands) if $commands->{"shlibs"};
@ -187,7 +187,7 @@ sub q_description {
$commands->{"depends"} || $commands->{"pre_depends"} || $commands->{"depends"} || $commands->{"pre_depends"} ||
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"recommends"} || $commands->{"suggests"} ||
$commands->{"conflicts"} || $commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"replaces"} ||
$commands->{"provides"}; $commands->{"provides"} || $commands->{"enhances"};
} }
else { print "package $argument is not installed\n"; } else { print "package $argument is not installed\n"; }
} }
@ -226,7 +226,7 @@ sub q_description {
$commands->{"depends"} || $commands->{"pre_depends"} || $commands->{"depends"} || $commands->{"pre_depends"} ||
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"recommends"} || $commands->{"suggests"} ||
$commands->{"conflicts"} || $commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"replaces"} ||
$commands->{"provides"}; $commands->{"provides"} || $commands->{"enhances"};
singular(\%commands); singular(\%commands);
character(\%commands); character(\%commands);
shlibs(\%commands) if $commands->{"shlibs"}; shlibs(\%commands) if $commands->{"shlibs"};
@ -234,7 +234,7 @@ sub q_description {
$commands->{"depends"} || $commands->{"pre_depends"} || $commands->{"depends"} || $commands->{"pre_depends"} ||
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"recommends"} || $commands->{"suggests"} ||
$commands->{"conflicts"} || $commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"replaces"} ||
$commands->{"provides"}; $commands->{"provides"} || $commands->{"enhances"};
} }
else { print "package $argument is not installed\n"; } else { print "package $argument is not installed\n"; }
} }

8
SWIM/DB.pm

@ -83,7 +83,7 @@ sub db {
# to save time over using status # to save time over using status
my @status; my @status;
my ($replaces, $provides, $depends, $pre_depends, $recommends, $suggests, my ($replaces, $provides, $depends, $pre_depends, $recommends, $suggests,
$conflicts); $conflicts, $enhances);
my (@conffiles,$line_before,@conf,@complete,@form,@formly); my (@conffiles,$line_before,@conf,@complete,@form,@formly);
my $format_deb = "$tmp/format.deb"; my $format_deb = "$tmp/format.deb";
@ -644,6 +644,12 @@ sub db {
$ping->put("$package[1]SUG",$suggests); $ping->put("$package[1]SUG",$suggests);
} }
} }
elsif (/^Enhances:/) {
$enhances = $_;
if (defined($enhances)) {
$ping->put("$package[1]ENH",$enhances);
}
}
elsif (/^Conflicts:/) { elsif (/^Conflicts:/) {
$conflicts = $_; $conflicts = $_;
if (defined($conflicts)) { if (defined($conflicts)) {

9
SWIM/DB_Init.pm

@ -71,7 +71,7 @@ sub database {
my @status; my @status;
my ($replaces, @REPLACE, $provides, $depends, $pre_depends, my ($replaces, @REPLACE, $provides, $depends, $pre_depends,
$recommends, $suggests, $conflicts); $recommends, $suggests, $enhances, $conflicts);
my @conffiles; my @conffiles;
my $line_before; my $line_before;
@ -400,6 +400,13 @@ sub database {
push(@REPLACE, $suggests); push(@REPLACE, $suggests);
} }
} }
elsif (/^Enhances:/) {
$enhances = $_;
if (defined($enhances)) {
push(@REPLACE, "$package[1]ENH");
push(@REPLACE, $enhances);
}
}
elsif (/^Conflicts:/) { elsif (/^Conflicts:/) {
$conflicts = $_; $conflicts = $_;
if (defined($conflicts)) { if (defined($conflicts)) {

194
SWIM/Deb.pm

@ -101,11 +101,21 @@ sub deb_package {
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep -E \"Description: \w*|[.]\$|^ [\w-]*\""; $grep -E \"Description: \w*|[.]\$|^ [\w-]*\"";
} }
if (!($commands->{"T"} || $commands->{"pre_depends"} || if (
$commands->{"depends"} || $commands->{"recommends"} || !($commands->{"T"} ||
$commands->{"suggests"} || $commands->{"provides"} || $commands->{"pre_depends"} ||
$commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"depends"} ||
$commands->{"c"} || $commands->{"l"})) { $commands->{"recommends"} ||
$commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"c"} ||
$commands->{"l"})
) {
print "\n"; print "\n";
} }
} }
@ -190,12 +200,22 @@ sub deb_package {
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep -E \"Description: \w*|[.]\$|^ [\w-]*\""; $grep -E \"Description: \w*|[.]\$|^ [\w-]*\"";
} }
if (!($commands->{"T"} || $commands->{"pre_depends"} || if (
$commands->{"depends"} || $commands->{"recommends"} || !($commands->{"T"} ||
$commands->{"suggests"} || $commands->{"provides"} || $commands->{"pre_depends"} ||
$commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"depends"} ||
$commands->{"c"} || $commands->{"l"})) { $commands->{"recommends"} ||
print "\n"; $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"c"} ||
$commands->{"l"})
) {
print "\n";
} }
} }
shlibso(\%commands); shlibso(\%commands);
@ -269,12 +289,22 @@ sub deb_package {
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep -E \"Description: \w*|[.]\$|^ [\w-]*\""; $grep -E \"Description: \w*|[.]\$|^ [\w-]*\"";
} }
if (!($commands->{"T"} || $commands->{"pre_depends"} || if (
$commands->{"depends"} || $commands->{"recommends"} || !($commands->{"T"} ||
$commands->{"suggests"} || $commands->{"provides"} || $commands->{"pre_depends"} ||
$commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"depends"} ||
$commands->{"c"} || $commands->{"l"})) { $commands->{"recommends"} ||
print "\n"; $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"c"} ||
$commands->{"l"})
) {
print "\n";
} }
} }
shlibso(\%commands); shlibso(\%commands);
@ -352,12 +382,23 @@ sub deb_package {
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep -E \"Description: \w*|[.]\$|^ [\w-]*\""; $grep -E \"Description: \w*|[.]\$|^ [\w-]*\"";
} }
if (!($commands->{"T"} || $commands->{"pre_depends"} || if (
$commands->{"depends"} || $commands->{"recommends"} || !($commands->{"T"} ||
$commands->{"suggests"} || $commands->{"provides"} || $commands->{"pre_depends"} ||
$commands->{"replaces"} || $commands->{"conflicts"} || $commands->{"depends"} ||
$commands->{"c"} || $commands->{"l"})) { $commands->{"recommends"} ||
print "\n"; $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"c"} ||
$commands->{"l"})
) {
print "\n";
} }
} }
shlibso(\%commands); shlibso(\%commands);
@ -566,16 +607,38 @@ sub printme {
my ($commands) = @_; my %commands = %$commands; my ($commands) = @_; my %commands = %$commands;
if ($commands->{"p"} && !($commands->{"i"} || $commands->{"l"} || if (
$commands->{"df"} || $commands->{"d"} || $commands->{"c"} || $commands->{"p"} &&
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} ||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} || !($commands->{"i"} ||
$commands->{"pre_depends"} || $commands->{"depends"} || $commands->{"l"} ||
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"df"} ||
$commands->{"provides"} || $commands->{"replaces"} || $commands->{"d"} ||
$commands->{"conflicts"} || $commands->{"requires"} || $commands->{"c"} ||
$commands->{"changelog"} || $commands->{"m"} || $commands->{"menu"} || $commands->{"scripts"} ||
$commands->{"copyright"})) { $commands->{"preinst"} ||
$commands->{"postinst"} ||
$commands->{"prerm"} ||
$commands->{"postrm"} ||
$commands->{"config"} ||
$commands->{"templates"} ||
$commands->{"T"} ||
$commands->{"pre_depends"} ||
$commands->{"depends"} ||
$commands->{"recommends"} ||
$commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"requires"} ||
$commands->{"changelog"} ||
$commands->{"m"} ||
$commands->{"menu"} ||
$commands->{"copyright"})
) {
if ( $dpkg_deb) { if ( $dpkg_deb) {
system "$dpkg_deb -f $argument Package > $tmp/temp.deb"; system "$dpkg_deb -f $argument Package > $tmp/temp.deb";
} }
@ -601,19 +664,41 @@ sub printme {
} }
print "\n"; print "\n";
} }
elsif ($commands->{"p"} && ($commands->{"l"} || $commands{"d"} || elsif (
$commands{"c"}) $commands->{"p"} &&
&& !($commands->{"i"} || $commands->{"df"} ||
$commands->{"scripts"} || $commands->{"preinst"} || $commands->{"postinst"} || ($commands->{"l"} ||
$commands->{"prerm"} || $commands->{"postrm"} || $commands->{"config"} || $commands->{"templates"} || $commands->{"T"} || $commands{"d"} ||
$commands->{"pre_depends"} || $commands->{"depends"} || $commands{"c"}) &&
$commands->{"recommends"} || $commands->{"suggests"} ||
$commands->{"provides"} || $commands->{"replaces"} || !($commands->{"i"} ||
$commands->{"conflicts"} || $commands->{"requires"} || $commands->{"df"} ||
$commands->{"changelog"} || $commands->{"m"} || $commands->{"menu"} || $commands->{"scripts"} ||
$commands->{"copyright"})) { $commands->{"preinst"} ||
$commands->{"postinst"} ||
$commands->{"prerm"} ||
$commands->{"postrm"} ||
$commands->{"config"} ||
$commands->{"templates"} ||
$commands->{"T"} ||
$commands->{"pre_depends"} ||
$commands->{"depends"} ||
$commands->{"recommends"} ||
$commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"} ||
$commands->{"requires"} ||
$commands->{"changelog"} ||
$commands->{"m"} ||
$commands->{"menu"} ||
$commands->{"copyright"})
) {
if ( $dpkg_deb) { if ( $dpkg_deb) {
system "$dpkg_deb -f $argument Package > $tmp/temp.deb"; system "$dpkg_deb -f $argument Package > $tmp/temp.deb";
} }
elsif ( $ar) { elsif ( $ar) {
system "$ar -p $argument control.tar.gz | $tar Oxz |\ system "$ar -p $argument control.tar.gz | $tar Oxz |\
@ -1456,6 +1541,21 @@ sub deps {
} }
print "\n"; print "\n";
} }
if ($commands->{"enhances"}) {
if (!defined $title{$1}) {
print "$1\n";
}
$title{$1}++;
if ( $dpkg_deb) {
print "Enhances: ";
system "$dpkg_deb -f $argument Enhances";
}
elsif ( $ar) {
system "$ar -p $argument control.tar.gz |\
$tar xOz control | $grep \"Enhances: \w*\"";
}
print "\n";
}
if ($commands->{"provides"}) { if ($commands->{"provides"}) {
if (!defined $title{$1}) { if (!defined $title{$1}) {
print "$1\n"; print "$1\n";
@ -1511,6 +1611,8 @@ sub deps {
$cat $tmp/temp.deb >> $tmp/fields.deb;"; $cat $tmp/temp.deb >> $tmp/fields.deb;";
system "$dpkg_deb -f $argument Suggests 2&> $tmp/temp.deb; \ system "$dpkg_deb -f $argument Suggests 2&> $tmp/temp.deb; \
$cat $tmp/temp.deb >> $tmp/fields.deb;"; $cat $tmp/temp.deb >> $tmp/fields.deb;";
system "$dpkg_deb -f $argument Enhances 2&> $tmp/temp.deb; \
$cat $tmp/temp.deb >> $tmp/fields.deb;";
system "$dpkg_deb -f $argument Provides 2&> $tmp/temp.deb; \ system "$dpkg_deb -f $argument Provides 2&> $tmp/temp.deb; \
$cat $tmp/temp.deb >> $tmp/fields.deb;"; $cat $tmp/temp.deb >> $tmp/fields.deb;";
system "$dpkg_deb -f $argument Replaces 2&> $tmp/temp.deb; \ system "$dpkg_deb -f $argument Replaces 2&> $tmp/temp.deb; \
@ -1527,6 +1629,8 @@ sub deps {
$grep \"Recommends: \w*\" >> $tmp/fields.deb"; $grep \"Recommends: \w*\" >> $tmp/fields.deb";
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep \"Suggests: \w*\" >> $tmp/fields.deb"; $grep \"Suggests: \w*\" >> $tmp/fields.deb";
system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep \"Enhances: \w*\" >> $tmp/fields.deb";
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\
$grep \"Provides: \w*\" >> $tmp/fields.deb"; $grep \"Provides: \w*\" >> $tmp/fields.deb";
system "$ar -p $argument control.tar.gz | $tar xOz control |\ system "$ar -p $argument control.tar.gz | $tar xOz control |\

90
SWIM/Deps.pm

@ -116,6 +116,21 @@ sub suggests {
untie %db; untie %db;
} # end sub suggests } # end sub suggests
sub enhances {
my ($commands) = @_;
my %commands = %$commands;
!$commands->{"n"} ? dbi(\%commands) : ndb(\%commands);
if (defined $argument) {
my $conf = $argument . "ENH";
if (defined $db{$conf}) {
return $db{$conf};
}
else { return ""; }
}
untie %db;
} # end sub enhances
# process the database for replaces # process the database for replaces
sub conflicts { sub conflicts {
my ($commands) = @_; my ($commands) = @_;
@ -223,6 +238,20 @@ sub s_suggests {
untie %db; untie %db;
} # end sub s_suggests } # end sub s_suggests
sub s_enhances {
my ($commands) = @_;
my %commands = %$commands;
!$commands->{"n"} ? dbi(\%commands) : ndb(\%commands);
if (defined $argument) {
my $conf = $argument . "ENH";
if (defined $db{$conf}) {
return "$argument\n$db{$conf}";
}
else { return ""; }
}
untie %db;
} # end sub s_enhances
# process the database for replaces # process the database for replaces
sub s_conflicts { sub s_conflicts {
my ($commands) = @_; my ($commands) = @_;
@ -247,12 +276,25 @@ sub character {
my %commands = %$commands; my %commands = %$commands;
# for singular cases # for singular cases
if ($commands->{"g"} && ($commands->{"T"} || $commands->{"pre_depends"} || if (
$commands->{"depends"} || $commands->{"recommends"} || $commands->{"g"} &&
$commands->{"suggests"} || $commands->{"provides"} ||
$commands->{"replaces"} || $commands->{"conflicts"}) && ($commands->{"T"} ||
!($commands->{"c"} || $commands->{"d"} || $commands->{"l"} || $commands->{"pre_depends"} ||
$commands->{"i"})) { $commands->{"depends"} ||
$commands->{"recommends"} ||
$commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} ||
$commands->{"replaces"} ||
$commands->{"conflicts"}) &&
!($commands->{"c"} ||
$commands->{"d"} ||
$commands->{"l"} ||
$commands->{"i"})
) {
print "$argument\n"; print "$argument\n";
} }
@ -262,6 +304,7 @@ sub character {
print depends(\%commands); print depends(\%commands);
print recommends(\%commands); print recommends(\%commands);
print suggests(\%commands); print suggests(\%commands);
print enhances(\%commands);
print provides(\%commands); print provides(\%commands);
print replaces(\%commands); print replaces(\%commands);
print conflicts(\%commands); print conflicts(\%commands);
@ -288,6 +331,11 @@ sub character {
delete $commands{"suggests"} if !($commands->{"S"} || $commands->{"g"}); delete $commands{"suggests"} if !($commands->{"S"} || $commands->{"g"});
} }
if (defined $commands->{"enhances"}) {
print enhances(\%commands);
delete $commands{"enhances"} if !($commands->{"S"} || $commands->{"g"});
}
if (defined $commands->{"replaces"}) { if (defined $commands->{"replaces"}) {
print replaces(\%commands); print replaces(\%commands);
delete $commands{"replaces"} if !($commands->{"S"} || $commands->{"g"}); delete $commands{"replaces"} if !($commands->{"S"} || $commands->{"g"});
@ -342,6 +390,14 @@ sub s_character {
if (s_suggests(\%commands) ne "") { if (s_suggests(\%commands) ne "") {
character(\%commands); character(\%commands);
} }
# else { s_character(\%commands) }
}
elsif ($commands->{"enhances"}) {
print s_enhances(\%commands);
delete $commands{"enhances"};
if (s_enhances(\%commands) ne "") {
character(\%commands);
}
# else { s_character(\%commands) } # else { s_character(\%commands) }
} }
elsif ($commands->{"replaces"}) { elsif ($commands->{"replaces"}) {
@ -375,6 +431,7 @@ sub s_character {
print s_depends(\%commands); print s_depends(\%commands);
print s_recommends(\%commands); print s_recommends(\%commands);
print s_suggests(\%commands); print s_suggests(\%commands);
print s_enhances(\%commands);
print s_provides(\%commands); print s_provides(\%commands);
print s_replaces(\%commands); print s_replaces(\%commands);
print s_conflicts(\%commands); print s_conflicts(\%commands);
@ -387,10 +444,16 @@ sub s_character {
# helps to determine if character(\%commands) should be used # helps to determine if character(\%commands) should be used
sub which_character { sub which_character {
my ($commands) = @_; my ($commands) = @_;
if ($commands->{"pre_depends"} || $commands->{"depends"} || if (
$commands->{"recommends"} || $commands->{"suggests"} || $commands->{"pre_depends"} ||
$commands->{"replaces"} || $commands->{"provides"} || $commands->{"depends"} ||
$commands->{"conflicts"}) { $commands->{"recommends"} ||
$commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"replaces"} ||
$commands->{"provides"} ||
$commands->{"conflicts"}
) {
return 1; return 1;
} }
} # end sub which_character } # end sub which_character
@ -430,6 +493,13 @@ sub the_character {
else { return "ok"; } else { return "ok"; }
} }
if (defined $commands->{"enhances"}) {
if (enhances(\%commands) eq "") {
print "";
}
else { return "ok"; }
}
if (defined $commands->{"replaces"}) { if (defined $commands->{"replaces"}) {
if (replaces(\%commands) eq "") { if (replaces(\%commands) eq "") {
print ""; print "";

21
SWIM/NDB.pm

@ -668,7 +668,7 @@ alternative directory and --dbpath and/or --root used.
my (%exacts,@package,$essential,$version,$maintainer,$things, my (%exacts,@package,$essential,$version,$maintainer,$things,
$priority,%group,$group,$section); $priority,%group,$group,$section);
my ($pre_depends,$depends,$replaces,$provides,$recommends, my ($pre_depends,$depends,$replaces,$provides,$recommends,
$suggests, $conflicts, @REPLACE); $suggests, $enhances, $conflicts, @REPLACE);
my (@ldescription,@description,$installed_size,$source,$size,$status); my (@ldescription,@description,$installed_size,$source,$size,$status);
my $scount = 0; my $count = 0; my $scount = 0; my $count = 0;
undef %equalizer; undef %equalizer;
@ -771,6 +771,15 @@ alternative directory and --dbpath and/or --root used.
push(@REPLACE, $suggests); push(@REPLACE, $suggests);
} }
} }
elsif (/^Enhances:/) {
$enhances = $_;
if (defined($enhances)) {
my $vion = substr($version,9);
my $nv = "$package[1]" . "_" . "$vion" . "ENH";
push(@REPLACE, "$nv");
push(@REPLACE, $enhances);
}
}
elsif (/^Conflicts:/) { elsif (/^Conflicts:/) {
$conflicts = $_; $conflicts = $_;
if (defined($conflicts)) { if (defined($conflicts)) {
@ -866,6 +875,11 @@ alternative directory and --dbpath and/or --root used.
#pop(@REPLACE); pop(@REPLACE); #pop(@REPLACE); pop(@REPLACE);
undef $suggests; undef $suggests;
} }
if (defined $enhances) {
undef @REPLACE;
#pop(@REPLACE); pop(@REPLACE);
undef $enhances;
}
if (defined $conflicts) { if (defined $conflicts) {
undef @REPLACE; undef @REPLACE;
#pop(@REPLACE); pop(@REPLACE); #pop(@REPLACE); pop(@REPLACE);
@ -1052,6 +1066,11 @@ alternative directory and --dbpath and/or --root used.
#pop(@REPLACE); pop(@REPLACE); #pop(@REPLACE); pop(@REPLACE);
undef $suggests; undef $suggests;
} }
if (defined $enhances) {
undef @REPLACE;
#pop(@REPLACE); pop(@REPLACE);
undef $enhances;
}
if (defined $conflicts) { if (defined $conflicts) {
undef @REPLACE; undef @REPLACE;
#pop(@REPLACE); pop(@REPLACE); #pop(@REPLACE); pop(@REPLACE);

19
SWIM/NDB_Init.pm

@ -1034,7 +1034,7 @@ sub not_installed {
my $scount = 0; my $scount = 0;
my ($pre_depends, $depends, $replaces, $provides, $recommends, my ($pre_depends, $depends, $replaces, $provides, $recommends,
$suggests, $conflicts, @REPLACE); $suggests, $enhances, $conflicts, @REPLACE);
my @conffiles; my @conffiles;
my @conf; my @conf;
@ -1479,6 +1479,15 @@ sub not_installed {
push(@REPLACE, $suggests); push(@REPLACE, $suggests);
} }
} }
elsif (/^Enhances:/) {
$enhances = $_;
if (defined($enhances)) {
my $vion = substr($version,9);
my $nv = "$package[1]" . "_" . "$vion" . "ENH";
push(@REPLACE, "$nv");
push(@REPLACE, $enhances);
}
}
elsif (/^Conflicts:/) { elsif (/^Conflicts:/) {
$conflicts = $_; $conflicts = $_;
if (defined($conflicts)) { if (defined($conflicts)) {
@ -1570,6 +1579,10 @@ sub not_installed {
pop(@REPLACE); pop(@REPLACE); pop(@REPLACE); pop(@REPLACE);
undef $suggests; undef $suggests;
} }
if (defined $enhances) {
pop(@REPLACE); pop(@REPLACE);
undef $enhances;
}
if (defined $conflicts) { if (defined $conflicts) {
pop(@REPLACE); pop(@REPLACE); pop(@REPLACE); pop(@REPLACE);
undef $conflicts; undef $conflicts;
@ -1760,6 +1773,10 @@ sub not_installed {
pop(@REPLACE); pop(@REPLACE); pop(@REPLACE); pop(@REPLACE);
undef $suggests; undef $suggests;
} }
if (defined $enhances) {
pop(@REPLACE); pop(@REPLACE);
undef $enhances;
}
if (defined $conflicts) { if (defined $conflicts) {
pop(@REPLACE); pop(@REPLACE); pop(@REPLACE); pop(@REPLACE);
undef $conflicts; undef $conflicts;

4
SWIM/Pn_print.pm

@ -57,6 +57,7 @@ sub singular {
$commands->{"depends"} || $commands->{"depends"} ||
$commands->{"recommends"} || $commands->{"recommends"} ||
$commands->{"suggests"} || $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} || $commands->{"provides"} ||
$commands->{"replaces"} || $commands->{"replaces"} ||
$commands->{"conflicts"} || $commands->{"conflicts"} ||
@ -95,6 +96,7 @@ sub singular {
$commands->{"depends"} || $commands->{"depends"} ||
$commands->{"recommends"} || $commands->{"recommends"} ||
$commands->{"suggests"} || $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} || $commands->{"provides"} ||
$commands->{"replaces"} || $commands->{"replaces"} ||
$commands->{"conflicts"} || $commands->{"conflicts"} ||
@ -133,6 +135,7 @@ sub singular {
$commands->{"depends"} || $commands->{"depends"} ||
$commands->{"recommends"} || $commands->{"recommends"} ||
$commands->{"suggests"} || $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} || $commands->{"provides"} ||
$commands->{"replaces"} || $commands->{"replaces"} ||
$commands->{"conflicts"} || $commands->{"conflicts"} ||
@ -171,6 +174,7 @@ sub singular {
$commands->{"depends"} || $commands->{"depends"} ||
$commands->{"recommends"} || $commands->{"recommends"} ||
$commands->{"suggests"} || $commands->{"suggests"} ||
$commands->{"enhances"} ||
$commands->{"provides"} || $commands->{"provides"} ||
$commands->{"replaces"} || $commands->{"replaces"} ||
$commands->{"conflicts"} || $commands->{"conflicts"} ||

Loading…
Cancel
Save