[PATCH 2/2] alpm version diff coloring

David Gustavsson david.e.gustavsson at gmail.com
Thu Aug 18 14:35:32 UTC 2022


The memory leak was an off-by-one-error, I can't reproduce it after
removing some needless pointer arithmetic.
Yes, I had some constructive pointers about semantic diffing between the
two previous patches.
The attached patch looks like this:
[image: 2022-08-18T155817.png]
Your examples would go
5.18.*14.arch1-1*       5.18.*15arch1-1*
5.18.*9*                      5.18.*10*

To me, this is very useful. Especially when there's many rows, it helps
when figuring out which release notes to read after an upgrade.
Disabling `color` or `verbose` of course removes this.



Den sön 31 juli 2022 kl 07:05 skrev Allan McRae <allan at archlinux.org>:

> On 1/3/22 15:02, David Gustavsson wrote:
> > Use non-alphanumerics as branching points for diff coloring.
> >
> > Signed-off-by: David Gustavsson <david.e.gustavsson at gmail.com>
> > ---
>
> There is a memory leak somewhere in here:
>
> $ sudo ./build/pacman -Su
> :: Starting full system upgrade...
> resolving dependencies...
> looking for conflicting packages...
> free(): invalid next size (fast)
> Aborted
>
>
> I have not looked for it yet, because I am still deciding the utility of
> these patches.
>
>
> For discussion, consider these versions:
>
> 5.18.14.arch1-1
> 5.18.15.arch1-1
>
> With the first patch in this series applied (have not looked to see if
> this changes with the second), this starts highlighting after "5.18.1".
>   But if we were going from 5.18.9 to 5.18.10, it would highlight after
> the "5.18.".  These upgrades are no different in that versioning scheme.
>   This should definitely always highlight from the version level separator.
>
>
> Also, I personally do not find this colouring useful, but I also do not
> find the verbose package lists before update useful...  So I am open to
> opinions on this.  Here is an example of the output after the patch 1/2
> applied:
> http://allanmcrae.com/tmp/pacman-version-change-highlight.png
>
> I'll wait for more feedback before looking into this further.
>
> Allan
>
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2022-08-18T155817.png
Type: image/png
Size: 16063 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20220818/d82354f1/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _3.patch
Type: text/x-patch
Size: 5826 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20220818/d82354f1/attachment-0001.bin>


More information about the pacman-dev mailing list