[pacman-dev] [PATCH] Signed-off-by: Chirantan Ekbote <chirantan.ekbote at gmail.com>

Chirantan Ekbote chirantan.ekbote at gmail.com
Tue Sep 18 00:56:31 EDT 2012

Actually my patch (unintentionally) handles both the -Qi output and
FS#13035. The -Qi output uses

static void optdeplist_display(alpm_pkg_t *pkg, unsigned short cols)

and the output for optional dependencies during package installation uses

void display_new_optdepends(alpm_pkg_t *oldpkg, alpm_pkg_t *newpkg)


void display_optdepends(alpm_pkg_t *pkg)

All three of these methods call

void list_display_linebreak(const char *title, const alpm_list_t *list,
> unsigned short maxcols)

to actually print the output. Since my patch modifies this method, any
method that calls it will automatically get the installation status of the
packages in the provided list. Including a [pending] status would also only
take a few extra lines of code. Additionally, it seems that the only
methods that do call list_display_linebreak are ones that deal with
optional dependencies. If some other method were to start calling it, we
would have a problem.
It might also be worth considering merging some of these methods since they
seem to be doing the same thing.

Of course, this conflicts with both
https://patchwork.archlinux.org/patch/402/ and
https://patchwork.archlinux.org/patch/386/. I'm just an arch newbie though
so its very likely I missed something.

I figured I would be safe trying to contribute by patching a relatively
simple feature request that no one seemed to have touched in the last three
years. It would be just my luck that someone patched it a couple of weeks
before I did (~_~;)


On Mon, Sep 17, 2012 at 9:48 PM, Allan McRae <allan at archlinux.org> wrote:

> On 18/09/12 09:28, Allan McRae wrote:
> > On 18/09/12 09:14, Chirantan Ekbote wrote:
> >> Added code that lists if an optional dependency of a package is
> installed
> >> locally and additonally prints the version number of the installed
> dependency.
> >> Patch for FS#13035 in the pacman bug tracker.
> >> ---
> >
> > Here is a version that prints [installed] when a package is installed or
> > [pending] if it is going to be installed later:
> > https://patchwork.archlinux.org/patch/402/
> Oops...  your patch was for the -Qi output.  Here is the correct link to
> the patch queue:
> https://patchwork.archlinux.org/patch/386/
> Allan

More information about the pacman-dev mailing list