summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-21 16:30:03 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-21 16:30:03 +0000
commit6209217b87298a88b2d183a8e3c877772f09b99c (patch)
tree9534cd1e7a5a876371e4b70a6e6b800a28c047c7 /urpm.pm
parentc9c5ea9a5fd441cf32f3ca072b4f226816aaa8d5 (diff)
downloadurpmi-6209217b87298a88b2d183a8e3c877772f09b99c.tar
urpmi-6209217b87298a88b2d183a8e3c877772f09b99c.tar.gz
urpmi-6209217b87298a88b2d183a8e3c877772f09b99c.tar.bz2
urpmi-6209217b87298a88b2d183a8e3c877772f09b99c.tar.xz
urpmi-6209217b87298a88b2d183a8e3c877772f09b99c.zip
*** empty log message ***
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index 65442cc4..dd19cf76 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -51,15 +51,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
=cut
use rpmtools;
+use POSIX;
+use Locale::GetText;
#- I18N.
-BEGIN {
- use POSIX;
- use Locale::GetText;
+setlocale (LC_ALL, "");
+Locale::GetText::textdomain ("urpmi");
- setlocale (LC_ALL, "");
- Locale::GetText::textdomain ("urpmi");
-}
sub _ {
my ($format, @params) = @_;
sprintf(Locale::GetText::I_($format), @params);
@@ -819,10 +817,11 @@ sub register_local_packages {
-r $_ or $error = 1, $urpm->{error}(_("unable to access rpm file [%s]", $_)), next;
my ($name) = $urpm->{params}->read_rpms($_);
- if ($name =~ /(.*)-([^-]*)-([^-]*)/) {
+ if ($name =~ /(.*)-([^-]*)-([^-]*)\.([^-\.]*)/) {
my $pkg = $urpm->{params}{info}{$1};
$pkg->{version} eq $2 or $urpm->{error}(_("mismatch version for registering rpm file")), next;
$pkg->{release} eq $3 or $urpm->{error}(_("mismatch release for registering rpm file")), next;
+ $pkg->{arch} eq $4 or $urpm->{error}(_("mismatch arch for registering rpm file")), next;
$pkg->{source} = $1 ? $_ : "./$_";
push @names, $name;
} else {