--- /usr/bin/epm 2003-04-19 23:47:32.000000000 +0100 +++ epm 2003-04-20 16:06:51.000000000 +0100 @@ -404,12 +404,18 @@ # must have been populated by, for instance, -qf } else { - for my $a (@ARGV) { + USERARG: for my $a (@ARGV) { if ($a =~ /$pkgregex/o) { verb "$a matches pkgregex"; vverb "name=$1, version=$2, suffix=$3, revision=$4"; - push @pkgs, $a; - next; + # user has asked for specific version, check if any installed version matches + for my $pver (@{$dnampkg{$1}}) { + vverb "found version: $pver"; + if ($pver eq $a) { + push @pkgs, $a; + next USERARG; + } + } } if (defined $dnampkg{$a}) { verb "$a found in dnampkg";