From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6931066459248394240 X-Received: by 2002:a1c:7c11:: with SMTP id x17mr2951022wmc.51.1613764667609; 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-Google-Smtp-Source: ABdhPJzDKMM+VtT2jJRxfEC4Mp/l2XeB0ttPE8j5EAE8douJvWqrONSTEq/D/9eKju57E4IQYWQ0 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 Return-Path: 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; 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 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 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com 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-TUID: q9hRBI3trswz 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 -- 2.17.1