diff options
author | Guillem Jover <guillem@debian.org> | 2016-05-01 16:06:31 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2016-05-02 04:03:19 +0200 |
commit | 9c9fc468fe445bf7a531c89135bc06d66ced58dc (patch) | |
tree | 22d684a19ccf301e4ab34ec83d28354165be7f68 /scripts | |
parent | e0c33c729c395dd8592c91723065d723246dab31 (diff) | |
download | dpkg-9c9fc468fe445bf7a531c89135bc06d66ced58dc.tar.gz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dpkg/Build/Types.pm | 20 | ||||
-rwxr-xr-x | scripts/dpkg-buildpackage.pl | 4 | ||||
-rwxr-xr-x | scripts/dpkg-genchanges.pl | 4 | ||||
-rw-r--r-- | 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 2dda43780..cbefefd49 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 e4b818061..cbfce1a7c 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 09cdf5aad..66c83f030 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 ad8bfa5fc..b3229f5f8 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; |