From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6931066459248394240 X-Received: by 2002:a1c:2155:: with SMTP id h82mr9614751wmh.169.1614783239523; Wed, 03 Mar 2021 06:53:59 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:2292:: with SMTP id 18ls1332737wmf.0.canary-gmail; Wed, 03 Mar 2021 06:53:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwB14ovSVNQ4nRYojMFRqFT4UA4/Ehh8ZF7qmbiVuDsR1sYWSKigzUVPgOWNFRyfj4mBEFN X-Received: by 2002:a7b:c04c:: with SMTP id u12mr9668557wmc.9.1614783238730; Wed, 03 Mar 2021 06:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614783238; cv=none; d=google.com; s=arc-20160816; b=FXkVXNhvXJGK4dYB7mpO0hl7qSi/qvxOwwNPfqxlAsi25nj/JdU+xOqVdh14Wgb15i G28649O27xYdsStPB0fee7Q3p1qeleMJ0+vf3K7sFryuMjAHzZkCSfF2Wo4CjauCsK4l YCyhpzBF6kcxWU+x3kPJxuxHI7d5XUhlK/HjLSuDldAe8dqPaos5ZhUo9z/28eQeazm4 8l6EMbLu6Kg4/5uF4n/7DXvkwzW26rqy3Xc29T3nVI/2b7ku1xSjiAQAFPAGyGHHgA11 ClWpfthJvbpkwInzVp5RNzjUANmGPdY7j6CciBIgelkJb1MUpkn9GJgg/1igV5ViCIp3 Uc3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=FEGV9yhw7aeXg22WPozaDW/tbU2XYHDcsALwaWXpMT0=; b=ao62YBwxLCUUHrLkO5WEWFVWmRLpJrnGHly2auo68DtiNGj/6hs/az8sphkxCi4Ubz EzcMhaJOZHQoX2bke0v3Ghc55j74qpgIRAdjvXWx2AMru1+fTlVCv5mtS4MzWYnGI/Gd h8KRASqrUHgcmnxcJNIqkC9cPajZwJfsp78qCg96oMQDeJmZcw3LqZkvVW2oisU4oO5C BESPFoOpTDM+fI2k0uXzyukVk84lxojUeyG7jLtPDrNg9QCc3evffsEC+Rlz64NdGFZ0 xpv15vcC02LugbhK6wfoUlmJSKYoMCJn1OWFf6z13fovKKJYXn6p9K8mcMcG2XGNtVc3 Q+6g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id i22si389305wml.2.2021.03.03.06.53.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 06:53:58 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 123ErwJH011551 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 15:53:58 +0100 Received: from md1za8fc.ad001.siemens.net ([167.87.44.113]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 123ErvmO030040; Wed, 3 Mar 2021 15:53:57 +0100 Date: Wed, 3 Mar 2021 15:53:56 +0100 From: Henning Schild To: "Kanagarajan, Vijaikumar" Cc: vijai kumar , isar-users , "ibr@radix10.net" , Silvano Cirujano Cuesta Subject: Re: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch Message-ID: <20210303155356.151e4377@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20210219195719.29037-1-Vijaikumar_Kanagarajan@mentor.com> <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com> <20210220090734.60a591c2@md1za8fc.ad001.siemens.net> <20210303134912.4093145b@md1za8fc.ad001.siemens.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: q0cQuDrIP86O Sweet, this is what i just placed in a recipe +## TODO hack, upstream will soon have a patch +do_rename_to_s() { + debs=$( find ${WORKDIR} -type d -iname "${P}*" | head -1 ) + rm -rf "${S}" + cp -a "$debs" "${S}" +} +addtask rename_to_s after do_apt_fetch symlink will not work, since that is mounted into buildchroot Henning Am Wed, 3 Mar 2021 13:49:26 +0000 schrieb "Kanagarajan, Vijaikumar" : > -----Original Message----- > From: Henning Schild [mailto:henning.schild@siemens.com] > Sent: 03 March 2021 18:19 > To: vijai kumar > Cc: Kanagarajan, Vijaikumar ; > isar-users ; ibr@radix10.net; Silvano > Cirujano Cuesta Subject: Re: > [RFC PATCH 1/2] dpkg-base: Handle custom source directory in > do_apt_fetch > > Can we please get this one stand-alone on the fast-path? Just ran > into exactly the problem and now have to work around. > > > Sure Henning. Will take this out and send a v2 tonight. > > regards, > Henning > > Am Mon, 22 Feb 2021 12:41:40 +0530 > schrieb vijai kumar : > > > On Sat, Feb 20, 2021 at 1:47 PM Henning Schild > > wrote: > > > > > > Am Sat, 20 Feb 2021 01:27:18 +0530 > > > schrieb Vijai Kumar K : > > > > > > > With the current do_apt_fetch implementation, it is not > > > > possible to use a custom source directory(${S}). > > > > > > > > apt-get source by default extracts the contents of the debian > > > > source into folder with name _. > > > > > > > > Add provision for specifying a custom source directory. > > > > > > I think this one is indeed worth being discussed seperately. > > > > > > Could you go into detail why a custom S is required in the first > > > place? My guess is that we might not know PV and need to wait for > > > that apt-unpack to finish so we can find it in the changelog. > > > > Exactly. In some cases we might not know PV, we might need to wait > > for apt to see what version it is fetching. Change the APT sources > > and or preferences and you might get a completely new version of > > the package. We cannot effectively know ${S} for manipulating the > > source code from the recipe. > > > > > > > > > Signed-off-by: Vijai Kumar K > > > > --- > > > > meta/classes/dpkg-base.bbclass | 7 ++++++- > > > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/meta/classes/dpkg-base.bbclass > > > > b/meta/classes/dpkg-base.bbclass index 5c7bddc..1b94b76 100644 > > > > --- a/meta/classes/dpkg-base.bbclass > > > > +++ b/meta/classes/dpkg-base.bbclass > > > > @@ -70,7 +70,12 @@ do_apt_fetch() { > > > > sudo -E chroot --userspec=$( id -u ):$( id -g ) > > > > ${BUILDCHROOT_DIR} \ sh -c 'mkdir -p > > > > /downloads/deb-src/"$1"/"$2" && cd /downloads/deb-src/"$1"/"$2" > > > > && apt-get -y --download-only --only-source source "$2"' > > > > my_script "${DISTRO}" "${uri}" sudo -E chroot --userspec=$( id > > > > -u ):$( id -g ) ${BUILDCHROOT_DIR} \ > > > > - sh -c 'cp /downloads/deb-src/"$1"/"$2"/* ${PP} && > > > > cd ${PP} && apt-get -y --only-source source "$2"' my_script > > > > "${DISTRO}" "${uri}" > > > > + sh -c ' \ > > > > + dscfile="$(apt-get -y -qq --print-uris source > > > > "${2}" | cut -d " " -f2 | grep -E "*.dsc")" > > > > + cd ${PP} > > > > + cp /downloads/deb-src/"${1}"/"${2}"/* ${PP} > > > > + dpkg-source -x "${dscfile}" "${PPS}"' \ > > > > + my_script "${DISTRO}" "${uri}" > > > > > > You removed the && chaining, please try a "false" in there, i > > > guess that sh might need a -e now > > > > Yes. Will add that in v2. > > > > > > > > I wonder if we can just symlink debians choice to PPS, or mv, or > > > even "cp -a" > > > > Wondering whether it brings in any added advantage? > > > > > And make that a new task we call apt_unpack > > > > I thought about this too. We could definitely have something like > > apt_unpack that makes things clear. When I first started looking > > around, I didn't expect the unpacking to happen in fetch. > > > > Thanks, > > Vijai Kumar K > > > > > > > > Henning > > > > > > > done > > > > > > > > dpkg_undo_mounts > > > > > > -- > > > You received this message because you are subscribed to the > > > Google Groups "isar-users" group. To unsubscribe from this group > > > and stop receiving emails from it, send an email to > > > isar-users+unsubscribe@googlegroups.com. To view this discussion > > > on the web visit > > > https://groups.google.com/d/msgid/isar-users/20210220090734.60a591c2%40md1za8fc.ad001.siemens.net. > > > > > >