summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/at/package.m44
-rwxr-xr-xsrc/at/testsuite10
-rw-r--r--src/deb/info.c51
-rw-r--r--src/deb/main.c13
4 files changed, 39 insertions, 39 deletions
diff --git a/src/at/package.m4 b/src/at/package.m4
index 9d9057d..332b908 100644
--- a/src/at/package.m4
+++ b/src/at/package.m4
@@ -1,7 +1,7 @@
# Signature of the current package.
m4_define([AT_PACKAGE_NAME], [dpkg])
m4_define([AT_PACKAGE_TARNAME], [dpkg])
-m4_define([AT_PACKAGE_VERSION], [1.22.8])
-m4_define([AT_PACKAGE_STRING], [dpkg 1.22.8])
+m4_define([AT_PACKAGE_VERSION], [1.22.9])
+m4_define([AT_PACKAGE_STRING], [dpkg 1.22.9])
m4_define([AT_PACKAGE_URL], [https://wiki.debian.org/Teams/Dpkg])
m4_define([AT_PACKAGE_BUGREPORT], [debian-dpkg@lists.debian.org])
diff --git a/src/at/testsuite b/src/at/testsuite
index ceb5513..ef19fbd 100755
--- a/src/at/testsuite
+++ b/src/at/testsuite
@@ -1000,7 +1000,7 @@ fi
# List of tests.
if $at_list_p; then
cat <<_ATEOF || at_write_fail=1
-dpkg 1.22.8 test suite: dpkg tools functional test suite test groups:
+dpkg 1.22.9 test suite: dpkg tools functional test suite test groups:
NUM: FILE-NAME:LINE TEST-GROUP-NAME
KEYWORDS
@@ -1041,7 +1041,7 @@ _ATEOF
exit $at_write_fail
fi
if $at_version_p; then
- printf "%s\n" "$as_me (dpkg 1.22.8)" &&
+ printf "%s\n" "$as_me (dpkg 1.22.9)" &&
cat <<\_ATEOF || at_write_fail=1
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1241,11 +1241,11 @@ exec 5>>"$at_suite_log"
# Banners and logs.
printf "%s\n" "## --------------------------------------------------------- ##
-## dpkg 1.22.8 test suite: dpkg tools functional test suite. ##
+## dpkg 1.22.9 test suite: dpkg tools functional test suite. ##
## --------------------------------------------------------- ##"
{
printf "%s\n" "## --------------------------------------------------------- ##
-## dpkg 1.22.8 test suite: dpkg tools functional test suite. ##
+## dpkg 1.22.9 test suite: dpkg tools functional test suite. ##
## --------------------------------------------------------- ##"
echo
@@ -2105,7 +2105,7 @@ _ASBOX
printf "%s\n" "Please send $at_msg and all information you think might help:
To: <debian-dpkg@lists.debian.org>
- Subject: [dpkg 1.22.8] $as_me: $at_msg1$at_msg2
+ Subject: [dpkg 1.22.9] $as_me: $at_msg1$at_msg2
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
diff --git a/src/deb/info.c b/src/deb/info.c
index d2d72cf..afe7901 100644
--- a/src/deb/info.c
+++ b/src/deb/info.c
@@ -104,8 +104,7 @@ info_spew(const char *debar, const char *dir, const char *const *argv)
debar, component);
re++;
} else {
- ohshite(_("open component '%.255s' (in %.255s) failed in an unexpected way"),
- component, dir);
+ ohshite(_("cannot open file '%.255s'"), controlfile.buf);
}
}
varbuf_destroy(&controlfile);
@@ -115,21 +114,25 @@ info_spew(const char *debar, const char *dir, const char *const *argv)
"%d requested control components are missing", re), re);
}
-static char *
-info_interpreter(FILE *cc, int *lines)
-{
+struct script {
char interpreter[INTERPRETER_MAX + 1];
+ int lines;
+};
+
+static void
+info_script(FILE *cc, struct script *script)
+{
int c;
- *lines = 0;
- interpreter[0] = '\0';
+ script->lines = 0;
+ script->interpreter[0] = '\0';
if (getc(cc) == '#' && getc(cc) == '!') {
char *p;
int il;
while ((c = getc(cc)) == ' ')
;
- p = interpreter;
+ p = script->interpreter;
*p++ = '#';
*p++ = '!';
il = 2;
@@ -140,14 +143,12 @@ info_interpreter(FILE *cc, int *lines)
}
*p = '\0';
if (c == '\n')
- (*lines)++;
+ script->lines++;
}
while ((c = getc(cc)) != EOF) {
if (c == '\n')
- (*lines)++;
+ script->lines++;
}
-
- return m_strdup(interpreter);
}
static void
@@ -172,30 +173,28 @@ info_list(const char *debar, const char *dir)
varbuf_printf(&controlfile, "%s/%s", dir, cdep->d_name);
if (stat(controlfile.buf, &stab))
- ohshite(_("cannot stat '%.255s' (in '%.255s')"), cdep->d_name, dir);
+ ohshite(_("cannot get file '%.255s' metadata"), controlfile.buf);
if (S_ISREG(stab.st_mode)) {
int exec_mark = (S_IXUSR & stab.st_mode) ? '*' : ' ';
- char *interpreter;
- int lines;
+ struct script script;
cc = fopen(controlfile.buf, "r");
if (!cc)
- ohshite(_("cannot open '%.255s' (in '%.255s')"), cdep->d_name, dir);
+ ohshite(_("cannot open file '%.255s'"), controlfile.buf);
- interpreter = info_interpreter(cc, &lines);
+ info_script(cc, &script);
if (ferror(cc))
- ohshite(_("failed to read '%.255s' (in '%.255s')"), cdep->d_name, dir);
+ ohshite(_("cannot read file '%.255s'"), controlfile.buf);
fclose(cc);
- if (str_is_set(interpreter))
+
+ if (str_is_set(script.interpreter))
printf(_(" %7jd bytes, %5d lines %c %-20.127s %.127s\n"),
- (intmax_t)stab.st_size, lines, exec_mark, cdep->d_name,
- interpreter);
+ (intmax_t)stab.st_size, script.lines, exec_mark, cdep->d_name,
+ script.interpreter);
else
printf(_(" %7jd bytes, %5d lines %c %.127s\n"),
- (intmax_t)stab.st_size, lines, exec_mark, cdep->d_name);
-
- free(interpreter);
+ (intmax_t)stab.st_size, script.lines, exec_mark, cdep->d_name);
} else {
printf(_(" not a plain file %.255s\n"), cdep->d_name);
}
@@ -208,7 +207,7 @@ info_list(const char *debar, const char *dir)
cc = fopen(controlfile.buf, "r");
if (!cc) {
if (errno != ENOENT)
- ohshite(_("failed to read '%.255s' (in '%.255s')"), CONTROLFILE, dir);
+ ohshite(_("cannot read file '%.255s'"), controlfile.buf);
warning(_("no 'control' file in control archive!"));
} else {
int lines, c;
@@ -224,7 +223,7 @@ info_list(const char *debar, const char *dir)
putc('\n', stdout);
if (ferror(cc))
- ohshite(_("failed to read '%.255s' (in '%.255s')"), CONTROLFILE, dir);
+ ohshite(_("cannot read file '%.255s'"), controlfile.buf);
fclose(cc);
}
diff --git a/src/deb/main.c b/src/deb/main.c
index b7fe11c..b7a19b2 100644
--- a/src/deb/main.c
+++ b/src/deb/main.c
@@ -107,10 +107,11 @@ usage(const char *const *argv)
" --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"
-" -z# Set the compression level when building.\n"
-" -Z<type> Set the compression type used when building.\n"
+" -Z, --compression=<compressor> Set build compression type.\n"
" Allowed types: gzip, xz, zstd, none.\n"
-" -S<strategy> Set the compression strategy when building.\n"
+" -z, --compression-level=<level> Set build compression level.\n"
+" -S, --compression-strategy=<name>\n"
+" Set build compression strategy.\n"
" Allowed values: none; extreme (xz);\n"
" filtered, huffman, rle, fixed (gzip).\n"
"\n"));
@@ -270,9 +271,9 @@ static const struct cmdinfo cmdinfos[]= {
{ "threads-max", 0, 1, NULL, NULL, set_threads_max },
{ "uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL, 1 },
{ "no-uniform-compression", 0, 0, &opt_uniform_compression, NULL, NULL, 0 },
- { NULL, 'z', 1, NULL, NULL, set_compress_level },
- { NULL, 'Z', 1, NULL, NULL, set_compress_type },
- { NULL, 'S', 1, NULL, NULL, set_compress_strategy },
+ { "compression", 'Z', 1, NULL, NULL, set_compress_type },
+ { "compression-level", 'z', 1, NULL, NULL, set_compress_level },
+ { "compression-strategy", 'S', 1, NULL, NULL, set_compress_strategy },
{ "showformat", 0, 1, NULL, &opt_showformat, NULL },
{ NULL, 0, 0, NULL, NULL, NULL }
};