From patchwork Fri Feb 19 09:57:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 336 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:c583:0:0:0:0:0 with SMTP id x3csp8991738oop; Fri, 19 Feb 2021 11:57:48 -0800 (PST) X-Received: by 2002:a05:600c:3550:: with SMTP id i16mr8579403wmq.170.1613764667984; Fri, 19 Feb 2021 11:57:47 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1613764667; cv=pass; d=google.com; s=arc-20160816; b=D/x75Dcbrjn1ROCr8vcPFuNlximCnUV0iiNyUP/Vv6mahljhRqFayrYU04dmO46GxW WcyrX0t63zhshWihIXUrLoqaXIRd/DTeq94u5xmzo8IfmsxV73hnqB9MvBt5+jFO8CAU gNFRl2x8YlCQYf9NSJfMCoN8L2e2xHaBxoTyI9bSKI25AbqSL88iWdXUM5rqVB0TU7Ro T+6amocNlgf2hLMDAX5ko49QPN4r5LMRcOBXlF+NnTw3GF/KggTfDeM2Qa9hWylcr68r HT6rjs+GSKU151AhoXUKoYTjZyE9GC9XPlu3oivMBYRv0m+M+DvUSD9yi7zUR5GVkO+y ozwA== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=hKJsfM4vN1jDCcsSuP4JEL4QBjY888guG+Lgd/d6okI=; b=vX1/Ybb2IMzM5yCiKm1DIew8rLt4mIm880jtBMU4J29ri4AFluY5y3dzlaJEKDEj42 sMmLkcDMiWR+YnXYgPxrGZIWb0/vim/Ct4fhFMJwIIBi2tq1j2UEboUkwp/IFzZEi+OV gT7jv31NX2fOAeyqPDXhf5BO/PjSXbLivMs+Qm7zHRPCEcmr3icyxRfIFLJL/5eOA/OT kKcIZkz65YCeCKWg2yxgdnPruvlcOpZMXziBNSSTrH6MTLGWAJRy8Qy4y9M5hORsAc/R +5wrQDARxTxxbInArimFfugiAzu8d8+EnlneH4ex9MqwsmnHHDsHp4+dH6aay/sJjSw5 9QWQ== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=CzqoUa68; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo5qycaqmgqegllj2ya@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO5QYCAQMGQEGLLJ2YA@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id f9sor4899908wmj.10.2021.02.19.11.57.47 (Google Transport Security); Fri, 19 Feb 2021 11:57:47 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo5qycaqmgqegllj2ya@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=CzqoUa68; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbo5qycaqmgqegllj2ya@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBO5QYCAQMGQEGLLJ2YA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1613764667; cv=pass; d=google.com; s=arc-20160816; b=K4+T+h8kY3yyUSYqQh345/4ac/Xm+Ht75NUM61GM7AgJnfMBcy7/vqkRbsMqUYu1PV ED0DC/oanMs/72/U2J/uVyzjhs6iv9f27tl8NpUhEaS2fAAgHWkRvRAcZOELJaoY535n fOQi1OqCxX1t4smazGTnZ47I2u5RUCrq3LC6rbCEOMHTdE0Cm+IHWiZoxfjF4ghzH1QG QBWoTUmnOwJ6yy131GTCMeliD9JJq1cVJpvf0/z81A+P474FLaFhqTt/7qYwmlTpNZBV lkNULuOoubRalrHkfPoWOml7H+7cmcaX6gsQN0nEVXLLTMe+vtWzPFYbstdgbw12vC7Z FYaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=hKJsfM4vN1jDCcsSuP4JEL4QBjY888guG+Lgd/d6okI=; b=n3xVLOZZJzTgb8bG71Bdl9L8u5QEgqGJneZxGPKxPqRNAiHClfGtJ1l7eQd8apLOxo m7d6VLG3ojtuxGYZaH5nydz1Lp78GrbyU4NOkyBdk3rgz2lORUC75XKhA22drqSKgoBG 29bC59bedbWNz4Vn9NlFEQx7in24htR+CadeLeXEgEoJDDmOCCmWI0LRuhJUIlropjE+ c4YAxdfLfhUgbe61heyO6jKxWmnHdBI3JXvAeN8shs/OsYgrI+oAtzPOFFbhFgH5dCz6 ZLTbGClM9GL2yW16BYvC5mBQ2cvOM3vYnt69WN5fdp2FooVRd9nQKMJvqK/SmSUYJGHB SfOA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=hKJsfM4vN1jDCcsSuP4JEL4QBjY888guG+Lgd/d6okI=; b=CzqoUa689euTBU284+jfP+xpRVw4j7fr3LcCwV7wYvKzVG2XF6GcxzedW/77jev2PY Kq7dv7pN1UwWA3qC71qFlVGEW9+fWDqY6K/LgO6ORwLJwApxBTs8d9qg1jB1wx3BuWhw w8Qg2xozFJfM3dfqsqbR8k8l4wdZvbkGhs7IUcOfrhb16rpE1EVsmCaGw3QGyXENS2UX 7kyi4UwHjZqqYWHVvV1+8L7Paibia5oVPpJHlev+IXbU3mDf2I5z+36X2lIvLIM7qCli hobmFHffRUYzu1CA2A/A/y0hhekRyo6YCSw4+dx3QrcOZnjUrG/4kc+5SBy9Rk5euurF HM0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=hKJsfM4vN1jDCcsSuP4JEL4QBjY888guG+Lgd/d6okI=; b=N3DZxK1TgGqlLa+iNbWrFC8LnzrkaPg4JDWstgtfIvNQJ8ADKvHU5+Vz2TYcqdCchm F/n6xT/3r3TLVSx5Ltmru4cKDQjDA+5ByeNXQV1fYNZ31iO414GLgCW1Qw1xGNxrZzoV QXeTp74GPKNrzqzhJgiC4m3lRXlRctfv4ZXMlMm1+aSKmANySSs38P53j3t08n/gzWAu Ihq5U+k1wafhxstNXun0gHiQi+phXmVWVl3v33vZkO2pDF/Ha87YA/YL+Ifwc3PpLJnh gyTt6pNKMH+fCLR9cyN8zoD5vjW5OEPyWTYm8YIUE9fOJhDZukTiPTxsGxgtm2cyJ9oO wHPQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530OUZE6PwYG4+BKpeDJ1XEiMwj2FCEPsT3yVbckqPrmOWWWeP/Z 6ZRuFZcX3RTDD113NFBi22E= X-Google-Smtp-Source: ABdhPJzneEjZ8nOWZdcZ3staZrQDYd1CAJwG+prOMVCV23yzkyCfLqPjluzm30PrFRNNAxCpnU/28A== X-Received: by 2002:a1c:b78b:: with SMTP id h133mr9618353wmf.7.1613764667563; Fri, 19 Feb 2021 11:57:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f70a:: with SMTP id r10ls906984wrp.2.gmail; Fri, 19 Feb 2021 11:57:46 -0800 (PST) X-Received: by 2002:adf:df01:: with SMTP id y1mr10901134wrl.380.1613764666839; Fri, 19 Feb 2021 11:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613764666; cv=none; d=google.com; s=arc-20160816; b=U6FyG1bbxTv4Uiwor/DkTh3QPf3cPXTugmFf1oOjNwwXHCgg8HOg8ZeXNb+9vEKXlB WasUaY4GCj9cVJeCXRTM+E0s65j1nGD3neCHp6GUGaKokCAAvssDnjJEwaN3RAbRv+/D vGjGULVHsLYPLqFTEY3MWwiDuZz8WPXkQ28W/MaGgpcVa/TsNzLfW+oXA5+t2E+LjwBQ /f38CN4QXHeaOqDvp0JnqI5fQVDdYNlZRMwRkatsQ/+5Q0ZjkZwsg/yXTJp69XRoh96v MlGuL7r7SU9CDfNsg+m2akNuD58YA5CFVbOK+HDV9jTHsd4LjotyjmtwEqM+PEA9QJWZ M2EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=NnKCFfWTzleZA/iiCqJBm/nWNDAN7zph1TQ3AeVywyE=; b=UENK7DS0nMux9gq+GW57OxuZoL4AcBC9hR13ZV1Rx5mqiNVd0wVMaNBMdA18cjyL8Z WUt2SMEwGk50CTI1xIl4SpI8awg3myHfPoXmkJqUgHUDOgj3FePYubFFLJJ8NIDFkUwx YzYgI+/KZovd51SnDpGOk3UqbMH6Mn6oPlCXzBUsvmuFboUU0lKo/YfdaH5hzJ9duQde 2K4Pls4vfpjQ3VagL7ZQgsl22YSbTtPaCTgHsWAZ2Ao7b8+zQaxzJKqnzcWo8PrYyt9I 0huTG4sLd+x1PG7LBsguoEFDj/CE8XnOb71cvuvrqdNFP+vWGjnQlYsofL5cP8CVcs2v 8aJQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id f6si199833wmq.2.2021.02.19.11.57.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2021 11:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; IronPort-SDR: 0nMRKZh87d9vExlAjq9G35B4OBSxfjK0hUF7fBKY9v0+fu+2nUjQGC6jWdwyeLhsuBk8/yBGrG bccmlvD4foB5v6wk+skfhHuTXIN3Z/JW423Scj3GE9T+NnEMWnaiuRtXs6/zIS6f0B3FbErs4a YGhXygJhfA248Cy7foo0HpeARfJ9pd6kSibC1dlmD9U5UpSWYhcfUR+DAUOEJ9bUA8XJekG4/x LZXtbHZl5o47UdiADiukeMEk7qxW8RbQ2arhbgxtBNXF+NZHQz8IkzGvPXvRO/QZVimO12h5qD JlM= X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="58305037" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 19 Feb 2021 11:57:45 -0800 IronPort-SDR: EkFF+DdMOlITNCyh9ouZdQguVdoAPdAWbc3xZ5zcNRWE8UTiFAD07+MFFnmD2HAVLvt007QfSV 3f4kboLfzmaJ6RDooHqc/rFUzplRLB6YR06r/0U7VWyqQzVm6Ywn34PleMk+qPHYN8i68SxQjY deZYH8jduy9xBw7n11g47HGdhssMhJ4T1vt0O71424FkWdegr/7eANj3VdGXF2ks1qST9w94tB L3Jxwy0dv2lC8fpfLIxUGi8kGcSEH6J1HHiLgEyfdtVYErsiF1vfZqA1HY+AtEqFz/PFmgjhTW 9cI= From: Vijai Kumar K To: , , CC: Vijai Kumar K Subject: [RFC PATCH 1/2] dpkg-base: Handle custom source directory in do_apt_fetch Date: Sat, 20 Feb 2021 01:27:18 +0530 Message-ID: <20210219195719.29037-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219195719.29037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20210219195719.29037-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1692154900515017963?= X-GMAIL-MSGID: =?utf-8?q?1692154900515017963?= 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. 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}" done dpkg_undo_mounts