[pacman-dev] re-pacman
Xavier
shiningxc at gmail.com
Mon Mar 31 14:51:38 EDT 2008
Xavier wrote:
> Well, I already didn't like this script in the first place, I found the
> idea ugly.
> I still had a look at it to check if it worked. And I see the
> implementation is ugly as well, since it's based on -Qi output.
> If you take a few steps back, what's happening is so stupid (I'm not
> blaming any one here, or maybe only me for not being able to provide
> patches) :
> makepkg creates the .PKGINFO files
> repo-add transform the .PKGINFO to desc/depends
> pacman -Si/-Qi interprets the desc/depends file and display the info
> re-pacman looks at -Qi output and try to translate it back to .PKGINFO
> ...
>
> Just one example, the build date is stored as unix epoch, but pacman
> displays it in human readable way.
> However, we are lucky here, since date is apparently able to convert it
> back :
> 39 >-builddate=$(pacinfo ${1} 'Build Date')
> 40 >-echo "builddate = $(date -d "$builddate" +%s)"
>
> The build date could be the date of today though.
>
> Now if we try do to the same for size field, it will get uglier. But
> here again, we could compute the current size taken, which might have
> changed.
>
> Empty fields in pacman -Qi output should be dealt with too (for example
> Groups = None).
>
> Anyway, if you want an accurate re-pacman, you need to check the
> .PKGINFO creation in makepkg, and find out how to get that back from
> pacman -Q output.
> Or change re-pacman to use directly the files in /var/lib/pacman/local/
> And maybe before that, change the local database to use .PKGINFO format,
> to ease up re-pacman task :)
>
> I have no interest in updating re-pacman though, because I don't use it
> and find it useless (even though I recognize it might be handy and
> practical in some cases, I still don't like it).
>
I just found this :
http://foulmetal.free.fr/archlinux/repacman-0.98.tar.gz
This one uses the depends / desc files from the local db, but I didn't
look at anything else.
So just in case anyone is interested by this repacman stuff, there is a
different version from the one in pacman/contrib/.
More information about the pacman-dev
mailing list