[PATCH 1/1] split repository and package with VerbosePkgLists

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] split repository and package with VerbosePkgLists

Christian Hesse
From: Christian Hesse <[hidden email]>

Acting on packages from lots of different repositories makes the view
look cluttered. So split repository and package with VerbosePkgLists.

Signed-off-by: Christian Hesse <[hidden email]>
---
 src/pacman/util.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 64ea8c57..92fac07a 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -806,9 +806,11 @@ static alpm_list_t *create_verbose_header(size_t count)
  alpm_list_t *ret = NULL;
 
  char *header;
- pm_asprintf(&header, "%s (%zu)", _("Package"), count);
+ add_table_cell(&ret, _("Repository"), CELL_TITLE);
 
+ pm_asprintf(&header, "%s (%zu)", _("Package"), count);
  add_table_cell(&ret, header, CELL_TITLE | CELL_FREE);
+
  add_table_cell(&ret, _("Old Version"), CELL_TITLE);
  add_table_cell(&ret, _("New Version"), CELL_TITLE);
  add_table_cell(&ret, _("Net Change"), CELL_TITLE);
@@ -830,11 +832,16 @@ static alpm_list_t *create_verbose_row(pm_target_t *target)
  if(target->install) {
  const alpm_db_t *db = alpm_pkg_get_db(target->install);
  if(db) {
- pm_asprintf(&str, "%s/%s", alpm_db_get_name(db), alpm_pkg_get_name(target->install));
+ pm_asprintf(&str, "%s", alpm_db_get_name(db));
  } else {
- pm_asprintf(&str, "%s", alpm_pkg_get_name(target->install));
+ str = NULL;
  }
+ add_table_cell(&ret, str, CELL_NORMAL | CELL_FREE);
+
+ pm_asprintf(&str, "%s", alpm_pkg_get_name(target->install));
  } else {
+ add_table_cell(&ret, NULL, CELL_NORMAL | CELL_FREE);
+
  pm_asprintf(&str, "%s", alpm_pkg_get_name(target->remove));
  }
  add_table_cell(&ret, str, CELL_NORMAL | CELL_FREE);
--
2.11.0
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/1] split repository and package with VerbosePkgLists

Olivier Brunel
On Thu, 26 Jan 2017 11:02:30 +0100
Christian Hesse <[hidden email]> wrote:

> From: Christian Hesse <[hidden email]>
>
> Acting on packages from lots of different repositories makes the view
> look cluttered. So split repository and package with VerbosePkgLists.
>
> Signed-off-by: Christian Hesse <[hidden email]>
> ---

This would get a NACK from me, because whilst having "repo/package"
doesn't bother me (and it's also used as search results, etc), this
actually means on occasions the table view gets disabled because my
terminal window is too small, and that's quite a bother (not just more
clutter, but also less information gets displayed).
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/1] split repository and package with VerbosePkgLists

Allan McRae
On 29/01/17 23:41, Olivier Brunel wrote:

> On Thu, 26 Jan 2017 11:02:30 +0100
> Christian Hesse <[hidden email]> wrote:
>
>> From: Christian Hesse <[hidden email]>
>>
>> Acting on packages from lots of different repositories makes the view
>> look cluttered. So split repository and package with VerbosePkgLists.
>>
>> Signed-off-by: Christian Hesse <[hidden email]>
>> ---
>
> This would get a NACK from me, because whilst having "repo/package"
> doesn't bother me (and it's also used as search results, etc), this
> actually means on occasions the table view gets disabled because my
> terminal window is too small, and that's quite a bother (not just more
> clutter, but also less information gets displayed).

This takes the headers from 57 characters (including spacing) to 68.
That leaves little room on an 80 width terminal.  So I agree that is too
large.

A