tbaeder / rpms / pesign

Forked from rpms/pesign 3 years ago
Clone

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

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