소스 검색

Dpkg::Arch: Support debarch_to_debtuple returning a hash references

Guillem Jover 11 년 전
부모
커밋
15f36bee2a
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      scripts/Dpkg/Arch.pm

+ 8 - 1
scripts/Dpkg/Arch.pm

@@ -405,7 +405,14 @@ sub debarch_to_debtuple($)
     my $tuple = $debarch_to_debtuple{$arch};
     my $tuple = $debarch_to_debtuple{$arch};
 
 
     if (defined($tuple)) {
     if (defined($tuple)) {
-	return split(/-/, $tuple, 4);
+        my @tuple = split /-/, $tuple, 4;
+        return @tuple if wantarray;
+        return {
+            abi => $tuple[0],
+            libc => $tuple[1],
+            os => $tuple[2],
+            cpu => $tuple[3],
+        };
     } else {
     } else {
 	return;
 	return;
     }
     }