puts(_(" rpm {--version}"));
puts(_(" rpm {--install -i} [-v] [--hash -h] [--percent] [--force] [--test]"));
puts(_(" [--replacepkgs] [--replacefiles] [--search]"));
- puts(_(" [--root <dir>] file1.rpm ... filen.rpm"));
+ puts(_(" [--root <dir>] [--excludedocs] [--includedocs]"));
+ puts(_(" file1.rpm ... filen.rpm"));
puts(_(" rpm {--upgrage -U} [-v] [--hash -h] [--percent] [--force] [--test]"));
puts(_(" [--search] [--oldpackage] [--root <dir>]"));
- puts(_(" file1.rpm ... fileN.rpm"));
+ puts(_(" [--excludedocs] [--includedocs]"));
+ puts(_(" file1.rpm ... filen.rpm"));
puts(_(" rpm {--query -q} [-afFpP] [-i] [-l] [-s] [-d] [-c] [-v] "));
puts(_(" [--root <dir>] [targets]"));
puts(_(" rpm {--verify -V -y] [-afFpP] [--root <dir>] [targets]"));
puts(_(" --force - short hand for --replacepkgs --replacefiles"));
puts(_(" --test - don't install, but tell if it would work or not"));
puts(_(" --search - search the paths listed in /etc/rpmrc for rpms"));
+ puts(_(" --excludedocs - do not install documentation"));
+ puts(_(" --includedocs - install documentation"));
puts(_(" --root <dir> - use <dir> as the top level directory"));
puts(_(""));
puts(_(" --upgrade <packagefile>"));
int clean = 0;
int signIt = 0;
int badOption = 0;
+ int excldocs = 0;
+ int incldocs = 0;
char * prefix = "/";
char * specFile;
char *passPhrase = "";
{ "configfiles", 0, 0, 'c' },
{ "docfiles", 0, 0, 'd' },
{ "erase", 0, 0, 'e' },
+ { "excludedocs", 0, &excldocs, 0},
{ "file", 0, 0, 'f' },
{ "force", 0, &force, 0 },
{ "group", 0, 0, 'g' },
{ "hash", 0, &showHash, 'h' },
{ "help", 0, &help, 0 },
{ "info", 0, 0, 'i' },
+ { "includedocs", 0, &incldocs, 0},
{ "install", 0, 0, 'i' },
{ "list", 0, 0, 'l' },
{ "oldpackage", 0, &oldPackage, 0 },
if (bigMode != MODE_INSTALL && replacePackages)
argerror(_("--replacepkgs may only be specified during package "
"installation"));
+
+ if (bigMode != MODE_INSTALL && excldocs)
+ argerror(_("--exclude-docs may only be specified during package "
+ "installation"));
+
+ if (bigMode != MODE_INSTALL && incldocs)
+ argerror(_("--include-docs may only be specified during package "
+ "installation"));
+
+ if (excldocs && incldocs)
+ argerror(_("only one of --exclude-docs and --include-docs may be "
+ "specified"));
+
if (bigMode != MODE_INSTALL && bigMode != MODE_UNINSTALL && test)
argerror(_("--test may only be specified during package installation "
if (showPercents) interfaceFlags |= RPMINSTALL_PERCENT;
if (showHash) interfaceFlags |= RPMINSTALL_HASH;
+ if (!incldocs) {
+ if (excldocs)
+ installFlags |= INSTALL_NODOCS;
+ else if (getBooleanVar(RPMVAR_EXCLUDEDOCS))
+ installFlags |= INSTALL_NODOCS;
+ }
+
if (optind == argc)
argerror(_("no packages given for install"));