summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2021-03-28 12:36:05 +0200
committerMaat <maat-pub@mageia.biz>2021-03-28 12:36:05 +0200
commit274f16c141d56c02817f7725f7966ced4f8a5a6f (patch)
treed32ec8bd882da4e824c0f8da1798d7fc3ee3eb31
parente3173a683d398dfd305aa38390d32e51c973892b (diff)
downloadurpmi-274f16c141d56c02817f7725f7966ced4f8a5a6f.tar
urpmi-274f16c141d56c02817f7725f7966ced4f8a5a6f.tar.gz
urpmi-274f16c141d56c02817f7725f7966ced4f8a5a6f.tar.bz2
urpmi-274f16c141d56c02817f7725f7966ced4f8a5a6f.tar.xz
urpmi-274f16c141d56c02817f7725f7966ced4f8a5a6f.zip
Better color approach for help message in urpmi
-rwxr-xr-xurpmi175
1 files changed, 87 insertions, 88 deletions
diff --git a/urpmi b/urpmi
index 80a3e767..b49e64f0 100755
--- a/urpmi
+++ b/urpmi
@@ -65,94 +65,93 @@ $ENV{USER} ||= "root";
sub usage () {
print color('bright_yellow');
- print urpm::args::copyright('urpmi', [ '1999-2010', 'Mandriva' ], [ '2011-2017', 'Mageia' ]);
- print color('bold cyan');
- print N(" --help - print this help message.
-") . N(" --media - use only the given media, separated by comma.
-") . N(" --excludemedia - do not use the given media, separated by comma.
-") . N(" --update - use only update media.
-") . N(" --searchmedia - use only the given media to search requested packages.
-") . N(" --sortmedia - sort media according to substrings separated by comma.
-") . N(" --synthesis - use the given synthesis instead of urpmi db.
-") . N(" --auto - non-interactive mode, assume default answers to questions.
-") . N(" --auto-select - automatically select packages to upgrade the system.
-") . N(" --auto-update - update media then upgrade the system.
-") . N(" --no-md5sum - disable MD5SUM file checking.
-") . N(" --force-key - force update of gpg key.
-") . N(" --auto-orphans - remove orphans without asking
-") . N(" --no-recommends - do not auto select \"recommended\" packages.
-") . N(" --no-uninstall - never ask to uninstall a package, abort the installation.
-") . N(" --no-install - don't install packages (only download)
-") . N(" --keep - keep existing packages if possible, reject requested
- packages that lead to removals.
-") . N(" --split-level - split in small transaction if more than given packages
- are going to be installed or upgraded,
- default is %d.
-", urpm::default_options()->{'split-level'})
- . N(" --split-length - small transaction length, default is %d.
-", urpm::default_options()->{'split-length'})
- . N(" --fuzzy, -y - impose fuzzy search.
-") . N(" --buildrequires - install the buildrequires of the packages
-") . N(" --install-src - install only source package (no binaries).
-") . N(" --clean - remove rpm from cache before anything else.
-") . N(" --noclean - don't clean rpms from cache.
-") . N(" --justdb - update only the rpm db, not the filesystem.
-") . N(" --downgrade - downgrade a package from the version currently installed
- to the previously highest version
-") . N(" --replacepkgs - force installing packages which are already installed.
-") . N(" --force - force invocation even if some packages do not exist.
-") . N(" --allow-nodeps - allow asking user to install packages without
- dependencies checking.
-") . N(" --allow-force - allow asking user to install packages without
- dependencies checking and integrity.
-") . N(" --allow-recommends - auto select \"recommended\" packages.
-") . N(" --parallel - distributed urpmi across machines of alias.
-") . N(" --root - use another root for rpm installation.
-") . N(" --urpmi-root - use another root for urpmi db & rpm installation.
-") . N(" --use-distrib - configure urpmi on the fly from a distrib tree, useful
- to install a chroot with --root option.
-") . N(" --metalink - generate and use a local metalink.
-") . N(" --download-all - download all needed packages before trying to install them
-") . N(" --downloader - program to use to retrieve distant files.
- known programs: %s
-", join(', ', urpm::download::ftp_http_downloaders()))
- . N(" --curl-options - additional options to pass to curl
-") . N(" --rsync-options- additional options to pass to rsync
-") . N(" --wget-options - additional options to pass to wget
-") . N(" --prozilla-options - additional options to pass to prozilla
-") . N(" --aria2-options - additional options to pass to aria2
-") . N(" --limit-rate - limit the download speed.
-") . N(" --resume - resume transfer of partially-downloaded files
- (--no-resume disables it, default is disabled).
-") . N(" --proxy - use specified HTTP proxy, the port number is assumed
- to be 1080 by default (format is <proxyhost[:port]>).
-") . N(" --proxy-user - specify user and password to use for proxy
- authentication (format is <user:password>).
-") . N(" --bug - output a bug report in directory indicated by
- next arg.
-") . N(" --env - use specific environment (typically a bug report).
-") . N(" --verify-rpm - verify rpm signature before installation
- (--no-verify-rpm disables it, default is enabled).
-") . N(" --test - only verify if the installation can be achieved correctly.
-") . N(" --excludepath - exclude path separated by comma.
-") . N(" --excludedocs - exclude doc files.
-") . N(" --ignoresize - don't verify disk space before installation.
-") . N(" --ignorearch - allow to install rpms for unmatched architectures.
-") . N(" --noscripts - do not execute package scriptlet(s)
-") . N(" --replacefiles - ignore file conflicts
-") . N(" --skip - packages which installation should be skipped
-") . N(" --prefer - packages which should be preferred
-") . N(" --more-choices - when several packages are found, propose more choices
- than the default.
-") . N(" --nolock - don't lock rpm db.
-") . N(" --strict-arch - upgrade only packages with the same architecture.
-") . N(" -a - select all matches on command line.
-") . N(" -p - allow search in provides to find package.
-") . N(" -P - do not search in provides to find package.
-") . N(" --quiet, -q - quiet mode.
-") . N(" --verbose, -v - verbose mode.
-") . N(" --debug - very verbose mode.
-") . "\n";
+ print urpm::args::copyright('urpmi', [ '1999-2010', 'Mandriva' ], [ '2011-2021', 'Mageia' ]);
+ print "
+" . color('bold cyan') . " --help" . color('reset') . " - " . N("print this help message.") ."
+" . color('bold cyan') . " --media" . color('reset') . " - " . N("use only the given media, separated by comma.") ."
+" . color('bold cyan') . " --excludemedia" . color('reset') . " - " . N("do not use the given media, separated by comma.") ."
+" . color('bold cyan') . " --update" . color('reset') . " - " . N("use only update media.") ."
+" . color('bold cyan') . " --searchmedia" . color('reset') . " - " . N("use only the given media to search requested packages.") ."
+" . color('bold cyan') . " --sortmedia" . color('reset') . " - " . N("sort media according to substrings separated by comma.") ."
+" . color('bold cyan') . " --synthesis" . color('reset') . " - " . N("use the given synthesis instead of urpmi db.") ."
+" . color('bold cyan') . " --auto" . color('reset') . " - " . N("non-interactive mode, assume default answers to questions.") ."
+" . color('bold cyan') . " --auto-select" . color('reset') . " - " . N("automatically select packages to upgrade the system.") ."
+" . color('bold cyan') . " --auto-update" . color('reset') . " - " . N("update media then upgrade the system.") ."
+" . color('bold cyan') . " --no-md5sum" . color('reset') . " - " . N("disable MD5SUM file checking.") ."
+" . color('bold cyan') . " --force-key" . color('reset') . " - " . N("force update of gpg key.") ."
+" . color('bold cyan') . " --auto-orphans" . color('reset') . " - " . N("remove orphans without asking") ."
+" . color('bold cyan') . " --no-recommends" . color('reset') . " - " . N("do not auto select \"recommended\" packages.") ."
+" . color('bold cyan') . " --no-uninstall" . color('reset') . " - " . N("never ask to uninstall a package, abort the installation.") ."
+" . color('bold cyan') . " --no-install" . color('reset') . " - " . N("don't install packages (only download)") ."
+" . color('bold cyan') . " --keep" . color('reset') . " - " . N("keep existing packages if possible, reject requested
+ packages that lead to removals.") ."
+" . color('bold cyan') . " --split-level" . color('reset') . " - " . N("split in small transaction if more than given packages
+ are going to be installed or upgraded,
+ default is %d."
+ , urpm::default_options()->{'split-level'}) . "
+" . color('bold cyan') . " --split-length" . color('reset') . " - " . N("small transaction length, default is %d."
+ , urpm::default_options()->{'split-length'}) . "
+" . color('bold cyan') . " --fuzzy, -y" . color('reset') . " - " . N("impose fuzzy search.") . "
+" . color('bold cyan') . " --buildrequires" . color('reset') . " - " . N("install the buildrequires of the packages.") . "
+" . color('bold cyan') . " --install-src" . color('reset') . " - " . N("install only source package (no binaries).") . "
+" . color('bold cyan') . " --clean" . color('reset') . " - " . N("remove rpm from cache before anything else.") . "
+" . color('bold cyan') . " --noclean" . color('reset') . " - " . N("don't clean rpms from cache.") . "
+" . color('bold cyan') . " --justdb" . color('reset') . " - " . N("update only the rpm db, not the filesystem.") . "
+" . color('bold cyan') . " --downgrade" . color('reset') . " - " . N("downgrade a package from the version currently installed
+ to the previously highest version") . "
+" . color('bold cyan') . " --replacepkgs" . color('reset') . " - " . N("force installing packages which are already installed.") . "
+" . color('bold cyan') . " --force" . color('reset') . " - " . N("force invocation even if some packages do not exist.") . "
+" . color('bold cyan') . " --allow-nodeps" . color('reset') . " - " . N("allow asking user to install packages without
+ dependencies checking.") . "
+" . color('bold cyan') . " --allow-force" . color('reset') . " - " . N("allow asking user to install packages without
+ dependencies checking and integrity.") . "
+" . color('bold cyan') . " --allow-recommends" . color('reset') . " - " . N("auto select \"recommended\" packages.") . "
+" . color('bold cyan') . " --parallel" . color('reset') . " - " . N("distributed urpmi across machines of alias.") . "
+" . color('bold cyan') . " --root" . color('reset') . " - " . N("use another root for rpm installation.") . "
+" . color('bold cyan') . " --urpmi-root" . color('reset') . " - " . N("use another root for urpmi db & rpm installation.") . "
+" . color('bold cyan') . " --use-distrib" . color('reset') . " - " . N("configure urpmi on the fly from a distrib tree, useful
+ to install a chroot with --root option.") . "
+" . color('bold cyan') . " --metalink" . color('reset') . " - " . N("generate and use a local metalink.") . "
+" . color('bold cyan') . " --download-all" . color('reset') . " - " . N("download all needed packages before trying to install them") . "
+" . color('bold cyan') . " --downloader" . color('reset') . " - " . N("program to use to retrieve distant files.
+ known programs: %s", join(', ', urpm::download::ftp_http_downloaders())) . "
+" . color('bold cyan') . " --curl-options" . color('reset') . " - " . N("additional options to pass to curl.") . "
+" . color('bold cyan') . " --rsync-options" . color('reset') . " - " . N("additional options to pass to rsynci.") . "
+" . color('bold cyan') . " --wget-options" . color('reset') . " - " . N("additional options to pass to wget.") . "
+" . color("bold cyan") . " --prozilla-options" . color('reset') . " - " . N("additional options to pass to prozilla.") . "
+" . color("bold cyan") . " --aria2-options" . color('reset') . " - " . N("additional options to pass to aria2.") . "
+" . color("bold cyan") . " --limit-rate" . color('reset') . " - " . N("limit the download speed.") . "
+" . color("bold cyan") . " --resume" . color('reset') . " - " . N("resume transfer of partially-downloaded files.
+ (--no-resume disables it, default is disabled).") . "
+" . color("bold cyan") . " --proxy" . color('reset') . " - " . N("use specified HTTP proxy, the port number is assumed
+ to be 1080 by default (format is <proxyhost[:port]>).") . "
+" . color("bold cyan") . " --proxy-user" . color('reset') . " - " . N("specify user and password to use for proxy
+ authentication (format is <user:password>).") . "
+" . color("bold cyan") . " --bug" . color('reset') . " - " . N("output a bug report in directory indicated by
+ next arg.") . "
+" . color("bold cyan") . " --env" . color('reset') . " - " . N("use specific environment (typically a bug report).") . "
+" . color("bold cyan") . " --verify-rpm" . color('reset') . " - " . N("verify rpm signature before installation
+ (--no-verify-rpm disables it, default is enabled).") . "
+" . color("bold cyan") . " --test" . color('reset') . " - " . N("only verify if the installation can be achieved correctly.") . "
+" . color("bold cyan") . " --excludepath" . color('reset') . " - " . N("exclude path separated by comma.") . "
+" . color("bold cyan") . " --excludedocs" . color('reset') . " - " . N("exclude doc files.") . "
+" . color("bold cyan") . " --ignoresize" . color('reset') . " - " . N("don't verify disk space before installation.") . "
+" . color("bold cyan") . " --ignorearch" . color('reset') . " - " . N("allow to install rpms for unmatched architectures.") . "
+" . color("bold cyan") . " --noscripts" . color('reset') . " - " . N("do not execute package scriptlet(s).") . "
+" . color("bold cyan") . " --replacefiles" . color('reset') . " - " . N("ignore file conflicts.") . "
+" . color("bold cyan") . " --skip" . color('reset') . " - " . N("packages which installation should be skipped.") . "
+" . color("bold cyan") . " --prefer" . color('reset') . " - " . N("packages which should be preferred.") . "
+" . color("bold cyan") . " --more-choices" . color('reset') . " - " . N("when several packages are found, propose more choices
+ than the default.") . "
+" . color("bold cyan") . " --nolock" . color('reset') . " - " . N("don't lock rpm db.") . "
+" . color("bold cyan") . " --strict-arch" . color('reset') . " - " . N("upgrade only packages with the same architecture.") . "
+" . color("bold cyan") . " -a" . color('reset') . " - " . N("select all matches on command line.") . "
+" . color("bold cyan") . " -p" . color('reset') . " - " . N("allow search in provides to find package.") . "
+" . color("bold cyan") . " -P" . color('reset') . " - " . N("do not search in provides to find package.") . "
+" . color("bold cyan") . " --quiet, -q" . color('reset') . " - " . N("quiet mode.") . "
+" . color("bold cyan") . " --verbose, -v" . color('reset') . " - " . N("verbose mode.") . "
+" . color("bold cyan") . " --debug" . color('reset') . " - " . N("very verbose mode.") . "
+" . "\n";
print color('bright_yellow');
print N(" names or rpm files given on command line will be installed.
");