Package: dpkg-repack
Version: 1.50
Severity: wishlist
Tags: patch
Usertags: usability

People currently unfamiliar with the dpkg-deb interface might get
confounded when using the --generate option, since they need to run
dpkg-deb after modifying the generated directory, but they don't know
the dpkg-deb interface or forgot how to use it. They might look at the
dpkg-repack --help output, but that is missing the relevant command.
They might look at the manual page, but that requires a context switch.

The most useful place would be the --generate output, but they might
appreciate knowing about the command up-front from the --help output.

The attached patch implements both of these two suggestions.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
From 86b65c6119e617c6750d00a0d9c43d770fef8fb7 Mon Sep 17 00:00:00 2001
From: Paul Wise <p...@debian.org>
Date: Tue, 20 Sep 2022 07:12:28 +0800
Subject: [dpkg-repack] [PATCH] Show the command to rebuild the .deb in more
 places

Currently it is documented in the manual page, so add hints to
the help output and the output from the --generate option.

Users who are unfamiliar with dpkg-deb will appreciate the hints.
---
 dpkg-repack.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dpkg-repack.pl b/dpkg-repack.pl
index 5fd2877..f001779 100755
--- a/dpkg-repack.pl
+++ b/dpkg-repack.pl
@@ -51,6 +51,7 @@ Options:
       --root=<dir>      Take package from filesystem rooted on <dir>.
       --arch=<arch>     Force the package to be built for architecture <arch>.
       --generate        Generate build directory but do not build deb.
+                        Build with: dpkg-deb --build dpkg-repack.../ .
       --tag=<type>      Tag the package as being repackaged.
                           Types: none, description, version, all.
   -d, --deb-option=<option>
@@ -313,11 +314,13 @@ sub Archive_Package {
     Install_DEBIAN($pkgname, $build_dir, $inst, @conffiles);
 
     # Do we need to create the binary packages?
+    my @cmd = ('dpkg-deb', @deb_options, '--build', $build_dir, '.');
     if ($generate) {
         info("created $build_dir for $pkgname");
+        info("build with: @cmd");
     } else {
         # Let dpkg-deb do its magic.
-        SafeSystem('dpkg-deb', @deb_options, '--build', $build_dir, '.');
+        SafeSystem(@cmd);
     }
 }
 
-- 
2.37.2

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to