pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to tell pbulk to keep logs for successfully built ports



On Thu, Dec 23, 2021 at 4:08 PM Roland Illig <roland.illig%gmx.de@localhost> wrote:
>
> Am 24.12.2021 um 00:57 schrieb manphiz:
> > Hi,
> >
> > AIUI pbulk will clean the logs of successfully built packages
> > automatically.  I wonder whether there is an option to let pbulk keep
> > the build logs, or better, the build logs of specific ports?  I'm
> > asking this as some of the successfully built ports are having runtime
> > issues[1] and saving the build logs may help debugging.
>
> https://github.com/NetBSD/pkgsrc/blob/trunk/pkgtools/pbulk/files/pbulk/scripts/pkg-build
>
> At the end of that file, you can comment out the very last line, which
> currently says "rm -R ${bulklog}/${pkgname}".  To keep only certain
> build logs, you can wrap this command in a 'case' statement:
>
> case ${pkgname} in
> gnupg-*)
>         # keep the log files
>         ;;
> *)
>         rm -R ${bulklog}/${pkgname}
>         ;;
> esac
>
> In the function 'cleanup', you can see that there is a configuration
> option named 'keep_wrkdir'.  That's for extreme cases where the
> build.log is not enough.
>
> After editing this file, re-build pkgtools/pbulk.
>
> Roland

Thanks Roland!  I tried to patch the scripts of my built pbulk and it
also worked.  I also think it may be a useful addition to pbulk for
this use case by introducing an option like 'keep_wrklog' alongside
'keep_wrkdir'.  I'll try to contribute a patch later.


Home | Main Index | Thread Index | Old Index