summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-07 09:16:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-07 09:16:49 +0000
commitb5f8691b61a8ee13593be8c519c64da5ed0b3b65 (patch)
tree2234490fa1cdd98483d946b6309a34132fa93829 /urpm.pm
parentb38dd65179ef18ba3db03fe72ea3e9852e9ca351 (diff)
downloadurpmi-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.pm6
1 files changed, 4 insertions, 2 deletions
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} = $_;
}
}