[dpkg] 158/192: scripts: Rename debarch_to_cpuattrs() to debarch_to_abiattrs()

Ximin Luo infinity0 at debian.org
Tue Oct 17 11:04:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository dpkg.

commit b9dd3e5dd385877c6c57157d47169f792aeff532
Author: Guillem Jover <guillem at debian.org>
Date:   Mon Sep 25 03:09:15 2017 +0200

    scripts: Rename debarch_to_cpuattrs() to debarch_to_abiattrs()
---
 scripts/Dpkg/Arch.pm          | 6 +++---
 scripts/Dpkg/Shlibs/Symbol.pm | 4 ++--
 scripts/dpkg-architecture.pl  | 8 ++++----
 scripts/t/Dpkg_Arch.t         | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm
index 3be9281..a805acf 100644
--- a/scripts/Dpkg/Arch.pm
+++ b/scripts/Dpkg/Arch.pm
@@ -49,7 +49,7 @@ our @EXPORT_OK = qw(
     debarch_is_wildcard
     debarch_is_illegal
     debarch_is_concerned
-    debarch_to_cpuattrs
+    debarch_to_abiattrs
     debarch_to_gnutriplet
     debarch_to_debtuple
     debarch_to_multiarch
@@ -74,7 +74,7 @@ our %EXPORT_TAGS = (
         debarch_list_parse
     ) ],
     mappers => [ qw(
-        debarch_to_cpuattrs
+        debarch_to_abiattrs
         debarch_to_gnutriplet
         debarch_to_debtuple
         debarch_to_multiarch
@@ -500,7 +500,7 @@ sub debwildcard_to_debtuple($)
     }
 }
 
-sub debarch_to_cpuattrs($)
+sub debarch_to_abiattrs($)
 {
     my $arch = shift;
     my ($abi, $libc, $os, $cpu) = debarch_to_debtuple($arch);
diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm
index 6093e24..802681b 100644
--- a/scripts/Dpkg/Shlibs/Symbol.pm
+++ b/scripts/Dpkg/Shlibs/Symbol.pm
@@ -26,7 +26,7 @@ use List::Util qw(any);
 
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
-use Dpkg::Arch qw(debarch_is_concerned debarch_to_cpuattrs);
+use Dpkg::Arch qw(debarch_is_concerned debarch_to_abiattrs);
 use Dpkg::Version;
 use Dpkg::Shlibs::Cppfilt;
 
@@ -298,7 +298,7 @@ sub arch_is_concerned {
     return 0 if defined $arch && defined $arches &&
                 !debarch_is_concerned($arch, split /[\s,]+/, $arches);
 
-    my ($bits, $endian) = debarch_to_cpuattrs($arch);
+    my ($bits, $endian) = debarch_to_abiattrs($arch);
     return 0 if defined $bits && defined $self->{tags}{'arch-bits'} &&
                 $bits ne $self->{tags}{'arch-bits'};
     return 0 if defined $endian && defined $self->{tags}{'arch-endian'} &&
diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl
index aa77ea4..be99240 100755
--- a/scripts/dpkg-architecture.pl
+++ b/scripts/dpkg-architecture.pl
@@ -244,7 +244,7 @@ $v{DEB_BUILD_ARCH} = get_raw_build_arch()
 ($v{DEB_BUILD_ARCH_ABI}, $v{DEB_BUILD_ARCH_LIBC},
  $v{DEB_BUILD_ARCH_OS}, $v{DEB_BUILD_ARCH_CPU}) = debarch_to_debtuple($v{DEB_BUILD_ARCH})
     if (action_needs(DEB_BUILD | DEB_ARCH_INFO));
-($v{DEB_BUILD_ARCH_BITS}, $v{DEB_BUILD_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_BUILD_ARCH})
+($v{DEB_BUILD_ARCH_BITS}, $v{DEB_BUILD_ARCH_ENDIAN}) = debarch_to_abiattrs($v{DEB_BUILD_ARCH})
     if (action_needs(DEB_BUILD | DEB_ARCH_ATTR));
 
 $v{DEB_BUILD_MULTIARCH} = debarch_to_multiarch($v{DEB_BUILD_ARCH})
@@ -270,7 +270,7 @@ $v{DEB_HOST_ARCH} = $req_host_arch || get_raw_host_arch()
 ($v{DEB_HOST_ARCH_ABI}, $v{DEB_HOST_ARCH_LIBC},
  $v{DEB_HOST_ARCH_OS}, $v{DEB_HOST_ARCH_CPU}) = debarch_to_debtuple($v{DEB_HOST_ARCH})
     if (action_needs(DEB_HOST | DEB_ARCH_INFO));
-($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_HOST_ARCH})
+($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIAN}) = debarch_to_abiattrs($v{DEB_HOST_ARCH})
     if (action_needs(DEB_HOST | DEB_ARCH_ATTR));
 
 $v{DEB_HOST_MULTIARCH} = debarch_to_multiarch($v{DEB_HOST_ARCH})
@@ -307,7 +307,7 @@ $v{DEB_TARGET_ARCH} = $req_target_arch || $req_host_arch || get_raw_host_arch()
 ($v{DEB_TARGET_ARCH_ABI}, $v{DEB_TARGET_ARCH_LIBC},
  $v{DEB_TARGET_ARCH_OS}, $v{DEB_TARGET_ARCH_CPU}) = debarch_to_debtuple($v{DEB_TARGET_ARCH})
     if (action_needs(DEB_TARGET | DEB_ARCH_INFO));
-($v{DEB_TARGET_ARCH_BITS}, $v{DEB_TARGET_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_TARGET_ARCH})
+($v{DEB_TARGET_ARCH_BITS}, $v{DEB_TARGET_ARCH_ENDIAN}) = debarch_to_abiattrs($v{DEB_TARGET_ARCH})
     if (action_needs(DEB_TARGET | DEB_ARCH_ATTR));
 
 $v{DEB_TARGET_MULTIARCH} = debarch_to_multiarch($v{DEB_TARGET_ARCH})
@@ -349,7 +349,7 @@ if ($action eq 'list') {
     print "$v{$req_variable_to_print}\n";
 } elsif ($action eq 'list-known') {
     foreach my $arch (get_valid_arches()) {
-        my ($bits, $endian) = debarch_to_cpuattrs($arch);
+        my ($bits, $endian) = debarch_to_abiattrs($arch);
 
         next if $req_match_endian and $endian ne $req_match_endian;
         next if $req_match_bits and $bits ne $req_match_bits;
diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t
index d478b49..5258170 100644
--- a/scripts/t/Dpkg_Arch.t
+++ b/scripts/t/Dpkg_Arch.t
@@ -21,7 +21,7 @@ use Test::More tests => 16367;
 use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch
                         debarch_eq debarch_is debarch_is_wildcard
                         debarch_is_illegal
-                        debarch_to_cpuattrs
+                        debarch_to_abiattrs
                         debarch_list_parse
                         debtuple_to_debarch gnutriplet_to_debarch
                         get_host_gnu_type
@@ -151,8 +151,8 @@ is_deeply(\@arch_new, \@arch_ref, 'parse valid arch list');
 eval { @arch_new = debarch_list_parse('!amd64!arm64') };
 ok($@, 'parse concatenated arches failed');
 
-is(debarch_to_cpuattrs(undef), undef, 'undef cpu attrs');
-is_deeply([ debarch_to_cpuattrs('amd64') ], [ qw(64 little) ], 'amd64 cpu attrs');
+is(debarch_to_abiattrs(undef), undef, 'undef ABI attrs');
+is_deeply([ debarch_to_abiattrs('amd64') ], [ qw(64 little) ], 'amd64 ABI attrs');
 
 is(debtuple_to_debarch(undef, undef, undef, undef), undef, 'undef debtuple');
 is(debtuple_to_debarch('base', 'gnu', 'linux', 'amd64'), 'amd64', 'known debtuple');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list