1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-03-11 07:31:04 -04:00

Remove ShowSize option

Dan: The commit message originally referenced "VerbosePkgLists", but I'm
going to change the name of the option. In addition, this patch serves
a purpose being standalone- we should really do things like this with
-S --print and hopefully -Q --print in the future.

Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Jakob Gruber 2011-03-25 00:15:44 +01:00 committed by Dan McGee
parent efd8ae483f
commit dcb6fb224d
8 changed files with 4 additions and 36 deletions

4
README
View File

@ -192,8 +192,8 @@ remove.c and sync.c).
The frontend is using a configuration file, usually "/etc/pacman.conf". Some
of these options are only useful for the frontend only (mainly the ones used to
control the output like showsize or totaldownload, or the behavior with
cleanmethod and syncfirst). The rest is used to configure the library.
control the output like totaldownload, or the behavior with cleanmethod and
syncfirst). The rest is used to configure the library.
[UPGRADE/REMOVE/SYNC]

View File

@ -160,9 +160,6 @@ Options
Log action messages through syslog(). This will insert log entries into
`{localstatedir}/log/messages` or equivalent.
*ShowSize*::
Display the size of individual packages for '\--sync' and '\--query' modes.
*UseDelta*::
Download delta files instead of complete packages if possible. Requires
the xdelta3 program to be installed.

View File

@ -30,7 +30,6 @@ Architecture = auto
# Misc options (all disabled by default)
#UseSyslog
#ShowSize
#UseDelta
#TotalDownload
#CheckSpace

View File

@ -70,7 +70,6 @@ typedef struct __config_t {
/* conf file options */
unsigned short chomp; /* I Love Candy! */
unsigned short showsize; /* show individual package sizes */
/* When downloading, display the amount downloaded, rate, ETA, and percent
* downloaded of the total download list */
unsigned short totaldownload;

View File

@ -988,9 +988,6 @@ static int _parse_options(const char *key, char *value,
} else if(strcmp(key, "ILoveCandy") == 0) {
config->chomp = 1;
pm_printf(PM_LOG_DEBUG, "config: chomp\n");
} else if(strcmp(key, "ShowSize") == 0) {
config->showsize = 1;
pm_printf(PM_LOG_DEBUG, "config: showsize\n");
} else if(strcmp(key, "UseDelta") == 0) {
alpm_option_set_usedelta(1);
pm_printf(PM_LOG_DEBUG, "config: usedelta\n");

View File

@ -261,14 +261,6 @@ static int query_search(alpm_list_t *targets)
printf("%s", alpm_pkg_get_name(pkg));
}
/* print the package size with the output if ShowSize option set */
if(!config->quiet && config->showsize) {
/* Convert byte size to MB */
double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);
printf(" [%.2f MB]", mbsize);
}
if (!config->quiet) {
if((grp = alpm_pkg_get_groups(pkg)) != NULL) {

View File

@ -347,14 +347,6 @@ static int sync_search(alpm_list_t *syncs, alpm_list_t *targets)
printf("%s", alpm_pkg_get_name(pkg));
}
/* print the package size with the output if ShowSize option set */
if(!config->quiet && config->showsize) {
/* Convert byte size to MB */
double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);
printf(" [%.2f MB]", mbsize);
}
if (!config->quiet) {
if((grp = alpm_pkg_get_groups(pkg)) != NULL) {
alpm_list_t *k;

View File

@ -540,16 +540,8 @@ void display_targets(const alpm_list_t *pkgs, int install)
}
isize += alpm_pkg_get_isize(pkg);
/* print the package size with the output if ShowSize option set */
if(config->showsize) {
double mbsize = (double)alpm_pkg_get_size(pkg) / (1024.0 * 1024.0);
pm_asprintf(&str, "%s-%s [%.2f MB]", alpm_pkg_get_name(pkg),
alpm_pkg_get_version(pkg), mbsize);
} else {
pm_asprintf(&str, "%s-%s", alpm_pkg_get_name(pkg),
alpm_pkg_get_version(pkg));
}
pm_asprintf(&str, "%s-%s", alpm_pkg_get_name(pkg),
alpm_pkg_get_version(pkg));
targets = alpm_list_add(targets, str);
}