diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-07 09:16:49 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-07 09:16:49 +0000 |
commit | b5f8691b61a8ee13593be8c519c64da5ed0b3b65 (patch) | |
tree | 2234490fa1cdd98483d946b6309a34132fa93829 /urpm.pm | |
parent | b38dd65179ef18ba3db03fe72ea3e9852e9ca351 (diff) | |
download | urpmi-b5f8691b61a8ee13593be8c519c64da5ed0b3b65.tar urpmi-b5f8691b61a8ee13593be8c519c64da5ed0b3b65.tar.gz urpmi-b5f8691b61a8ee13593be8c519c64da5ed0b3b65.tar.bz2 urpmi-b5f8691b61a8ee13593be8c519c64da5ed0b3b65.tar.xz urpmi-b5f8691b61a8ee13593be8c519c64da5ed0b3b65.zip |
Check architecture of local packages too
Diffstat (limited to 'urpm.pm')
-rw-r--r-- | urpm.pm | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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} = $_; } } |