Author: guillem
Date: 2007-05-12 16:46:33 +0000 (Sat, 12 May 2007)
New Revision: 766
Modified:
trunk/ChangeLog
trunk/scripts/controllib.pl
trunk/scripts/dpkg-architecture.pl
trunk/scripts/dpkg-genchanges.pl
trunk/scripts/dpkg-gencontrol.pl
trunk/scripts/dpkg-source.pl
Log:
* scripts/controllib.pl (debian_arch_eq): Rename to ...
(debarch_eq): ... this. Add prototype. Fix all callers.
(debian_arch_is): Rename to ...
(debarch_is): ... this. Add prototype. Fix all callers.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/ChangeLog 2007-05-12 16:46:33 UTC (rev 766)
@@ -1,5 +1,12 @@
2007-05-11 Guillem Jover <[EMAIL PROTECTED]>
+ * scripts/controllib.pl (debian_arch_eq): Rename to ...
+ (debarch_eq): ... this. Add prototype. Fix all callers.
+ (debian_arch_is): Rename to ...
+ (debarch_is): ... this. Add prototype. Fix all callers.
+
+2007-05-11 Guillem Jover <[EMAIL PROTECTED]>
+
* scripts/update-alternatives.pl ($manual): Rename to ...
($mode): ... this. Fix all users.
(read_link_group): Change gl() name from 'manflag' to 'update_mode',
Modified: trunk/scripts/controllib.pl
===================================================================
--- trunk/scripts/controllib.pl 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/scripts/controllib.pl 2007-05-12 16:46:33 UTC (rev 766)
@@ -271,7 +271,8 @@
}
}
-sub debian_arch_eq {
+sub debarch_eq($$)
+{
my ($a, $b) = @_;
my ($a_abi, $a_os, $a_cpu) = debarch_to_debtriplet($a);
my ($b_abi, $b_os, $b_cpu) = debarch_to_debtriplet($b);
@@ -279,7 +280,8 @@
return ("$a_abi-$a_os-$a_cpu" eq "$b_abi-$b_os-$b_cpu");
}
-sub debian_arch_is {
+sub debarch_is($$)
+{
my ($real, $alias) = @_;
my ($real_abi, $real_os, $real_cpu) = debarch_to_debtriplet($real);
my ($alias_abi, $alias_os, $alias_cpu) = debarch_to_debtriplet($alias);
@@ -449,7 +451,7 @@
my $not_arch;
($not_arch = $arch) =~ s/^!//;
- if (debian_arch_is($host_arch, $not_arch)) {
+ if (debarch_is($host_arch, $not_arch)) {
next ALTERNATE;
} else {
# This is equivilant to
@@ -458,7 +460,7 @@
# is also listed..
$seen_arch=1;
}
- } elsif (debian_arch_is($host_arch, $arch)) {
+ } elsif (debarch_is($host_arch, $arch)) {
$seen_arch=1;
next;
}
Modified: trunk/scripts/dpkg-architecture.pl
===================================================================
--- trunk/scripts/dpkg-architecture.pl 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/scripts/dpkg-architecture.pl 2007-05-12 16:46:33 UTC (rev 766)
@@ -234,9 +234,9 @@
} elsif ($action eq 'u') {
print "unset ".join(" ",@ordered)."\n";
} elsif ($action eq 'e') {
- exit !debian_arch_eq($deb_host_arch, $req_eq_arch);
+ exit !debarch_eq($deb_host_arch, $req_eq_arch);
} elsif ($action eq 'i') {
- exit !debian_arch_is($deb_host_arch, $req_is_arch);
+ exit !debarch_is($deb_host_arch, $req_is_arch);
} elsif ($action eq 'c') {
@ENV{keys %env} = values %env;
exec @ARGV;
Modified: trunk/scripts/dpkg-genchanges.pl
===================================================================
--- trunk/scripts/dpkg-genchanges.pl 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/scripts/dpkg-genchanges.pl 2007-05-12 16:46:33 UTC (rev 766)
@@ -221,9 +221,9 @@
my $host_arch = get_host_arch();
if (!defined($p2f{$p}) && not $sourceonly) {
- if ((debian_arch_eq('all', $a) && !$archspecific) ||
- debian_arch_is($host_arch, $a) ||
- grep(debian_arch_is($host_arch, $_), split(/\s+/, $a))) {
+ if ((debarch_eq('all', $a) && !$archspecific) ||
+ debarch_is($host_arch, $a) ||
+ grep(debarch_is($host_arch, $_), split(/\s+/, $a))) {
warning(sprintf(_g("package %s in control file but not in files
list"), $p));
next;
}
@@ -246,10 +246,10 @@
$f{$_}= $v;
} elsif (m/^Architecture$/) {
if (not $sourceonly) {
- if (debian_arch_is($host_arch, $v) ||
- grep(debian_arch_is($host_arch, $_), split(/\s+/, $v)))
{
+ if (debarch_is($host_arch, $v) ||
+ grep(debarch_is($host_arch, $_), split(/\s+/, $v))) {
$v = $host_arch;
- } elsif (!debian_arch_eq('all', $v)) {
+ } elsif (!debarch_eq('all', $v)) {
$v= '';
}
} else {
@@ -396,7 +396,7 @@
my %filedone;
for my $f (@sourcefiles, @fileslistfiles) {
- next if ($archspecific && debian_arch_eq('all', $p2arch{$f2p{$f}}));
+ next if ($archspecific && debarch_eq('all', $p2arch{$f2p{$f}}));
next if $filedone{$f}++;
my $uf = "$uploadfilesdir/$f";
open(STDIN,"< $uf") || &syserr(sprintf(_g("cannot open upload file %s for
reading"), $uf));
Modified: trunk/scripts/dpkg-gencontrol.pl
===================================================================
--- trunk/scripts/dpkg-gencontrol.pl 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/scripts/dpkg-gencontrol.pl 2007-05-12 16:46:33 UTC (rev 766)
@@ -169,9 +169,9 @@
} elsif (m/^Architecture$/) {
my $host_arch = get_host_arch();
- if (debian_arch_eq('all', $v)) {
+ if (debarch_eq('all', $v)) {
$f{$_}= $v;
- } elsif (debian_arch_is($host_arch, $v)) {
+ } elsif (debarch_is($host_arch, $v)) {
$f{$_} = $host_arch;
} else {
my @archlist = split(/\s+/, $v);
@@ -182,7 +182,7 @@
scalar(@invalid_archs)),
join("' `", @invalid_archs)))
if @invalid_archs >= 1;
- grep(debian_arch_is($host_arch, $_), @archlist) ||
+ grep(debarch_is($host_arch, $_), @archlist) ||
&error(sprintf(_g("current build architecture %s does not".
" appear in package's list (%s)"),
$host_arch, "@archlist"));
@@ -301,8 +301,8 @@
chomp;
next if m/^([-+0-9a-z.]+)_[^_]+_([\w-]+)\.deb /
&& ($1 eq $oppackage)
- && (debian_arch_eq($2, $f{'Architecture'})
- || debian_arch_eq($2, 'all'));
+ && (debarch_eq($2, $f{'Architecture'})
+ || debarch_eq($2, 'all'));
print(Y "$_\n") || &syserr(_g("copy old entry to new files list
file"));
}
close(X) || &syserr(_g("close old files list file"));
Modified: trunk/scripts/dpkg-source.pl
===================================================================
--- trunk/scripts/dpkg-source.pl 2007-05-12 16:38:48 UTC (rev 765)
+++ trunk/scripts/dpkg-source.pl 2007-05-12 16:46:33 UTC (rev 766)
@@ -255,9 +255,9 @@
my $p = $fi{"C$i Package"};
push(@binarypackages,$p) unless $packageadded{$p}++;
if (m/^Architecture$/) {
- if (debian_arch_eq($v, 'any')) {
+ if (debarch_eq($v, 'any')) {
@sourcearch= ('any');
- } elsif (debian_arch_eq($v, 'all')) {
+ } elsif (debarch_eq($v, 'all')) {
if ([EMAIL PROTECTED] || $sourcearch[0] eq 'all') {
@sourcearch= ('all');
} else {
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]