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

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=fb1f1507ed399c3efcdc0594f7def7deb40232f3

commit fb1f1507ed399c3efcdc0594f7def7deb40232f3
Author: Guillem Jover <[email protected]>
AuthorDate: Thu Nov 7 01:51:15 2024 +0100

    dpkg-deb: Add --no-check option and keep --nocheck as an alias
    
    The preferred form will be --no-check. For now we keep the alias but
    will start to phase it out. This unifies the option name in line with
    the other --no-<thing> options in the codebase.
---
 man/dpkg-deb.pod                              | 12 +++++++++---
 src/deb/main.c                                |  5 +++--
 tests/t-conffile-declarative-removal/Makefile |  2 +-
 tests/t-control-bogus/Makefile                | 10 +++++-----
 tests/t-control-no-arch/Makefile              |  2 +-
 tests/t-multiarch/Makefile                    |  2 +-
 tests/t-provides/Makefile                     |  2 +-
 7 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/man/dpkg-deb.pod b/man/dpkg-deb.pod
index 2a8603cc4..0478cff6f 100644
--- a/man/dpkg-deb.pod
+++ b/man/dpkg-deb.pod
@@ -74,7 +74,7 @@ the files in it will be put in the binary package's control
 information area.
 
 Unless you specify
-B<--nocheck>, B<dpkg-deb>
+B<--no-check>, B<dpkg-deb>
 will read
 B<DEBIAN/control>
 and parse it.
@@ -100,7 +100,7 @@ B<dpkg-deb>
 will write to the file
 I<directory>B</>I<package>B<_>I<version>B<_>I<arch>B<.deb.>
 When a target directory is specified, rather than a file, the
-B<--nocheck>
+B<--no-check>
 option may not be used (since
 B<dpkg-deb>
 needs to read and parse the package control file to determine which
@@ -330,7 +330,7 @@ now obsolete; its only use is when building packages to be 
parsed by
 versions of dpkg older than 0.93.76 (September 1995), which was released
 as i386 a.out only.
 
-=item B<--nocheck>
+=item B<--no-check>
 
 Inhibits
 B<dpkg-deb --build>'s
@@ -338,6 +338,12 @@ usual checks on the proposed contents of an archive.
 You can build
 any archive you want, no matter how broken, this way.
 
+Option supported since dpkg 1.22.12.
+
+=item B<--nocheck>
+
+This is an alias for B<--no-check>.
+
 =item B<-v>, B<--verbose>
 
 Enables verbose output (since dpkg 1.16.1).
diff --git a/src/deb/main.c b/src/deb/main.c
index 6d706b3f8..af8c644d3 100644
--- a/src/deb/main.c
+++ b/src/deb/main.c
@@ -102,8 +102,8 @@ usage(const char *const *argv)
 "      --showformat=<format>        Use alternative format for --show.\n"
 "      --deb-format=<format>        Select archive format.\n"
 "                                     Allowed values: 0.939000, 2.0 
(default).\n"
-"      --nocheck                    Suppress control file check (build bad\n"
-"                                     packages).\n"
+"      --no-check                   Suppress all checks (build bad 
packages).\n"
+"      --nocheck                    Alias for --no-check.\n"
 "      --root-owner-group           Forces the owner and groups to root.\n"
 "      --threads-max=<threads>      Use at most <threads> with compressor.\n"
 "      --[no-]uniform-compression   Use the compression params on all 
members.\n"
@@ -267,6 +267,7 @@ static const struct cmdinfo cmdinfos[]= {
   { "debug",         'D', 0, &opt_debug,     NULL,         NULL,          1 },
   { "verbose",       'v', 0, &opt_verbose,   NULL,         NULL,          1 },
   { "nocheck",       0,   0, &opt_check,     NULL,         NULL,          0 },
+  { "no-check",      0,   0, &opt_check,     NULL,         NULL,          0 },
   { "root-owner-group",    0, 0, &opt_root_owner_group,    NULL, NULL,    1 },
   { "threads-max",   0,   1, NULL,           NULL,         set_threads_max  },
   { "uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL,    1 },
diff --git a/tests/t-conffile-declarative-removal/Makefile 
b/tests/t-conffile-declarative-removal/Makefile
index 0d0e77b86..679d06892 100644
--- a/tests/t-conffile-declarative-removal/Makefile
+++ b/tests/t-conffile-declarative-removal/Makefile
@@ -13,7 +13,7 @@ clean-hook:
 
 test-case:
        # Conffile marked for removal but present, cannot be installed.
-       $(DPKG_BUILD_DEB) --nocheck pkg-conffile-removal-present
+       $(DPKG_BUILD_DEB) --no-check pkg-conffile-removal-present
        ! $(DPKG_INSTALL) pkg-conffile-removal-present.deb
        $(call pkg_is_not_installed,pkg-conffile-removal-present)
        $(DPKG_PURGE) pkg-conffile-removal-present
diff --git a/tests/t-control-bogus/Makefile b/tests/t-control-bogus/Makefile
index ec042ddbe..2bd4ca204 100644
--- a/tests/t-control-bogus/Makefile
+++ b/tests/t-control-bogus/Makefile
@@ -9,11 +9,11 @@ test-case:
        ! $(DPKG_BUILD_DEB) pkg-bogus-format-string
        
        # build bogus packages
-       $(DPKG_BUILD_DEB) --nocheck pkg-bogus-colon
-       $(DPKG_BUILD_DEB) --nocheck pkg-bogus-blank
-       $(DPKG_BUILD_DEB) --nocheck pkg-bogus-fieldname-empty
-       $(DPKG_BUILD_DEB) --nocheck pkg-bogus-fieldname-partial
-       $(DPKG_BUILD_DEB) --nocheck pkg-bogus-format-string
+       $(DPKG_BUILD_DEB) --no-check pkg-bogus-colon
+       $(DPKG_BUILD_DEB) --no-check pkg-bogus-blank
+       $(DPKG_BUILD_DEB) --no-check pkg-bogus-fieldname-empty
+       $(DPKG_BUILD_DEB) --no-check pkg-bogus-fieldname-partial
+       $(DPKG_BUILD_DEB) --no-check pkg-bogus-format-string
        
        # test installing packages with bogus control files
        ! $(DPKG_INSTALL) pkg-bogus-colon.deb
diff --git a/tests/t-control-no-arch/Makefile b/tests/t-control-no-arch/Makefile
index 48b79fd67..e95052aa4 100644
--- a/tests/t-control-no-arch/Makefile
+++ b/tests/t-control-no-arch/Makefile
@@ -5,7 +5,7 @@ test-case:
        ! $(DPKG_BUILD_DEB) pkg-no-arch
 
        # build bogus packages
-       $(DPKG_BUILD_DEB) --nocheck pkg-no-arch
+       $(DPKG_BUILD_DEB) --no-check pkg-no-arch
 
        # test handling of package without the Architecture field
        ! $(DPKG_INSTALL) pkg-no-arch.deb
diff --git a/tests/t-multiarch/Makefile b/tests/t-multiarch/Makefile
index 31449437b..dd6aa4e25 100644
--- a/tests/t-multiarch/Makefile
+++ b/tests/t-multiarch/Makefile
@@ -36,7 +36,7 @@ pkg-ma-$(1):: pkg-template
        touch pkg-ma-$(1)
 
 pkg-ma-$(1).deb: pkg-ma-$(1)
-       $(DPKG_BUILD_DEB) --nocheck pkg-ma-$(1) pkg-ma-$(1).deb
+       $(DPKG_BUILD_DEB) --no-check pkg-ma-$(1) pkg-ma-$(1).deb
 
 clean-hook::
        rm -rf pkg-ma-$(1)
diff --git a/tests/t-provides/Makefile b/tests/t-provides/Makefile
index 76e30734c..9439f60d8 100644
--- a/tests/t-provides/Makefile
+++ b/tests/t-provides/Makefile
@@ -13,7 +13,7 @@ test-bogus:
        ! $(DPKG_BUILD_DEB) pkg-provides-bogus
 
        # build bogus packages
-       $(DPKG_BUILD_DEB) --nocheck pkg-provides-bogus
+       $(DPKG_BUILD_DEB) --no-check pkg-provides-bogus
 
        # test installing packages with bogus provides
        ! $(DPKG_INSTALL) pkg-provides-bogus.deb

-- 
Dpkg.Org's dpkg

Reply via email to