From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 08 Nov 2022 09:26:03 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1osJvn-001DB0-P9 for lore@lore.pengutronix.de; Tue, 08 Nov 2022 09:26:03 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1osJvn-0006vJ-1D; Tue, 08 Nov 2022 09:26:03 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1osJv9-0006uy-6D; Tue, 08 Nov 2022 09:25:23 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1osJv8-0007ET-M7; Tue, 08 Nov 2022 09:25:22 +0100 Date: Tue, 8 Nov 2022 09:25:22 +0100 From: Michael Olbrich To: "Gieseler, Christian" Message-ID: <20221108082522.GA24684@pengutronix.de> Mail-Followup-To: "Gieseler, Christian" , "'ptxdist@pengutronix.de'" References: <75f0b7f568884d33af8f5c6bc23bd5dd@eks-engel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <75f0b7f568884d33af8f5c6bc23bd5dd@eks-engel.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] Speed up targetinstall of certain packages X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: "'ptxdist@pengutronix.de'" Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Fri, Nov 04, 2022 at 03:37:02PM +0000, Gieseler, Christian wrote: > I have question regarding the speedup of daily work. > > We have frontend and backend of our webgui deployed with separate packages. Only task of these package is to deploy the files with > > @$(call install_tree, web-frontend, -, -, $(WEB_FRONTEND_DIR)/var-www/, /var/www/,no) > > Compile and install stages are empty. The just call targetinfo and touch to skip the stages. > > The frontend depends on the backend and the backend obviously depends on our application which is called by the backend. > So our web-frontend.in file looks like this: > ## SECTION=project_specific > > config WEB_FRONTEND > bool > select APP_LAYER > select WEB_BACKEND > prompt "e-mode Web Frontend" > help > > As expected if i clean and compile APP_LAYER the targetinstallstage of > Backend and Frontend are executed again. However this is only a Run-Time > only dependency. It is a third-party archive and install_tree takes quite > some time even on fast build hosts. Even it if is just a minute it is > annoying to spend the time waiting during image creation. I know. I've tried to speed this up in the past but there are multiple binaries that are executed for each file and that takes time. I've found no good way to avoid this. > Trying to solve > that i found "if RUNTIME" für Run-Time only Dependencys in the > documentation here: > > https://www.ptxdist.org/doc/daily_work_section.html#controlling-package-dependencies-in-more-detail > > So my expectation would be that if i change the webfrontend.in file like this: > > config WEB_FRONTEND > bool > select APP_LAYER if RUNTIME > select WEB_BACKEND if RUNTIME > prompt "e-mode Web Frontend" > help > > The "if RUNTIME" would make sure that the targetinstall stage is not > executed again if i just execute a "ptxdist clean app-layer" followed by > a "ptxdist images". Same with ptxdist clean root; ptxdist images. It is > clear that all targetinstall stages are executed again, but i would > expect that the web-frontend is deployed earlier if no build dependency > is given. > > Am i missing something, oder is the "if RUNTIME" Switch not working > properly in my ptxdist-2018.12 version? Or does it have no effect on > targetinstall stages? A 'if RUNTIME' dependency still includes a dependency between targetinstall stages. This happen because the generated opkg include a 'Depends:' on the other package. And the opkg package name is only generated during the targetinstall stage. So the targetinstall dependency is necessary to make this work. Hmm, if we just don't create the 'Depends:' in the opkg, then we could avoid the dependency. Maybe make it optional? Or only create if the opkg tool is actually installed on the target? Ideas and patches welcome. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |