From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6931066459248394240 X-Received: by 2002:a05:600c:3550:: with SMTP id i16mr10487981wmq.170.1613809057288; Sat, 20 Feb 2021 00:17:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:640a:: with SMTP id z10ls2140418wru.0.gmail; Sat, 20 Feb 2021 00:17:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzN+B6GKjWfYB95n8TAAys4ZjDYSUZaNCT13C8XKKMxbvIgD+RbwYHohT6qld/ylXmfDPR+ X-Received: by 2002:a05:6000:1806:: with SMTP id m6mr12551018wrh.320.1613809056483; Sat, 20 Feb 2021 00:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613809056; cv=none; d=google.com; s=arc-20160816; b=nY0/yN73xAtnLa20vL1fXuAVOVAzsC1gDqDeoPB+gn2C05SE9Slz+Hybvw2CTkE/ho 9UIQ6xahRGhviYKcYb6paXwpzLNsAJS90cf0vCEmy1pQ9DqD+TP60K/PrJUDw8n3K6qs CXgXXVMnEqkGmHAOrMzJVqQIJ2vRR2Tn0477AttXOwB1oqk5Uw/Q3PKKIYse5+Pelc93 VkKV6aVEiPsxuosDEs0Zmog/1c5V546ehNQ5S40lFQSqoQHTIeq0O0NU6xgIp/8pS4L9 ITjboR0bQReY9zVdCCultg5dy6ZL+6I8cGDmXx5eLsxvvVYWiJ9VKqUJsKBCJN+QtDKu 6nxw== 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=spoG2x+fsJdTYDDmBbUCektuZpIp82E/DSh62zcTSi4=; b=RmQGSbjOndAaPZFcTdo+x8PnVRBMPzC+f6/JNTxYOAp3hJ4BigxPw37HADJyPObf5A /pATPUVFDasgWyedzkLcz/hrewSSKT+DrNAH7zSrYwG4Q7gVX6eQ5rtXG9Nqiim/7Aeh 5dktikNh11yGTnWhKsqqTFkOnQzJpRSZLBlWtG3GK3IaO2ZBnC7mDEIxJRutoEZ+lVXb dYO0mBewV9T/19RkSHy1WCtx7VIFsBs7nkfr0bfbVFPBSr+vbK9MtDIqaAHP9MeZt68b 6aYJnSDaqyKqWHVT5QAu83gNOe4ipNtW5YWCzvA0KYWP6E4/LkZWQQmEK2aQ5kAPiCKN oyig== 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 v6si419594wri.3.2021.02.20.00.17.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Feb 2021 00:17:36 -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 mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 11K8HajX025625 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 20 Feb 2021 09:17:36 +0100 Received: from md1za8fc.ad001.siemens.net ([139.22.43.213]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 11K87Zo1028373; Sat, 20 Feb 2021 09:07:35 +0100 Date: Sat, 20 Feb 2021 09:07:34 +0100 From: Henning Schild To: Vijai Kumar K Cc: , , Subject: Re: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch Message-ID: <20210220090734.60a591c2@md1za8fc.ad001.siemens.net> In-Reply-To: <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com> References: <20210219195719.29037-1-Vijaikumar_Kanagarajan@mentor.com> <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com> 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: mz5Z5lSmpgEp 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. > 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 I wonder if we can just symlink debians choice to PPS, or mv, or even "cp -a" And make that a new task we call apt_unpack Henning > done > > dpkg_undo_mounts