Subject: Re: pkg_summary
To: Jeremy C. Reed <reed@reedmedia.net>
From: Aleksey Cheusov <cheusov@tut.by>
List: pkgsrc-users
Date: 06/14/2007 00:59:27
--=-=-=
> On Wed, 13 Jun 2007, Aleksey Cheusov wrote:
>> Please test it. The attached script keeps pkg-summary up-to-date,
>> not a gzipped file but plain text.
> I did one test on a small repo and it worked for me.
> I can just gunzip first. Or maybe this can handle it.
Firs thing I thought about is how to make this script as simple and
clean as possible to keep it simple for verifying.
So, it doesn't contain any extra features. But it can handle .gz file
of course.
> I see same tool will generate pkg_summary if missing.
Yes.
> I will test this on multiple repos soon.
> Maybe an option to be verbose would be useful to list package names (for a
> email from cron for example).
Try this
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=pkg_update_summary.diff
Content-Description: for debugging
90a91,102
> if test "$TRACE"; then
> printf "\n\nall binary packages : \n\n$all"
>
> printf "\n\nupdated packages : \n\n$updated"
>
> printf "\n\nkept packages : \n\n"; cat "$tmp2"
>
> printf "\n\nremoved packages : \n\n"
> { echo "$all" | sed 's/[.]t[gb]z$//'
> sed -n 's/^PKGNAME=//p' "$summary_file"
> } | subtract
> fi
94c106,108
< mv "$tmp1" "$summary_file"
---
> if test -z "$TRACE"; then
> mv "$tmp1" "$summary_file"
> fi
--=-=-=
Set TRACE variable to 1
--
Best regards, Aleksey Cheusov.
--=-=-=--