Date: Tue, 21 Apr 2015 01:52:56 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 199572] ports-mgmt/portmaster: useless processing of depends over and over again Message-ID: <bug-199572-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199572 Bug ID: 199572 Summary: ports-mgmt/portmaster: useless processing of depends over and over again Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: torsten.eichstaedt@web.de or: gg:Recursive 'make' considered harmful (and not using 'make' too) how to reproduce: e.g. # portmaster -F kde (download all distfiles needed to build kde) When portmaster recurses through the dependecies, it processes entries on which more than one other entries depends over and over again, which is fairly useless provided nothing changes during one run, increasing (by a factor of estimated several 10^x) the runtime. IMHO the correct way to handle the graph of dependencies is what (I guess) poudriere (or 'make' when it is given a correct makefile) does: the graph needs to be stratified before diving into the dependencies (side benefit: allows parallel processing), and then must be processed /bottom-up/. In contrast, (from to output of portmaster I guess that) portmaster processes the graph top-down-depth-first ("by-feet", i.e. does not use 'make') and does not remember what was already finished. In the example above the "basic" ports like automoc, qmake4, cmake, several py-... etc. are processed several hundred (1000's?) times. Thus, if there's a way for portmaster to contruct a (or use an already existent) Makefile for a given task and then launch 'make' to find a (optimal) way to do the actual work, I'd say that's much better than to do it "by-feet" in a sub-optimal way. For the example above, this magic should be sufficient: "portsdir=/usr/ports; target=x11/kde4; cd $portsdir/$target; make fetch-recursive" Basically, most of what 'portmaster' would have to do is to find the right directory name for a given target (x11/kde4 <-> kde). Comparison: after more than one hour, portmaster was still recursing through the dependencies and downloaded nothing, whereas direct use of 'make' as above started to download the 1st missing distfile after a few seconds. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199572-13>