[Reproducible-commits] [dpkg] 81/105: Dpkg::Build::Types: Remove BUILD_SOURCE composite constants
Niko Tyni
ntyni at moszumanska.debian.org
Mon May 2 13:49:55 UTC 2016
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch ntyni/reproducible_builds
in repository dpkg.
commit 9c9fc468fe445bf7a531c89135bc06d66ced58dc
Author: Guillem Jover <guillem at debian.org>
Date: Sun May 1 16:06:31 2016 +0200
Dpkg::Build::Types: Remove BUILD_SOURCE composite constants
These are very specialized and not used often, let's compose them from
basic types when needed.
---
scripts/Dpkg/Build/Types.pm | 20 ++------------------
scripts/dpkg-buildpackage.pl | 4 ++--
scripts/dpkg-genchanges.pl | 4 ++--
scripts/t/Dpkg_Build_Types.t | 9 +++++----
4 files changed, 11 insertions(+), 26 deletions(-)
diff --git a/scripts/Dpkg/Build/Types.pm b/scripts/Dpkg/Build/Types.pm
index 2dda437..cbefefd 100644
--- a/scripts/Dpkg/Build/Types.pm
+++ b/scripts/Dpkg/Build/Types.pm
@@ -26,8 +26,6 @@ our @EXPORT = qw(
BUILD_ARCH_DEP
BUILD_ARCH_INDEP
BUILD_BINARY
- BUILD_SOURCE_DEP
- BUILD_SOURCE_INDEP
BUILD_FULL
build_has
build_has_not
@@ -78,14 +76,6 @@ This build includes architecture independent binary artifacts.
This build includes binary artifacts.
-=item BUILD_SOURCE_DEP
-
-This build includes source and architecture dependent binary artifacts.
-
-=item BUILD_SOURCE_INDEP
-
-This build includes source and architecture independent binary artifacts.
-
=item BUILD_FULL
This build includes source and binary artifacts.
@@ -101,14 +91,8 @@ use constant {
};
# Composed types.
-use constant {
- BUILD_BINARY => BUILD_ARCH_DEP | BUILD_ARCH_INDEP,
- BUILD_SOURCE_DEP => BUILD_SOURCE | BUILD_ARCH_DEP,
- BUILD_SOURCE_INDEP => BUILD_SOURCE | BUILD_ARCH_INDEP,
-};
-use constant {
- BUILD_FULL => BUILD_BINARY | BUILD_SOURCE,
-};
+use constant BUILD_BINARY => BUILD_ARCH_DEP | BUILD_ARCH_INDEP;
+use constant BUILD_FULL => BUILD_BINARY | BUILD_SOURCE;
my $current_type = BUILD_FULL | BUILD_DEFAULT;
my $current_option = undef;
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index e4b8180..cbfce1a 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -278,10 +278,10 @@ while (@ARGV) {
set_build_type(BUILD_SOURCE, $_);
push @changes_opts, '-S';
} elsif (/^-G$/) {
- set_build_type(BUILD_SOURCE_DEP, $_);
+ set_build_type(BUILD_SOURCE | BUILD_ARCH_DEP, $_);
push @changes_opts, '-G';
} elsif (/^-g$/) {
- set_build_type(BUILD_SOURCE_INDEP, $_);
+ set_build_type(BUILD_SOURCE | BUILD_ARCH_INDEP, $_);
push @changes_opts, '-g';
} elsif (/^-F$/) {
set_build_type(BUILD_FULL, $_);
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 09cdf5a..66c83f0 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -134,9 +134,9 @@ while (@ARGV) {
} elsif (m/^-S$/) {
set_build_type(BUILD_SOURCE, $_);
} elsif (m/^-G$/) {
- set_build_type(BUILD_SOURCE_DEP, $_);
+ set_build_type(BUILD_SOURCE | BUILD_ARCH_DEP, $_);
} elsif (m/^-g$/) {
- set_build_type(BUILD_SOURCE_INDEP, $_);
+ set_build_type(BUILD_SOURCE | BUILD_ARCH_INDEP, $_);
} elsif (m/^-s([iad])$/) {
$sourcestyle= $1;
} elsif (m/^-q$/) {
diff --git a/scripts/t/Dpkg_Build_Types.t b/scripts/t/Dpkg_Build_Types.t
index ad8bfa5..b3229f5 100644
--- a/scripts/t/Dpkg_Build_Types.t
+++ b/scripts/t/Dpkg_Build_Types.t
@@ -28,16 +28,17 @@ set_build_type(BUILD_DEFAULT | BUILD_BINARY, '--default-binary');
ok(build_is(BUILD_DEFAULT | BUILD_BINARY), 'build is default binary');
-set_build_type(BUILD_SOURCE_INDEP, '--source-indep');
+set_build_type(BUILD_SOURCE | BUILD_ARCH_INDEP, '--build=source,all');
-ok(build_is(BUILD_SOURCE_INDEP), 'build is source indep');
-ok(!build_is(BUILD_SOURCE_DEP), 'build is not source dep');
+ok(build_is(BUILD_SOURCE | BUILD_ARCH_INDEP), 'build source,all is source,all');
+ok(!build_is(BUILD_SOURCE | BUILD_ARCH_DEP), 'build source,all is not source,any');
ok(build_has(BUILD_SOURCE), 'build source indep has source');
ok(build_has(BUILD_ARCH_INDEP), 'build source indep has arch indep');
ok(build_has_not(BUILD_DEFAULT), 'build source indep has not default');
ok(build_has_not(BUILD_ARCH_DEP), 'build source indep has not arch dep');
ok(build_has_not(BUILD_BINARY), 'build source indep has not binary');
-ok(build_has_not(BUILD_SOURCE_DEP), 'build source indep has not source dep');
+ok(build_has_not(BUILD_SOURCE | BUILD_ARCH_DEP),
+ 'build source,all has_not source,any');
ok(build_has_not(BUILD_FULL), 'build source indep has not full');
1;
--
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