summaryrefslogtreecommitdiff
path: root/rpm.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-09-28 22:03:28 +0000
committerjbj <devnull@localhost>1998-09-28 22:03:28 +0000
commita88e320d6d8d2c338e1987bb268d9aaeb192f163 (patch)
tree78e81de73779ce235fc1192592cc56141ea0daed /rpm.c
parentfd068345e6e5165b8b772edc3392adda228800fe (diff)
downloadlibrpm-tizen-a88e320d6d8d2c338e1987bb268d9aaeb192f163.tar.gz
librpm-tizen-a88e320d6d8d2c338e1987bb268d9aaeb192f163.tar.bz2
librpm-tizen-a88e320d6d8d2c338e1987bb268d9aaeb192f163.zip
Sync with 2.5.4.
CVS patchset: 2376 CVS date: 1998/09/28 22:03:28
Diffstat (limited to 'rpm.c')
-rwxr-xr-xrpm.c306
1 files changed, 153 insertions, 153 deletions
diff --git a/rpm.c b/rpm.c
index 00b2dc5de..df9257fd6 100755
--- a/rpm.c
+++ b/rpm.c
@@ -189,62 +189,62 @@ static void printVersion(void) {
}
static void printBanner(void) {
- fputs(_("Copyright (C) 1998 - Red Hat Software"), stdout);
- fputs(_("This may be freely redistributed under the terms of the GNU "
- "Public License"), stdout);
+ puts(_("Copyright (C) 1998 - Red Hat Software"));
+ puts(_("This may be freely redistributed under the terms of the GNU "
+ "Public License"));
}
static void printUsage(void) {
printVersion();
printBanner();
- fputs(_(""), stdout);
-
- fputs(_("usage: rpm {--help}"), stdout);
- fputs(_(" rpm {--version}"), stdout);
- fputs(_(" rpm {--initdb} [--dbpath <dir>]"), stdout);
- fputs(_(" rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]"), stdout);
- fputs(_(" [--replacepkgs] [--replacefiles] [--root <dir>]"), stdout);
- fputs(_(" [--excludedocs] [--includedocs] [--noscripts]"), stdout);
- fputs(_(" [--rcfile <file>] [--ignorearch] [--dbpath <dir>]"), stdout);
- fputs(_(" [--prefix <dir>] [--ignoreos] [--nodeps] [--allfiles]"), stdout);
- fputs(_(" [--ftpproxy <host>] [--ftpport <port>] [--justdb]"), stdout);
- fputs(_(" [--noorder] [--relocate oldpath=newpath]"), stdout);
- fputs(_(" [--badreloc] [--notriggers] file1.rpm ... fileN.rpm"), stdout);
- fputs(_(" rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]"), stdout);
- fputs(_(" [--oldpackage] [--root <dir>] [--noscripts]"), stdout);
- fputs(_(" [--excludedocs] [--includedocs] [--rcfile <file>]"), stdout);
- fputs(_(" [--ignorearch] [--dbpath <dir>] [--prefix <dir>] "), stdout);
- fputs(_(" [--ftpproxy <host>] [--ftpport <port>]"), stdout);
- fputs(_(" [--ignoreos] [--nodeps] [--allfiles] [--justdb]"), stdout);
- fputs(_(" [--noorder] [--relocate oldpath=newpath]"), stdout);
- fputs(_(" [--badreloc] file1.rpm ... fileN.rpm"), stdout);
- fputs(_(" rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]"), stdout);
- fputs(_(" [--scripts] [--root <dir>] [--rcfile <file>]"), stdout);
- fputs(_(" [--whatprovides] [--whatrequires] [--requires]"), stdout);
- fputs(_(" [--triggeredby] [--ftpuseport] [--ftpproxy <host>]"), stdout);
- fputs(_(" [--ftpport <port>] [--provides] [--triggers] [--dump]"), stdout);
- fputs(_(" [--changelog] [--dbpath <dir>] [targets]"), stdout);
- fputs(_(" rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]"), stdout);
- fputs(_(" [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]"), stdout);
- fputs(_(" [--nomd5] [targets]"), stdout);
- fputs(_(" rpm {--setperms} [-afpg] [target]"), stdout);
- fputs(_(" rpm {--setugids} [-afpg] [target]"), stdout);
- fputs(_(" rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]"), stdout);
- fputs(_(" [--dbpath <dir>] [--nodeps] [--allmatches]"), stdout);
- fputs(_(" [--justdb] [--notriggers] rpackage1 ... packageN"), stdout);
- fputs(_(" rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile <file>]"), stdout);
- fputs(_(" [--sign] [--test] [--timecheck <s>] ]"), stdout);
- fputs(_(" [--buildplatform=platform1[,platform2...]]"), stdout);
- fputs(_(" [--rmsource] specfile"), stdout);
- fputs(_(" rpm {--rmsource} [--rcfile <file>] [-v] specfile"), stdout);
- fputs(_(" rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"), stdout);
- fputs(_(" rpm {--recompile} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"), stdout);
- fputs(_(" rpm {--resign} [--rcfile <file>] package1 package2 ... packageN"), stdout);
- fputs(_(" rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN"), stdout);
- fputs(_(" rpm {--checksig -K} [--nopgp] [--nomd5] [--rcfile <file>]"), stdout);
- fputs(_(" package1 ... packageN"), stdout);
- fputs(_(" rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]"), stdout);
- fputs(_(" rpm {--querytags}"), stdout);
+ puts(_(""));
+
+ puts(_("usage: rpm {--help}"));
+ puts(_(" rpm {--version}"));
+ puts(_(" rpm {--initdb} [--dbpath <dir>]"));
+ puts(_(" rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]"));
+ puts(_(" [--replacepkgs] [--replacefiles] [--root <dir>]"));
+ puts(_(" [--excludedocs] [--includedocs] [--noscripts]"));
+ puts(_(" [--rcfile <file>] [--ignorearch] [--dbpath <dir>]"));
+ puts(_(" [--prefix <dir>] [--ignoreos] [--nodeps] [--allfiles]"));
+ puts(_(" [--ftpproxy <host>] [--ftpport <port>] [--justdb]"));
+ puts(_(" [--noorder] [--relocate oldpath=newpath]"));
+ puts(_(" [--badreloc] [--notriggers] file1.rpm ... fileN.rpm"));
+ puts(_(" rpm {--upgrade -U} [-v] [--hash -h] [--percent] [--force] [--test]"));
+ puts(_(" [--oldpackage] [--root <dir>] [--noscripts]"));
+ puts(_(" [--excludedocs] [--includedocs] [--rcfile <file>]"));
+ puts(_(" [--ignorearch] [--dbpath <dir>] [--prefix <dir>] "));
+ puts(_(" [--ftpproxy <host>] [--ftpport <port>]"));
+ puts(_(" [--ignoreos] [--nodeps] [--allfiles] [--justdb]"));
+ puts(_(" [--noorder] [--relocate oldpath=newpath]"));
+ puts(_(" [--badreloc] file1.rpm ... fileN.rpm"));
+ puts(_(" rpm {--query -q} [-afpg] [-i] [-l] [-s] [-d] [-c] [-v] [-R]"));
+ puts(_(" [--scripts] [--root <dir>] [--rcfile <file>]"));
+ puts(_(" [--whatprovides] [--whatrequires] [--requires]"));
+ puts(_(" [--triggeredby] [--ftpuseport] [--ftpproxy <host>]"));
+ puts(_(" [--ftpport <port>] [--provides] [--triggers] [--dump]"));
+ puts(_(" [--changelog] [--dbpath <dir>] [targets]"));
+ puts(_(" rpm {--verify -V -y} [-afpg] [--root <dir>] [--rcfile <file>]"));
+ puts(_(" [--dbpath <dir>] [--nodeps] [--nofiles] [--noscripts]"));
+ puts(_(" [--nomd5] [targets]"));
+ puts(_(" rpm {--setperms} [-afpg] [target]"));
+ puts(_(" rpm {--setugids} [-afpg] [target]"));
+ puts(_(" rpm {--erase -e} [--root <dir>] [--noscripts] [--rcfile <file>]"));
+ puts(_(" [--dbpath <dir>] [--nodeps] [--allmatches]"));
+ puts(_(" [--justdb] [--notriggers] rpackage1 ... packageN"));
+ puts(_(" rpm {-b|t}[plciba] [-v] [--short-circuit] [--clean] [--rcfile <file>]"));
+ puts(_(" [--sign] [--test] [--timecheck <s>] ]"));
+ puts(_(" [--buildplatform=platform1[,platform2...]]"));
+ puts(_(" [--rmsource] specfile"));
+ puts(_(" rpm {--rmsource} [--rcfile <file>] [-v] specfile"));
+ puts(_(" rpm {--rebuild} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"));
+ puts(_(" rpm {--recompile} [--rcfile <file>] [-v] source1.rpm ... sourceN.rpm"));
+ puts(_(" rpm {--resign} [--rcfile <file>] package1 package2 ... packageN"));
+ puts(_(" rpm {--addsign} [--rcfile <file>] package1 package2 ... packageN"));
+ puts(_(" rpm {--checksig -K} [--nopgp] [--nomd5] [--rcfile <file>]"));
+ puts(_(" package1 ... packageN"));
+ puts(_(" rpm {--rebuilddb} [--rcfile <file>] [--dbpath <dir>]"));
+ puts(_(" rpm {--querytags}"));
}
static void printHelpLine(char * prefix, char * help) {
@@ -270,212 +270,212 @@ static void printHelpLine(char * prefix, char * help) {
helpLength = strlen(help);
}
- if (helpLength) fputs(help, stdout);
+ if (helpLength) puts(help);
}
static void printHelp(void) {
printVersion();
printBanner();
- fputs(_(""), stdout);
+ puts(_(""));
- fputs(_("usage:"), stdout);
- printHelpLine(" --help ",
+ puts( _("usage:"));
+ printHelpLine( " --help ",
_("print this message"));
- printHelpLine(" --version ",
+ printHelpLine( " --version ",
_("print the version of rpm being used"));
- fputs(_(" all modes support the following arguments:"), stdout);
+ puts( _(" all modes support the following arguments:"));
printHelpLine(_(" --rcfile <file> "),
_("use <file> instead of /etc/rpmrc and $HOME/.rpmrc"));
- printHelpLine(" -v ",
+ printHelpLine( " -v ",
_("be a little more verbose"));
- printHelpLine(" -vv ",
+ printHelpLine( " -vv ",
_("be incredibly verbose (for debugging)"));
- printHelpLine(" -q ",
+ printHelpLine( " -q ",
_("query mode"));
printHelpLine(_(" --root <dir> "),
_("use <dir> as the top level directory"));
printHelpLine(_(" --dbpath <dir> "),
_("use <dir> as the directory for the database"));
- printHelpLine(_(" --queryformat <qfmt> "),
- _("use qfmt as the header format (implies -i)"));
- fputs(_(" install, upgrade and query (with -p) allow ftp URL's to be used in place"), stdout);
- fputs(_(" of file names as well as the following options:\n"), stdout);
+ printHelpLine(_(" --queryformat <qfmt>"),
+ _("use <qfmt> as the header format (implies -i)"));
+ puts( _(" install, upgrade and query (with -p) allow ftp URL's to be used in place"));
+ puts( _(" of file names as well as the following options:"));
printHelpLine(_(" --ftpproxy <host> "),
_("hostname or IP of ftp proxy"));
printHelpLine(_(" --ftpport <port> "),
_("port number of ftp server (or proxy)"));
- fputs( _(" Package specification options:"), stdout);
+ puts( _(" Package specification options:"));
printHelpLine( " -a ",
_("query all packages"));
printHelpLine(_(" -f <file>+ "),
_("query package owning <file>"));
printHelpLine(_(" -p <packagefile>+ "),
_("query (uninstalled) package <packagefile>"));
- printHelpLine(_(" --triggeredby <package>"),
- _("query packages triggered by <package>"));
- printHelpLine(_(" --whatprovides <icap>"),
- _("query packages which provide <icap> capability"));
- printHelpLine(_(" --whatrequires <icap>"),
- _("query packages which require <icap> capability"));
- fputs(_(" Information selection options:"), stdout);
- printHelpLine(" -i ",
+ printHelpLine(_(" --triggeredby <pkg>"),
+ _("query packages triggered by <pkg>"));
+ printHelpLine(_(" --whatprovides <cap>"),
+ _("query packages which provide <cap> capability"));
+ printHelpLine(_(" --whatrequires <cap>"),
+ _("query packages which require <cap> capability"));
+ puts( _(" Information selection options:"));
+ printHelpLine( " -i ",
_("display package information"));
- printHelpLine(" --changelog ",
+ printHelpLine( " --changelog ",
_("display the package's change log"));
- printHelpLine(" -l ",
+ printHelpLine( " -l ",
_("display package file list"));
- printHelpLine(" -s ",
+ printHelpLine( " -s ",
_("show file states (implies -l)"));
- printHelpLine(" -d ",
+ printHelpLine( " -d ",
_("list only documentation files (implies -l)"));
- printHelpLine(" -c ",
+ printHelpLine( " -c ",
_("list only configuration files (implies -l)"));
- printHelpLine(" --dump ",
+ printHelpLine( " --dump ",
_("show all verifiable information for each file (must be used with -l, -c, or -d)"));
- printHelpLine(" --provides ",
+ printHelpLine( " --provides ",
_("list capabilities package provides"));
- fputs( _(" --requires"), stdout);
- printHelpLine(" -R ",
+ puts( _(" --requires"));
+ printHelpLine( " -R ",
_("list package dependencies"));
- printHelpLine(" --scripts ",
+ printHelpLine( " --scripts ",
_("print the various [un]install scripts"));
- printHelpLine(" --triggers ",
+ printHelpLine(" --triggers ",
_("show the trigger scripts contained in the package"));
- fputs( "", stdout);
- fputs( " -V", stdout);
- fputs( " -y", stdout);
- printHelpLine(_(" --pipe <cmd> "),
+ puts("");
+ puts( " -V");
+ puts( " -y");
+ printHelpLine(_(" --pipe <cmd> "),
_("send stdout to <cmd>"));
- printHelpLine(" --verify ",
+ printHelpLine( " --verify ",
_("verify a package installation using the same same package specification options as -q"));
printHelpLine(_(" --dbpath <dir> "),
_("use <dir> as the directory for the database"));
printHelpLine(_(" --root <dir> "),
_("use <dir> as the top level directory"));
- printHelpLine(" --nodeps ",
+ printHelpLine( " --nodeps ",
_("do not verify package dependencies"));
- printHelpLine(" --nomd5 ",
+ printHelpLine( " --nomd5 ",
_("do not verify file md5 checksums"));
- printHelpLine(" --nofiles ",
+ printHelpLine( " --nofiles ",
_("do not verify file attributes"));
- fputs("", stdout);
- printHelpLine(" --setperms ",
+ puts("");
+ printHelpLine( " --setperms ",
_("set the file permissions to those in the package database"
" using the same package specification options as -q"));
- printHelpLine(" --setugids ",
+ printHelpLine( " --setugids ",
_("set the file owner and group to those in the package "
"database using the same package specification options as "
"-q"));
- fputs("", stdout);
- fputs( _(" --install <packagefile>"), stdout);
+ puts("");
+ puts( _(" --install <packagefile>"));
printHelpLine(_(" -i <packagefile> "),
_("install package"));
printHelpLine(_(" --relocate <oldpath>=<newpath>"),
_("relocate files from <oldpath> to <newpath>"));
- printHelpLine(" --badreloc",
+ printHelpLine( " --badreloc",
_("relocate files even though the package doesn't allow it"));
printHelpLine(_(" --prefix <dir> "),
_("relocate the package to <dir>, if relocatable"));
printHelpLine(_(" --dbpath <dir> "),
_("use <dir> as the directory for the database"));
- printHelpLine(" --excludedocs ",
+ printHelpLine( " --excludedocs ",
_("do not install documentation"));
- printHelpLine(" --force ",
+ printHelpLine( " --force ",
_("short hand for --replacepkgs --replacefiles"));
- fputs( " -h", stdout);
- printHelpLine(" --hash ",
+ puts( " -h");
+ printHelpLine( " --hash ",
_("print hash marks as package installs (good with -v)"));
- printHelpLine(" --allfiles ",
+ printHelpLine( " --allfiles ",
_("install all files, even configurations which might "
"otherwise be skipped"));
- printHelpLine(" --ignorearch ",
+ printHelpLine( " --ignorearch ",
_("don't verify package architecture"));
- printHelpLine(" --ignoreos ",
+ printHelpLine( " --ignoreos ",
_("don't verify package operating system"));
- printHelpLine(" --includedocs ",
+ printHelpLine( " --includedocs ",
_("install documentation"));
- printHelpLine(" --justdb ",
+ printHelpLine( " --justdb ",
_("update the database, but do not modify the filesystem"));
- printHelpLine(" --nodeps ",
+ printHelpLine( " --nodeps ",
_("do not verify package dependencies"));
- printHelpLine(" --noorder ",
+ printHelpLine( " --noorder ",
_("do not reorder package installation to satisfy dependencies"));
- printHelpLine(" --noscripts ",
+ printHelpLine( " --noscripts ",
_("don't execute any installation scripts"));
- printHelpLine(" --notriggers ",
+ printHelpLine( " --notriggers ",
_("don't execute any scripts triggered by this package"));
- printHelpLine(" --percent ",
+ printHelpLine( " --percent ",
_("print percentages as package installs"));
- printHelpLine(" --replacefiles ",
+ printHelpLine( " --replacefiles ",
_("install even if the package replaces installed files"));
- printHelpLine(" --replacepkgs ",
+ printHelpLine( " --replacepkgs ",
_("reinstall if the package is already present"));
printHelpLine(_(" --root <dir> "),
_("use <dir> as the top level directory"));
- printHelpLine(" --test ",
+ printHelpLine( " --test ",
_("don't install, but tell if it would work or not"));
- fputs("", stdout);
- fputs( _(" --upgrade <packagefile>"), stdout);
+ puts("");
+ puts( _(" --upgrade <packagefile>"));
printHelpLine(_(" -U <packagefile> "),
_("upgrade package (same options as --install, plus)"));
- printHelpLine(" --oldpackage ",
+ printHelpLine( " --oldpackage ",
_("upgrade to an old version of the package (--force on upgrades does this automatically)"));
- fputs("", stdout);
- fputs( _(" --erase <package>"), stdout);
- printHelpLine(" -e <package> ",
+ puts("");
+ puts( _(" --erase <package>"));
+ printHelpLine( " -e <package> ",
_("erase (uninstall) package"));
- printHelpLine(" --allmatches ",
+ printHelpLine( " --allmatches ",
_("remove all packages which match <package> (normally an error is generated if <package> specified multiple packages)"));
printHelpLine(_(" --dbpath <dir> "),
_("use <dir> as the directory for the database"));
- printHelpLine(" --justdb ",
+ printHelpLine( " --justdb ",
_("update the database, but do not modify the filesystem"));
- printHelpLine(" --nodeps ",
+ printHelpLine( " --nodeps ",
_("do not verify package dependencies"));
- printHelpLine(" --noorder ",
+ printHelpLine( " --noorder ",
_("do not reorder package installation to satisfy dependencies"));
- printHelpLine(" --noscripts ",
+ printHelpLine( " --noscripts ",
_("do not execute any package specific scripts"));
- printHelpLine(" --notriggers ",
+ printHelpLine( " --notriggers ",
_("don't execute any scripts triggered by this package"));
printHelpLine(_(" --root <dir> "),
_("use <dir> as the top level directory"));
- fputs("", stdout);
- fputs( _(" -b<stage> <spec> "), stdout);
- printHelpLine(_(" -t<stage> <tarball> "),
+ puts("");
+ puts( _(" -b<stage> <spec> "));
+ printHelpLine(_(" -t<stage> <tarball> "),
_("build package, where <stage> is one of:"));
- printHelpLine(" p ",
+ printHelpLine( " p ",
_("prep (unpack sources and apply patches)"));
- printHelpLine(" l ",
+ printHelpLine( " l ",
_("list check (do some cursory checks on %files)"));
- printHelpLine(" c ",
+ printHelpLine( " c ",
_("compile (prep and compile)"));
- printHelpLine(" i ",
+ printHelpLine( " i ",
_("install (prep, compile, install)"));
- printHelpLine(" b ",
+ printHelpLine( " b ",
_("binary package (prep, compile, install, package)"));
- printHelpLine(" a ",
+ printHelpLine( " a ",
_("bin/src package (prep, compile, install, package)"));
- printHelpLine(" --short-circuit ",
+ printHelpLine( " --short-circuit ",
_("skip straight to specified stage (only for c,i)"));
- printHelpLine(" --clean ",
+ printHelpLine( " --clean ",
_("remove build tree when done"));
- printHelpLine(" --rmsource ",
+ printHelpLine( " --rmsource ",
_("remove sources and spec file when done"));
- printHelpLine(" --sign ",
+ printHelpLine( " --sign ",
_("generate PGP signature"));
- printHelpLine(_(" --buildroot <dir> "),
+ printHelpLine(_(" --buildroot <dir> "),
_("use <dir> as the build root"));
printHelpLine(_(" --platform=<platform>+"),
_("build the packages for the platform1...platformN build targets."));
- printHelpLine(" --test ",
+ printHelpLine( " --test ",
_("do not execute any stages"));
- printHelpLine(_(" --timecheck <secs> "),
- _("set the time check to <secs> seconds (0 disables it)"));
- fputs("", stdout);
+ printHelpLine(_(" --timecheck <secs> "),
+ _("set the time check to <secs> seconds (0 disables)"));
+ puts("");
printHelpLine(_(" --rebuild <src_pkg> "),
_("install source package, build binary package and remove spec file, sources, patches, and icons."));
- printHelpLine(_(" --rmsource <spec> "),
+ printHelpLine(_(" --rmsource <spec> "),
_("remove sources and spec file"));
printHelpLine(_(" --recompile <src_pkg> "),
_("like --rebuild, but don't build any package"));
@@ -483,22 +483,22 @@ static void printHelp(void) {
_("sign a package (discard current signature)"));
printHelpLine(_(" --addsign <pkg>+ "),
_("add a signature to a package"));
- fputs( " -K", stdout);
+ puts( " -K");
printHelpLine(_(" --checksig <pkg>+ "),
_("verify package signature"));
- printHelpLine(" --nopgp ",
+ printHelpLine( " --nopgp ",
_("skip any PGP signatures"));
- printHelpLine(" --nomd5 ",
+ printHelpLine( " --nomd5 ",
_("skip any MD5 signatures"));
- printHelpLine(" --querytags ",
+ printHelpLine( " --querytags ",
_("list the tags that can be used in a query format"));
- printHelpLine(" --initdb ",
+ printHelpLine( " --initdb ",
_("make sure a valid database exists"));
- printHelpLine(" --rebuilddb ",
+ printHelpLine( " --rebuilddb ",
_("rebuild database from existing database"));
printHelpLine(_(" --dbpath <dir> "),
_("use <dir> as the directory for the database"));
- printHelpLine(" --root <dir> ",
+ printHelpLine( " --root <dir> ",
_("use <dir> as the top level directory"));
}