From b5f8691b61a8ee13593be8c519c64da5ed0b3b65 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 7 Mar 2006 09:16:49 +0000 Subject: Check architecture of local packages too --- urpm.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'urpm.pm') diff --git a/urpm.pm b/urpm.pm index 08be603a..d51163b3 100644 --- a/urpm.pm +++ b/urpm.pm @@ -2099,7 +2099,7 @@ sub register_rpms { foreach (@files) { /\.(?:rpm|spec)$/ or $error = 1, $urpm->{error}(N("invalid rpm file name [%s]", $_)), next; - #- allow url to be given. + #- if that's an URL, download. if (my ($basename) = m{^[^:]*:/.*/([^/]*\.(?:rpm|spec))\z}) { unlink "$urpm->{cachedir}/partial/$basename"; eval { @@ -2134,9 +2134,11 @@ sub register_rpms { $pkg->set_id($id); $urpm->{source}{$id} = $_; } else { - ($id, undef) = $urpm->parse_rpm($_); + ($id) = $urpm->parse_rpm($_); my $pkg = defined $id && $urpm->{depslist}[$id]; $pkg or $error = 1, $urpm->{error}(N("unable to register rpm file")), next; + $pkg->is_arch_compat() + or $error = 1, $urpm->{error}(N("Incompatible architecture for rpm [%s]", $_)), next; $urpm->{source}{$id} = $_; } } -- cgit v1.2.1