rdossant / rpms / pesign

Forked from rpms/pesign 6 years ago
Clone

Blame 0002-Fix-command-line-parsing.patch

8a2c40e
From 5be0515dee24308fd7e270bf2e0fb5e5a7a78f32 Mon Sep 17 00:00:00 2001
8a2c40e
From: Julien Cristau <jcristau@debian.org>
8a2c40e
Date: Thu, 9 Jun 2016 14:30:37 +0200
c270f90
Subject: [PATCH 02/25] Fix command line parsing
8a2c40e
8a2c40e
The gettext translation domain should be passed as .arg, not .descrip,
8a2c40e
otherwise popt won't process any of the command line options (it stops
8a2c40e
looping over the struct poptOption array when an entry has unset
8a2c40e
longName, shortName and arg).
8a2c40e
8a2c40e
Signed-off-by: Julien Cristau <jcristau@debian.org>
8a2c40e
---
8a2c40e
 src/client.c     | 2 +-
8a2c40e
 src/efikeygen.c  | 2 +-
8a2c40e
 src/efisiglist.c | 2 +-
8a2c40e
 src/pesigcheck.c | 2 +-
8a2c40e
 4 files changed, 4 insertions(+), 4 deletions(-)
8a2c40e
8a2c40e
diff --git a/src/client.c b/src/client.c
8a2c40e
index 028419f..575c873 100644
8a2c40e
--- a/src/client.c
8a2c40e
+++ b/src/client.c
8a2c40e
@@ -555,7 +555,7 @@ main(int argc, char *argv[])
8a2c40e
 
8a2c40e
 	struct poptOption options[] = {
8a2c40e
 		{.argInfo = POPT_ARG_INTL_DOMAIN,
8a2c40e
-		 .descrip = "pesign" },
8a2c40e
+		 .arg = "pesign" },
8a2c40e
 		{.longName = "token",
8a2c40e
 		 .shortName = 't',
8a2c40e
 		 .argInfo = POPT_ARG_STRING|POPT_ARGFLAG_SHOW_DEFAULT,
8a2c40e
diff --git a/src/efikeygen.c b/src/efikeygen.c
8a2c40e
index 6278849..8a515a5 100644
8a2c40e
--- a/src/efikeygen.c
8a2c40e
+++ b/src/efikeygen.c
8a2c40e
@@ -486,7 +486,7 @@ int main(int argc, char *argv[])
8a2c40e
 	poptContext optCon;
8a2c40e
 	struct poptOption options[] = {
8a2c40e
 		{.argInfo = POPT_ARG_INTL_DOMAIN,
8a2c40e
-		 .descrip = "pesign" },
8a2c40e
+		 .arg = "pesign" },
8a2c40e
 		/* global nss-ish things */
8a2c40e
 		{.longName = "dbdir",
8a2c40e
 		 .shortName = 'd',
8a2c40e
diff --git a/src/efisiglist.c b/src/efisiglist.c
8a2c40e
index cd3f1ae..40d6a93 100644
8a2c40e
--- a/src/efisiglist.c
8a2c40e
+++ b/src/efisiglist.c
8a2c40e
@@ -126,7 +126,7 @@ main(int argc, char *argv[])
8a2c40e
 
8a2c40e
 	struct poptOption options[] = {
8a2c40e
 		{.argInfo = POPT_ARG_INTL_DOMAIN,
8a2c40e
-		 .descrip = "pesign" },
8a2c40e
+		 .arg = "pesign" },
8a2c40e
 		{.longName = "infile",
8a2c40e
 		 .shortName = 'i',
8a2c40e
 		 .argInfo = POPT_ARG_STRING,
8a2c40e
diff --git a/src/pesigcheck.c b/src/pesigcheck.c
8a2c40e
index 1328fe9..0d49c1a 100644
8a2c40e
--- a/src/pesigcheck.c
8a2c40e
+++ b/src/pesigcheck.c
8a2c40e
@@ -214,7 +214,7 @@ main(int argc, char *argv[])
8a2c40e
 	poptContext optCon;
8a2c40e
 	struct poptOption options[] = {
8a2c40e
 		{.argInfo = POPT_ARG_INTL_DOMAIN,
8a2c40e
-		 .descrip = "pesign" },
8a2c40e
+		 .arg = "pesign" },
8a2c40e
 		{.longName = "dbfile",
8a2c40e
 		 .shortName = 'D',
8a2c40e
 		 .argInfo = POPT_ARG_CALLBACK|POPT_CBFLAG_POST,
8a2c40e
-- 
c2cd4a2
2.13.4
8a2c40e