Re: We need to do something about build times

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Sun, 29 Oct 2023 11:51:57 UTC
On Sat, 28 Oct 2023 16:10:11 +0200
Moin Rahman <bofh@freebsd.org> wrote:

> > On Oct 28, 2023, at 12:32 AM, Moin Rahman <bofh@freebsd.org> wrote:
> > 
> > 
> > 
> >> On Oct 27, 2023, at 11:37 PM, Tatsuki Makino <tatsuki_makino@hotmail.com> wrote:
> >> 
> >> Moin Rahman wrote on 2023/10/28 01:50:
> >>> But by no means it reduces the build
> >>> time of texlive-texmf. Hope everyone enjoys that. :)
> >>> 
> >> 
> >> There are updates in the current port tree that cause packages rebuilt by glib updates to be rebuilt again :)
> >> 
> >>> [00:01:19] [Dry Run] Deleting texlive-base-20230313_3.pkg: new dependency: print/ghostscript10
> >>> [00:01:22] [Dry Run] Deleting texlive-texmf-20230313.pkg: missing dependency: texlive-base-20230313_3
> >>> [00:01:39] [Dry Run] Ports to build: ... print/texlive-base print/texlive-texmf ...
> >> 
> >> As far as I can see, it seems that it is possible to avoid rebuilding texlive-texmf by manually running poudriere bulk with print/texlive-base.
> >> However, something else may cause texlive-texmf package to be removed, so it would be better to proceed gradually from libXdmcp, libxcb or something.
> >> 
> >> I enjoy manual manipulation to minimize the time spent on rebuilding :)
> >> 
> >> Regards.
> >> 
> > 
> > I believe you do not have the latest tree. I have removed the build time dependency to texlive-base.
> > 
> > This is my latest build:
> > 
> > https://pkg.bofh.network/data/latest-per-pkg/texlive-texmf/20230313/124i386-default.log
> > 
> > And there is not call to texlive-base itself.
> > 
> > Kind regards,
> > Moin(bofh@ with tex@ hats on)
> > 
> 
> In contrary to my previous comment I think that somehow poudriere detected the change that it no longer depends on print/texlive-base and hence rebuilt the pkg so that it's properly processed in the pkg and removes the dependency on print/texlive-base.
> 
> So in the previous pkg repo it had a BUILD time dependency on print/texlive-base but after the latest build it is no longer there. Maybe there are still some place of improvements in poudriere's change detection mechanism specially BUILD_DEPENDS. :P
> 
> Kind regards,
> Moin(bofh@ with all hats off)

And maybe indirect dependencies, too. ;-(

Not sure it's already done or not, maybe pkg database should record...

  *ACTUAL fetch depends
  *ACTUAL patch depends
  *ACTUAL build depends
  *ACTUAL lib depends
  *ACTUAL run depends
  *And possibly, ACTUAL test depends

regardless it's explicitly specified in ports skeleton (including via
uses etc.) or not.

For example, for lib depends,
  If port A depends on port B, and port B depends on port C in each
  Makefile,
    If nothing in port A directly links libraries in port C, no need to
    record port C as dependency of port A.
    If anything in port A directly links libraries in port C, port C
    SHALL be recorded as lib depends of port A, even if it is NOT
    explicitly described as *_DEPENDS in port A's Makefile.

These would vary with how OPTIONS are set / how FLAVOURs are set.
If this is possible, it would largely help maintainers, with the cost
of huge amount of `make package` time.

At worst, BUILD_DEPENDS should be recorded in pkg database and some
option to retrieve them, like %r and %d.
I strongly suspect the lack of this functionality affects mis-behaviour
of poudriere on deciding build order and combination.

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>