summaryrefslogtreecommitdiff
path: root/rpmbuild.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-08-20 12:08:10 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-08-20 13:49:18 +0300
commitb217529967f972225dc9b7d2e37860885fde1ee1 (patch)
tree8697d585eb08ca8a692c313540f47359d24a1e27 /rpmbuild.c
parent04b1816f008d465ea5d7fa686e092280c3f104c3 (diff)
downloadrpm-b217529967f972225dc9b7d2e37860885fde1ee1.tar.gz
rpm-b217529967f972225dc9b7d2e37860885fde1ee1.tar.bz2
rpm-b217529967f972225dc9b7d2e37860885fde1ee1.zip
Add a convenience library for stuff common cli-bits into
Diffstat (limited to 'rpmbuild.c')
-rw-r--r--rpmbuild.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/rpmbuild.c b/rpmbuild.c
index 60310ff1e..af3039358 100644
--- a/rpmbuild.c
+++ b/rpmbuild.c
@@ -20,6 +20,7 @@ const char *__progname;
#include <rpm/rpmps.h>
#include <rpm/rpmts.h>
#include "lib/signature.h"
+#include "cliutils.h"
#include "debug.h"
@@ -50,36 +51,6 @@ static struct poptOption optionsTable[] = {
POPT_TABLEEND
};
-RPM_GNUC_NORETURN
-static void argerror(const char * desc)
-{
- fprintf(stderr, _("%s: %s\n"), __progname, desc);
- exit(EXIT_FAILURE);
-}
-
-static void printVersion(FILE * fp)
-{
- fprintf(fp, _("RPM version %s\n"), rpmEVR);
-}
-
-static void printBanner(FILE * fp)
-{
- fprintf(fp, _("Copyright (C) 1998-2002 - Red Hat, Inc.\n"));
- fprintf(fp, _("This program may be freely redistributed under the terms of the GNU GPL\n"));
-}
-
-static void printUsage(poptContext con, FILE * fp, int flags)
-{
- printVersion(fp);
- printBanner(fp);
- fprintf(fp, "\n");
-
- if (rpmIsVerbose())
- poptPrintHelp(con, fp, flags);
- else
- poptPrintUsage(con, fp, flags);
-}
-
static int checkSpec(rpmts ts, Header h)
{
rpmps ps;