From: y0169.zhang Date: Fri, 4 Aug 2017 02:14:14 +0000 (+0800) Subject: Fix build error with --baselibs option X-Git-Tag: submit/devel/20190730.074511~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ca1683a07b8562bdcfc42bf7152cd7af20e2663;p=tools%2Fdepanneur.git Fix build error with --baselibs option Change-Id: I0a9ecdc5e2c461b00c722e63479045ec2b69714d Signed-off-by: Jun Wang --- diff --git a/depanneur b/depanneur index 153cba2..f2adc59 100755 --- a/depanneur +++ b/depanneur @@ -1801,14 +1801,15 @@ sub update_repo_with_rpms { # $2: list of package full path my ($ref_hash, @pkgs) = @_; foreach my $pkg (@pkgs) { - my ($name, $version, $release) = get_pkg_info $pkg; + my ($name, $version, $release, $arch) = get_pkg_info $pkg; next if $name eq ''; - if (exists $ref_hash->{$name}) { - foreach (@{$ref_hash->{$name}}) { + my $na = "$name$arch"; + if (exists $ref_hash->{$na}) { + foreach (@{$ref_hash->{$na}}) { my_system("rm -rf $_"); } } - $ref_hash->{$name} = [$pkg]; + $ref_hash->{$na} = [$pkg]; } } @@ -2554,12 +2555,13 @@ for(my $i = 0; $i < $MAX_THREADS; $i++) { # scan local repo for my $pkg (bsd_glob "$rpm_repo_path/*.rpm") { - my ($name, $version, $release) = get_pkg_info $pkg; + my ($name, $version, $release, $arch) = get_pkg_info $pkg; next if $name eq ''; - if (exists $rpmpaths{$name}) { - push @{$rpmpaths{$name}}, $pkg; + my $na = "$name$arch"; + if (exists $rpmpaths{$na}) { + push @{$rpmpaths{$na}}, $pkg; } else { - $rpmpaths{$name} = [$pkg]; + $rpmpaths{$na} = [$pkg]; } } for my $pkg (bsd_glob "$srpm_repo_path/*.rpm") {