From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6931066459248394240 X-Received: by 2002:a2e:809a:: with SMTP id i26mr14685180ljg.357.1614776356622; Wed, 03 Mar 2021 04:59:16 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:589:: with SMTP id 131ls455787ljf.9.gmail; Wed, 03 Mar 2021 04:59:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPRwCKNyoV3AWFzmrDBSSNLox/HY1hGf27r6n9/jwcWxCidiYt/SwIbOMdsh9aWZZxPckP X-Received: by 2002:a2e:6c06:: with SMTP id h6mr8816613ljc.154.1614776355568; Wed, 03 Mar 2021 04:59:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614776355; cv=none; d=google.com; s=arc-20160816; b=P0qMTIfQVFJJHhKzn2MSoWbwKqxKXKVoZrRWKQUz1mlglPByoXWiD1scVnqfrHGYc/ dP3i39CmW8CURlUi9UUR5ofTxzVltd3ntnx5ZB3ZVZQzqoAsD7XBVTUfEz5HN3h1xm1c Ws7v7LF+QdgcrCtv2SBNB4qHnhQQ8l5ZqevOAbWcaAB/NkIGiXVRzsCOKNLAj/n6LhiR S56to8AKAHRDTGyt65nw65O4W3gdSYAC6CXF0lYd1SC3JbVsjqS67Ud4pQ37kcZhbKDI i4Qwbg6ZqGvbXEfdHxq/XVCwBC2VDRwXZFOg0OjsF3/dJln6o4c5RsJq5K1LEOb+zBX2 lzlw== 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=q5utBaIzVD2TGGfZOGD3yE6OFxCx3C89hoMlIjHmcmY=; b=xUp5skMWAgniuwX5QmvQtrAIhN0IhT1/jJjVuewmPbqMvhQT0OLT2vPRXXs99He//E Dyp/2VtrKZoI8UXfHl2xYLhF2fBbQGHI3Y1WhHlYvNKgfXPYHqp2/BRqnmupswp3HOy8 o4ash1cnESENzhGuzatYFOYIkPTcjYLTfafybM4/n4vktkb3aS7FyDyPySntWNiAeEdP o6x/oHqTVxw3lqxDPT46u32MUqpgPgmCxhOjFhocscIlSGZQ18zOV52ZDVbxWC0TdDRW 4ijgbNf3AhsLhY/9fSjVLM+9IMWDGs7oIfWm8uAvqH5NH3dxfLXvwa6W/wS6nIRBO2Xd w6HA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 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 gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id c8si1091909lfk.1.2021.03.03.04.59.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Mar 2021 04:59:15 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 123CxEmH017104 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 3 Mar 2021 13:59:14 +0100 Received: from md1za8fc.ad001.siemens.net ([167.87.44.113]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 123CnD1q031363; Wed, 3 Mar 2021 13:49:13 +0100 Date: Wed, 3 Mar 2021 13:49:12 +0100 From: Henning Schild To: vijai kumar Cc: Vijai Kumar K , 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: <20210303134912.4093145b@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> 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: n9HjUz5NSEUo Can we please get this one stand-alone on the fast-path? Just ran into exactly the problem and now have to work around. 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. > > >