From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6931066459248394240 X-Received: by 2002:a05:6808:14d0:: with SMTP id f16mr14844380oiw.56.1613977912373; Sun, 21 Feb 2021 23:11:52 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6830:1553:: with SMTP id l19ls31986otp.4.gmail; Sun, 21 Feb 2021 23:11:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrnVrnBnATwE/Oo5NEbyHQXp0uSUmwQWBeLEFiPzqNmEH2mVshbYNVDphoUI0/FR2MO8y/ X-Received: by 2002:a9d:6c46:: with SMTP id g6mr4294736otq.256.1613977911945; Sun, 21 Feb 2021 23:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613977911; cv=none; d=google.com; s=arc-20160816; b=bjXb5DD+R3a97FL4TuPFQzcaG7fGh3ZzY8lvJtEdcE3ZGeURIWl+GpDA+y5Vp5hvmf IDjAUeWUXubtOhlV77WLGQif4F40duKIF58XpcedL2Q4iEFTVQQ/kVyg0LK7QYoGRP+m Q0uxjYL1S/kcPev1CI1cM2HrQTA5UQ2dSLe0PPQ0vMMKxSGJu0pQSQhCa6pamxUDldmP Kwt4JD6Qqltk7JCjqlBFqL75X9RsQacaS+9vcfhZ1Vl1HHwwNy5pzPazo9cgHuDcjFYF HLwa8TGQdI9I0GBDsUc/7Q15vL6swYjGLsTIO+tm7DoHkrMuQuCwm5iFfa6RMdphO8b1 BbmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=gdsXOgX+CU/rtoYoNV+046QY5MhEKSNrJ9I1AVKFKi8=; b=0P5vCH7WveOdFRXqlzNTzYt98z66/C1n9Bq/cJCdGkQKDr/sSKvCvCKmwcvaXPa/No knVYJu9WQqaJnmBQUy8pWwXoeGozQ3kJ4UgCNO9nT2ei1o6x2vh8DNvy+0p603JuXAQH VcKNVzP7gh7pXPC2cvqT4yli6wDBx3JYB0tgiw00DAyK78KM8rB7DmOLDamkhJ47Iczg dPJI6FCi1SqLa30T61HOcgwxt5lK4jIrPAmlMG3iRvk+/64biKNOaa4/oO+lLJiZYjYD gZLjT5/lQSbpmCxXM4VF0coNQcf1jSX5M+t4p29a2JqnanMNvuxni/zhI+8yDBoRRhFO 2Xrg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MBVSF88g; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com. [2607:f8b0:4864:20::729]) by gmr-mx.google.com with ESMTPS id j1si1797748oob.0.2021.02.21.23.11.51 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 21 Feb 2021 23:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) client-ip=2607:f8b0:4864:20::729; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MBVSF88g; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::729 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qk1-x729.google.com with SMTP id 81so11712127qkf.4 for ; Sun, 21 Feb 2021 23:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gdsXOgX+CU/rtoYoNV+046QY5MhEKSNrJ9I1AVKFKi8=; b=MBVSF88g597evjvvBhyJsc9DR26LyW/w3mlGtv6klDpED8D9XSggZJZ2OPkPrOdTuP +Me6he9UuHex/f3dgaQzIUMhIi6sQla8MmCZKwKzsD+T8iSU2piWtu+PLiJUMbA5xyYS mBBXfvZ4CKWWGy219/nCRA5eY4i4hyxxjQGQK36IfVgpNgtFI4/zVR9vzkXr7NHo8lu4 v+YKrXEioqFac3fx5CVE6T9zRZ0MzjG8botk2TsjMMk0Dqhy9a3P/7yKOuHJ7n17EexL hHCjzPKfxhqURj48rh09ZVSq6vuegohW1ZCxR8V/3mxgDDOgRRd8MLXIWpAw/5/rrZPU RqlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gdsXOgX+CU/rtoYoNV+046QY5MhEKSNrJ9I1AVKFKi8=; b=X04KWt5N9wcnxDk0DutY6QcC5aOQkY/qW4g5FoZ7C98OPIxFmiW6M3PnTQn9PyHShm PWvGpJTitDkr7cFzijOezEqMoJEfGYzmA8C31kzNHi3q3zqnt9mUkFHtawQu4AxG3yza 9B66kBHl3Sd8vB33YViwgImHQN6JiI2bULNp5Z4HxL3IP9K2TS34kyIFsXaJdJTVIo4e WNj93yyr9pt8RQ8noQSYdNbU1ckE/KdsjEZwwYj+t/znkRfpisJzdVxsfo6JUNtA7S8n 498zumeJfHZuRGUZJaOK8dCOYOjZJ3bf7dgTcKTiX53MoZU9WCtheVElXQs/LeKDDmaZ il0Q== X-Gm-Message-State: AOAM531x4u/BCDq3B/62KVhaF7gzrqoxJSBB9zSS9+2jJLmiE3edkYXU uhacaGXnSyUkuvO2B25k2gVg7nVgcSJVI9mTegEEAf7PPek= X-Received: by 2002:a37:9c04:: with SMTP id f4mr19443777qke.203.1613977911577; Sun, 21 Feb 2021 23:11:51 -0800 (PST) MIME-Version: 1.0 References: <20210219195719.29037-1-Vijaikumar_Kanagarajan@mentor.com> <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com> <20210220090734.60a591c2@md1za8fc.ad001.siemens.net> In-Reply-To: <20210220090734.60a591c2@md1za8fc.ad001.siemens.net> From: vijai kumar Date: Mon, 22 Feb 2021 12:41:40 +0530 Message-ID: Subject: Re: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch To: Henning Schild Cc: Vijai Kumar K , isar-users , ibr@radix10.net, Silvano Cirujano Cuesta Content-Type: text/plain; charset="UTF-8" X-TUID: 23mpiLOW6EaC 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.