summaryrefslogtreecommitdiff
path: root/support/pkgcheck/src/messages/mod.rs
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-16 03:01:19 +0000
committerNorbert Preining <norbert@preining.info>2022-01-16 03:01:19 +0000
commita574e957682cad50981ddb567c2a106213dc8672 (patch)
treecd02ecf7773fd7bad8e7b6cdb07cf2ff437ba59f /support/pkgcheck/src/messages/mod.rs
parent0cb730e5737ffa35f797eaf75c2613e5ac88617c (diff)
CTAN sync 202201160301
Diffstat (limited to 'support/pkgcheck/src/messages/mod.rs')
-rw-r--r--support/pkgcheck/src/messages/mod.rs263
1 files changed, 132 insertions, 131 deletions
diff --git a/support/pkgcheck/src/messages/mod.rs b/support/pkgcheck/src/messages/mod.rs
index e3ec350143..f6819f1120 100644
--- a/support/pkgcheck/src/messages/mod.rs
+++ b/support/pkgcheck/src/messages/mod.rs
@@ -53,57 +53,57 @@ macro_rules! msgid {
}
macro_rules! f0001 {
- () => {
+ () => {{
error_occured!();
print!(
"{} Specify a directory to check (use option -d)\n",
msgid!("F0001")
);
- };
+ }};
}
macro_rules! f0002 {
- ($fmt1:expr) => {
+ ($fmt1:expr) => {{
error_occured!();
print!(
"{} Specified directory {} does not exist. Exiting...\n",
msgid!("F0002"),
$fmt1
);
- };
+ }};
}
macro_rules! f0003 {
- ($fmt1:expr) => {
+ ($fmt1:expr) => {{
error_occured!();
print!(
"{} Specified TDS archive {} does not exist or is no file. Exiting...\n",
msgid!("F0003"),
$fmt1
);
- };
+ }};
}
macro_rules! f0004 {
- ($fmt1:expr) => {
+ ($fmt1:expr) => {{
error_occured!();
print!(
"{} File {} specified as TDS archive is no zip archive. Exiting...\n",
msgid!("F0004"),
$fmt1
);
- };
+ }};
}
macro_rules! f0005 {
- ($fmt1:expr) => {
+ ($fmt1:expr) => {{
error_occured!();
print!(
"{} Bad filename {} for the tds.zip archive. Exiting...\n",
msgid!("F0005"),
$fmt1
);
- };
+ }};
}
// macro_rules! f0006 {
@@ -118,18 +118,18 @@ macro_rules! f0005 {
// }
macro_rules! f0007 {
- ($fmt1:expr) => {
+ ($fmt1:expr) => {{
error_occured!();
print!(
"{} Unable to create temporary directory for unzipping the TDS zip archive: {}. Exiting...\n",
msgid!("F0007"),
$fmt1
);
- };
+ }};
}
macro_rules! e0001 {
- ($fmt1:expr, $fmt2:expr, $fmt3:expr) => {
+ ($fmt1:expr, $fmt2:expr, $fmt3:expr) => {{
error_occured!();
print!(
"{} Bad character {} ({:#02x}) found in file name {} at offset {}\n",
@@ -139,11 +139,11 @@ macro_rules! e0001 {
$fmt2,
$fmt3
);
- };
+ }};
}
macro_rules! e0002 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} File {} has bad permissions: {}\n",
@@ -151,102 +151,102 @@ macro_rules! e0002 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0003 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {} is no text file\n", msgid!("E0003"), $fmt);
- };
+ }};
}
macro_rules! e0004 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} Empty directory {} detected\n", msgid!("E0004"), $fmt);
- };
+ }};
}
macro_rules! e0005 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} Empty file {} detected\n", msgid!("E0005"), $fmt);
- };
+ }};
}
macro_rules! e0006 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} Hidden directory {} detected\n", msgid!("E0006"), $fmt);
- };
+ }};
}
macro_rules! e0006t {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Hidden directory {} detected in TDS zip archive\n",
msgid!("E0006"),
$fmt
);
- };
+ }};
}
macro_rules! e0007 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} Hidden file {} detected\n", msgid!("E0007"), $fmt);
- };
+ }};
}
macro_rules! e0007t {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Hidden file {} detected in TDS zip archive\n",
msgid!("E0007"),
$fmt
);
- };
+ }};
}
macro_rules! e0008 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} Temporary file {} detected\n", msgid!("E0008"), $fmt);
- };
+ }};
}
macro_rules! e0008t {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Temporary file {} detected in TDS zip archive\n",
msgid!("E0008"),
$fmt
);
- };
+ }};
}
macro_rules! e0009 {
- () => {
+ () => {{
error_occured!();
print!(
"{} One of README/README.md/README.txt must exist\n",
msgid!("E0009")
);
- };
+ }};
}
macro_rules! e0010 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {} is a broken symlink\n", msgid!("E0010"), $fmt);
- };
+ }};
}
macro_rules! e0011 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} Directory {} has bad permissions: {}\n",
@@ -254,72 +254,72 @@ macro_rules! e0011 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0012 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} File {} has CRLF line endings\n",
msgid!("E0012"),
$fmt
);
- };
+ }};
}
macro_rules! e0013 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {} is a socket special file\n", msgid!("E0013"), $fmt);
- };
+ }};
}
macro_rules! e0014 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {} is a fifo file\n", msgid!("E0014"), $fmt);
- };
+ }};
}
macro_rules! e0015 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {} is a block device file\n", msgid!("E0015"), $fmt);
- };
+ }};
}
macro_rules! e0016 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} {} is a character device file\n",
msgid!("E0016"),
$fmt
);
- };
+ }};
}
macro_rules! e0017 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} PDF error detected in {}\n", msgid!("E0017"), $fmt);
- };
+ }};
}
macro_rules! e0018 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Unwanted directory {} detected\n",
msgid!("E0018"),
$fmt
);
- };
+ }};
}
macro_rules! e0019 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} {} generated by {} exists\n",
@@ -327,22 +327,22 @@ macro_rules! e0019 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0020 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Unwanted directory `{}` detected in the top level directory of a TDS archive\n",
msgid!("E0020"),
$fmt
);
- };
+ }};
}
macro_rules! e0021 {
- ($fmt1:expr, $fmt2:expr, $fmt3:expr) => {
+ ($fmt1:expr, $fmt2:expr, $fmt3:expr) => {{
error_occured!();
print!(
"{} File {} : Error reading in line {}: {}\n",
@@ -351,25 +351,24 @@ macro_rules! e0021 {
$fmt2,
$fmt3
);
- };
+ }};
}
macro_rules! e0022 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!("{} {}: `{}`\n", msgid!("E0022"), $fmt1, $fmt2);
- };
+ }};
}
-
macro_rules! e0023 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} {}\n", msgid!("E0023"), $fmt);
- };
+ }};
}
macro_rules! e0024 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} The TDS zip archive {} has bad permissions: {}\n",
@@ -377,33 +376,33 @@ macro_rules! e0024 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0025 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Duplicate names when ignoring letter case for: {}\n",
msgid!("E0025"),
$fmt
);
- };
+ }};
}
macro_rules! e0026 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} {} : file not in TDS or different in TDS and non-install tree\n",
msgid!("E0026"),
$fmt
);
- };
+ }};
}
macro_rules! e0027 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} {}: An I/O error occured -> {}\n",
@@ -411,11 +410,11 @@ macro_rules! e0027 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0028 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} No directory {} (= package name) found in path {}\n",
@@ -423,11 +422,11 @@ macro_rules! e0028 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0029 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} {}: {} encoding with BOM detected\n",
@@ -435,11 +434,11 @@ macro_rules! e0029 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0030 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} Symlink {} points to {} which is outside of the package directory tree\n",
@@ -447,22 +446,22 @@ macro_rules! e0030 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! e0031 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} File name {} contains invalid UTF-8 character(s)\n",
msgid!("E0031"),
$fmt
);
- };
+ }};
}
macro_rules! e0033 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} Error `{}` when unpacking tds archive {}. Exiting...\n",
@@ -470,51 +469,51 @@ macro_rules! e0033 {
$fmt2,
$fmt1
);
- };
+ }};
}
macro_rules! e0034 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Unwanted file `{}` detected in the top level directory of a TDS archive\n",
msgid!("E0034"),
$fmt
);
- };
+ }};
}
macro_rules! e0035 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Unwanted TDS archive `{}` detected in package directory tree\n",
msgid!("E0035"),
$fmt
);
- };
+ }};
}
macro_rules! e0036 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} File `{}` not below `source/` or `doc/` top level directory in TDS zip archive\n",
msgid!("E0036"),
$fmt
);
- };
+ }};
}
macro_rules! e0037 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!("{} File {} has CR line endings\n", msgid!("E0037"), $fmt);
- };
+ }};
}
macro_rules! e0038 {
- ($fmt1:expr, $fmt2:expr, $fmt3:expr, $fmt4:expr) => {
+ ($fmt1:expr, $fmt2:expr, $fmt3:expr, $fmt4:expr) => {{
error_occured!();
print!(
"{} File {} has inconsistent line endings: CR={}, LF={}, CRLF={}\n",
@@ -524,60 +523,62 @@ macro_rules! e0038 {
$fmt3,
$fmt4
);
- };
+ }};
}
macro_rules! e0039 {
- () => {
+ () => {{
error_occured!();
print!("{} No doc/ directory found\n", msgid!("E0039"));
- };
+ }};
}
macro_rules! e0040 {
- () => {
+ () => {{
error_occured!();
- print!("{} Too few top level directories in the TDS zip archive\n", msgid!("E0040"));
- };
+ print!(
+ "{} Too few top level directories in the TDS zip archive\n",
+ msgid!("E0040")
+ );
+ }};
}
macro_rules! e0041 {
- () => {
+ () => {{
error_occured!();
print!("{} One or more map file found for the package but none of them is in a path starting with fonts/map/dvips\n", msgid!("E0041"));
- };
+ }};
}
-
macro_rules! w0001 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
print!(
"{} Archive as package file detected: {}\n",
msgid!("W0001"),
$fmt
);
- };
+ }};
}
macro_rules! w0002 {
- () => {
+ () => {{
print!("{} Duplicate files detected\n", msgid!("W0002"),);
- };
+ }};
}
macro_rules! w0003 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Same named files detected in the package directory tree: {}\n",
msgid!("W0003"),
$fmt
);
- };
+ }};
}
macro_rules! w0004 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} {}: {} encoding with BOM detected\n",
@@ -585,115 +586,115 @@ macro_rules! w0004 {
$fmt1,
$fmt2
);
- };
+ }};
}
macro_rules! w0005 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} Very large file {} with size {}MiB detected\n",
msgid!("W0005"),
$fmt1,
$fmt2
- );
- };
+ )
+ }};
}
macro_rules! w0006 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
error_occured!();
print!(
"{} Very large file {} with size {}MiB detected in TDS zip archive\n",
msgid!("W0006"),
$fmt1,
$fmt2
- );
- };
+ )
+ }};
}
macro_rules! w0007 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Empty directory {} detected in TDS zip archive\n",
msgid!("W0007"),
$fmt
);
- };
+ }};
}
macro_rules! w0008 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
error_occured!();
print!(
"{} Windows file {} has Unix line endings\n",
msgid!("W0008"),
$fmt
);
- };
+ }};
}
macro_rules! i0002 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
print!(
"{} {} {}\n",
msgid!("I0002"),
"Checking package files in directory",
$fmt
);
- };
+ }};
}
macro_rules! i0003 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
print!(
"{} {} {}\n",
msgid!("I0003"),
"Checking TDS zip archive",
$fmt
);
- };
+ }};
}
macro_rules! i0004 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
print!(
"{} Correcting line endings for file {}\n",
msgid!("I0004"),
$fmt
);
- };
+ }};
}
macro_rules! i0005 {
- ($fmt:expr) => {
+ ($fmt:expr) => {{
print!(
"{} Correcting permissions for {}\n",
msgid!("I0005"),
$fmt
);
- };
+ }};
}
macro_rules! i0006 {
- () => {
+ () => {{
print!(
"{} Files having one of the following file name endings are regarded as temporary\n",
msgid!("I0006")
);
- };
+ }};
}
macro_rules! i0007 {
- ($fmt1:expr, $fmt2:expr) => {
+ ($fmt1:expr, $fmt2:expr) => {{
print!(
"{} {}: Successfully corrected wrong line endings to {}\n",
msgid!("I0007"),
$fmt1,
$fmt2
);
- };
+ }};
}
pub fn explains(err: &str) {