[pacman-dev] [PATCH] Improve changelog handling
ngaba at bibl.u-szeged.hu
Sat Dec 8 08:02:05 EST 2007
> On Dec 7, 2007 10:47 AM, Allan McRae <allan.mcrae at qimr.edu.au> wrote:
> > Hi all,
> > Below is a patch that tries to improve the handling of changelog
> > dumping. Now changelogs should also get dumped when using "pacman -Qcp
> > <file>" syntax as well as "pacman -Qc <pkg>" (See
> > http://bugs.archlinux.org/task/7321)
> > This is my first patch to the pacman/libalpm code base so it probably
> > needs lots of checking. I stared at the code for a couple of hours
> > before I started but I am probably using some libalpm functions wrongly.
> > I would pay particular attention to the entirely new
> > "alpm_pkg_get_changelog" function in libalpm/package.c.
> > The code builds cleanly but I can't test much more than that at the
> > moment due to my testing box having what I think is RAM issues leaving
> > me only my work laptop...
> Thanks a lot. I will look this over tonight, but I don't see anything
> that would cause drastic breakage.
> I do wonder why we never had a pkg_get_changelog() /me shrugs
> Thanks for the patch, it's good for the motivation when new people
> come on board.
I also say thank you for this patch, but my vote: not apply (yet).
Imho I told everything in my last mail:
-my main reason: this patch doesn't follow our earlier "conventions" at all (no
problem, you are new here, and this can be fixed)
-I also silently referred to the following fact:
If I didn't misunderstand add.c "monster", now .CHANGELOG is extracted as
/var/lib/.../changelog in extract_single_file().
However, extract_single_file is called in case of !(trans->flags &
PM_TRANS_FLAG_DBONLY) only. So this just breaks the borderline between "package
install" and "record to database".
This is an other reason why pmpkg_t solution is clearer.
But I would like to say a contra for my preferred implementation, too:
-higher memory usage [but, if you measure the memory usage with -Qo, this is not
notable at all ;-]
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/
More information about the pacman-dev