From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 01 Aug 2025 11:29:52 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uhm5I-005tus-18 for lore@lore.pengutronix.de; Fri, 01 Aug 2025 11:29:52 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1uhm5H-00084T-JS; Fri, 01 Aug 2025 11:29:51 +0200 Received: from mail.thorsis.com ([2003:a:e28:26e4::10]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1uhm5E-00082B-G7; Fri, 01 Aug 2025 11:29:49 +0200 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B55391483999; Fri, 1 Aug 2025 11:29:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thorsis.com; s=dkim; t=1754040586; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=CsQ9WjIoLh5OPOYK+IouIQP8c5CUd2NyZYF79V9B/iM=; b=AqT/EgknLeeQnXbJ7OEze/90eGBG+q5v7cgS+iKZkqZThW01HndxgLKz9xBLyw9I8mi0eF PnY+v5eTYCVFAgL47Sc+hLCZyhte/BRfl16RIZ6dqwRcaAmzUiYd86ueVZocjsEzEfpMs6 6sc6a0xBaSJuMKLN91IA4mB8A7ssU6klresT/AH8tpmBW+hypgmWBDrWeUhVf9u++zGpMi krvm6yIs3KYFrhTCLrvvpnSqiR6SXGLurKFctJFvpt+iz5T/Pve0HlEtgAZkiEoWbfVcUw Ooki/mRm0cDl9hQIcnRY295XCu7kBey1vGVBlT5ObJbE32BpvjvJKSdsEHyUeQ== Date: Fri, 1 Aug 2025 11:29:42 +0200 From: Alexander Dahl To: Lars Schmidt Message-ID: <20250801-yoga-tamale-cc41d69ec18e@thorsis.com> Mail-Followup-To: Lars Schmidt , distrokit@pengutronix.de References: <20250731155129.2464376-1-l.schmidt@pengutronix.de> <20250801091456.582976-1-l.schmidt@pengutronix.de> <20250801091456.582976-2-l.schmidt@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250801091456.582976-2-l.schmidt@pengutronix.de> User-Agent: Mutt/2.2.12 (2023-09-09) X-Last-TLS-Session-Version: TLSv1.3 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-3.3 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [DistroKit] [PATCH 2/3] script: add ptxd_make_world_inject from ptxdist X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: distrokit@pengutronix.de Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Hello Lars, Am Fri, Aug 01, 2025 at 11:14:55AM +0200 schrieb Lars Schmidt: > This inject script just copies from source to target and > does not create the target directory. So if the target dir > does not exist yet, the injection of files is not happening. > Until a ptxdist patch is upstream, this script is copied we > will apply the patch here. I assume you copied the script from ptxdist here, this is the unmodified script, and the actual change happens in the other patch right? This is not reflected in this commit message, which is actually rather confusing, at least to me. In the past I followed the same approach when "patching" things in a BSP before porting it back to ptxdist. It's easier like this, because you can just apply the same patch from the BSP to ptxdist. Would be easier to understand though if the commit message here just states a file is copied from ptxdist version xyz, as preparation for an upcoming change, and not describe that change in detail here already. Greets Alex > > Signed-off-by: Lars Schmidt > --- > scripts/lib/ptxd_make_world_inject.sh | 60 +++++++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > create mode 100644 scripts/lib/ptxd_make_world_inject.sh > > diff --git a/scripts/lib/ptxd_make_world_inject.sh b/scripts/lib/ptxd_make_world_inject.sh > new file mode 100644 > index 0000000..e8e94fb > --- /dev/null > +++ b/scripts/lib/ptxd_make_world_inject.sh > @@ -0,0 +1,60 @@ > +#!/bin/bash > +# > +# Copyright (C) 2021 by Michael Riesch > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +ptxd_make_inject() { > + local source target > + > + source="$(echo ${inject_file} | cut -d ":" -f 1)" > + target="${inject_dest}/$(echo ${inject_file} | cut -d ":" -f 2)" > + > + if [[ "${source}" =~ ^/.* ]]; then > + ptxd_bailout "'${source}' must not be an absolute path!" \ > + "Use _INJECT_PATH to specify the search path." > + fi > + > + if ! ptxd_in_path pkg_inject_path "${source}"; then > + ptxd_bailout "Blob '${source}' not found in '${pkg_inject_path}'." > + fi > + source="${ptxd_reply}" > + > + echo -e "\nInject file $(ptxd_print_path ${source}) into" \ > + "$(ptxd_print_path ${target})..." > + cp ${source} ${target} > +} > +export -f ptxd_make_inject > + > + > +ptxd_make_world_inject() { > + ptxd_make_world_init || return > + > + if [ -z "${pkg_inject_oot}" ]; then > + pkg_inject_oot=NO > + fi > + > + case "${pkg_inject_oot}" in > + "YES") inject_dest="${pkg_build_dir}" ;; > + "NO") inject_dest="${pkg_dir}" ;; > + *) ptxd_bailout "_INJECT_OOT: please set to YES or NO" ;; > + esac > + > + if [ "${pkg_build_oot:-NO}" = 'NO' ] && [ "${pkg_inject_oot}" != 'NO' ]; then > + ptxd_warning "_BUILD_OOT and _INJECT_OOT contradict each other." \ > + "Using $(ptxd_print_path ${inject_dest}) as inject destination anyways." > + fi > + > + if [ ! -d "${inject_dest}" ]; then > + ptxd_bailout " inject destination dir missing." \ > + "Correct placement of world/inject depends on _BUILD_OOT and _INJECT_OOT." \ > + "Check order of calls in prepare stage!" > + fi > + > + for inject_file in ${pkg_inject_files}; do > + ptxd_make_inject || return > + done > +} > +export -f ptxd_make_world_inject > -- > 2.39.5 > >