From patchwork Thu Nov 26 01:19:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 229 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1229582oou; Thu, 26 Nov 2020 03:20:10 -0800 (PST) X-Received: by 2002:a17:906:f744:: with SMTP id jp4mr2272340ejb.122.1606389610397; Thu, 26 Nov 2020 03:20:10 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389610; cv=pass; d=google.com; s=arc-20160816; b=wqaHyxIcy1mYyoWtLtGAakAgnth9aTQv9sAyDzJyHKsLHabvD+AfSDFOWUl1HIxKYq hFgo6kT8y6iWm489e7nT2LWCNaMfdWikYVScR7+kBrxvPo2j68NuFEFElG453VMWow6y kxC7/zdBC0I3IK1uQWZQYz4u3Bh4LPdOnneXYj1KSy49FBWdhfU2mWGk9FZePT83wPEq uuEShSVRNGilf57NosizbM8wPqcFQsw5yeiHBrIE0RslZ2cUIpdp41dZM0MSb9ndcOmf c6cn9KiMni/VroB/DvRHXZOO7ZTTr1Megm3zzNwkKQCMwacSwqm2V+ZG3MK3l+zhc1a3 X9Sw== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=lX1LveTENgbGBLaco8JMMFTqhq1tRdvCAEWYH8NXV4bqApTAVJsob9An6gT8kyo4gt 7WrGfuOk2FD69MwzsM8/xTl8K27gyA+pE9Z4tSXtXfQAQUkH+mgfqUgEx36za6ckl6av zS9I55X+Fxjb2rqA1fyIvke4xQ5UCbRUlXCngP/Zt8yOpXZo4bEDu8D2qBEyL1LHGznu o25UKrshEXMcf+68xsXEk0GnK/uOKuDe2U8LYjnQItv7xvcOE6ckPw6OMveBfflJpavr PJ7rn4poBCrDrH7TT/rubylFA5AWBXFn2SuWRD4BJ+TJNJbKo3KfD1a6RfJj7Zs+hVMW Fzsg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=WKvNYv+d; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2M6736QKGQE7WPO2YQ@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 rp24sor3287729ejb.56.2020.11.26.03.20.10 (Google Transport Security); Thu, 26 Nov 2020 03:20:10 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@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=WKvNYv+d; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb2m6736qkgqe7wpo2yq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB2M6736QKGQE7WPO2YQ@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389610; cv=pass; d=google.com; s=arc-20160816; b=HunyA3Ce+AzKjZJiDYkQOjxvqHwqldsd7HVJeIESaVZzqKGyRzukr8qvjAG2PIn/Ue 3AERsoU6Oag6nhvVAUO30h+LfgbN4rw1Y+CyGICoNW8l3yEfri9qj9gzQKb7rc2jsU1b 9U23oqRW0OZUcAdggwYXDW/rTXCstbFnSZHWuQEnx6IpdjrpRALFwd7my+fhuYB3E92T FVKTxMv1YCcTu5VI4lbHmbvHOgk7tPhvXPBGk0V/kYdX4sGoaskraTJxS4uYbiY7EbI4 BEC37fwZdVPdeAd1hPud/PijJMHSqqq19bEzcA6nDBuRQlTHVRjr8KBjd4uC+/R6AYvo tfTQ== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=aa2Cv9WHdhTO+eVBNPVzrrOMVQBHOxZv1Cw1w0ePp1/MDXIr4dp4Lp5UUffjArD8dO ms/m5aWoa9uSS/RoJvb8qQQDj8//SVHJEzBiqOdCPtHrxA0pGjgQqHlusk4CPXY6KAUZ 0bmFA52u/c6FAs/bG+WGvKVyZOsK63xvkX7dZRHj8CrxXeZYnr8ozutsEJz5kasBb0Zy GDsBeksednHA9c4kl4yZDCPJLeNe/5JuyrjkQJE5bfrfjmUJXn0lyFd4Rp/CsCmB+qtV AGeyaTwDF8mlhiZ8Oy91CNeN5DRm3jQeiN1mzxvoOx6V4yvRiRGa6b0jMxSaCzOVaZzJ kgLA== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=WKvNYv+dzQ9PnaG3ERAxyjVldq7IJ0n0HOyHUcW2HA9csKaTaOM9fjkGIM3sul0O1g gBrm6YxqeynCMZZS6AVY0V1gwoMkWY5OENqMYH0RVA5vxjtMVGB5OFr+Bbg4FYImlFCA +J2gY5MAmIYkBXCEwoMOEsuLKenY2tDVhOj5o5Ela9zUtiv0DfAIj2uyhZaewDVHhbTB skXMGfGiLu0N01olrwEvZH3RDsGXVT2XkvoyAZU11wxUGCDbfHzTWfB1L2u5J2mpCkwe w/Pj5IxQE2zrufv39g1sUllsHXb30xcz2GtHNkkxasDvR2GfCBGSBYyupwj4/OMV+hvQ zf2g== 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=NwpIS5SFqii3IgCAiIZdFgXBp8cbk7MNZ0zxjbU8flA=; b=J2hHLQ/jU8wHO4x2ltUvOzSqyDYrHLBXJoXioT22KtKrdKyVwNDdLBpFdkmmrH0Ngi GzakbDhlem0Q1zXKnzL/cer5T1+J4w3IEtNEDRdooi4zIXtQHHWR+t5G4gKHT/RjCK+o jGDqz5KLVIuAnMGeZ7plUn5jX9KHcIdfVDwzpcKCjGxnNkyABXCHXbPbEUzNdxNrnqsD lSgbNnxoBEstXkdVPTr5+/RYdrVLbyREfpjT3otgenpVaKFlZG1ZN02CtT2Ukiawv8be iGg0rv+5d8tWEFmGENp2SNbgiuJweovVPMjrL7vyNsgsrnG4RDYkT6JdBHNOzPMGVeiM v3sA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533jJC3J1nYhh6CphuqK637VNUICkcjHj9gZM12KKjYC/LpAnyDO GcJrM5mpVT8JfBQnPUbnPn8= X-Google-Smtp-Source: ABdhPJxaTwGboHNOwvkvi/nHBzuqjoL2JIKhT8wCrisxJ9DFI9XUODJsJ2P5cnOy5qy9N31iOJWxXw== X-Received: by 2002:a17:907:a8c:: with SMTP id by12mr2201580ejc.196.1606389610135; Thu, 26 Nov 2020 03:20:10 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b5b:: with SMTP id v27ls772871ejg.7.gmail; Thu, 26 Nov 2020 03:20:09 -0800 (PST) X-Received: by 2002:a17:906:4059:: with SMTP id y25mr2206181ejj.498.1606389609247; Thu, 26 Nov 2020 03:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389609; cv=none; d=google.com; s=arc-20160816; b=yGQ1sR1aQ+CHyiP3ugpkL3+2D6l2p4NznMQWPGNDcdXJ7BEfCVch/whewaUsU03Vi1 zloz7ikYYYi1FwFw2xFdiHFvNk/MeTXzHxnypBaPPUDLGD7W+/g67nyOkxP1yB/YldHT lbC0CtH99xFVRkwQnAepOotDvL2TomzsQTw2tFVhS4QD9f/ahgW2HxNtlpn3L9iL01P+ /RP+D5nOgHEIFG6sNSSJ7hTJBRurU0CTP3rKs3TI+zepG9W5qWLmvAbxVVJINx7OfSDq 4fPViBJCf91m91jitcSEFh1RPx2lCZ0CgeJjeNfmmzhPO/k6z0xXISud3mruI6ZNUlTt aH5g== 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=Pm6IAkSMDMZ8SW69PBUuWuZuVdTSuho2IhTBTP+44B0=; b=lYRPQaVo3FzH40YHFCAG54Q9BbD1tQ9ulT1lW4zu2MTghVCK2ORXfX460ivjq3fdMf XXpSkWuq+sewD1CCHtcnTqiaiMzSB+QyBHVh2QSZ4+SuwzIcNPWaWbTm9kB8DYRvtg02 lI7uGm56KFIaQ1AKn1pPOkvgXPCXbgwXFJKMJId4pzK+Q5zn96YY7PktNOfaoqthas3t SP9r0pJyNRAvTo1ewVuHFkqJxzwaK20R/nhvMPL9Mivrn4smqkAsfHk7XOeKtnTwJvGE +FJWu5ixtsGyA8wjn25fidGeUutHygJrpQV6RfiOIQ74fT2vMnVRJbhmSZqIbvZiQCHk S8Qw== 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 v7si292239edj.5.2020.11.26.03.20.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:20:09 -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: BlGVgXuS2nm30FDTa8fNtlrXs5oz9voHCS0wOaVAcwdSajTunDRQonWdMHzHEB35NuHgPhEi7T QcWWrgqeNPL/EjsKj3tf6+akWdqTI9BspxJgbxfRAnVDRs7FdJwt15nwWJJAy6XM35Z9Lsnp5E SHpeLsaBL/yEK9qymoJvOadLAZgxXwZd05poKU0+EPIZVE6qYJYBSaMY78qvGVFaQWQxsy4g4e AfnC62NpeM8nnDdQafdiRdDdOonjnaZou55CgtdM6QvUUDYvTue6i/YGWA+NmksJ1QydH/MIt6 LIE= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55500425" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:20:08 -0800 IronPort-SDR: mgABqOYTLwXhdrmXfUdZ4IhUCRI+Ymgta8UVArat7czAGtwGHyORLYilqYyD+359k8Ef1n2kDq fmdXorGRBLWvExUa9cjwd1D7zlN35E5sK46GPFa3KOxNMOGWAxM8Rp+B8cVnmtLwFlIL3s5miX BZYwAvfwGy7kBrEtflVncd53uIqwlk34+VPdBoYGjul5HQ68F0z7cgS448+t6Rzg5gwZqm3cX+ Nm4AhXWSp0cFB5qhiiomJtow/Y9IjhdT33HF3EwgSVXtzQ/+FNohiNvKH2Wrk5dw3O9H5rkg4W +yg= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 06/14] deb-dl-dir: Factor out the mounting part Date: Thu, 26 Nov 2020 16:49:04 +0530 Message-ID: <20201126111912.3037-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126111912.3037-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-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?1684421591966652061?= X-GMAIL-MSGID: =?utf-8?q?1684421591966652061?= Factor out the mount and unmount section to separate function for easy readability. No functional change intended. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index 410befd..64d1823 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -14,15 +14,30 @@ is_not_part_of_current_build() { [ -z "${output}" ] } +debsrc_do_mounts() { + sudo -s <"${DEBSRCDIR}/${rootfs_distro}.lock" - sudo -E -s <<'EOSUDO' - mountpoint -q "${rootfs}/deb-src" && \ - umount -l "${rootfs}/deb-src" - rm -rf "${rootfs}/deb-src" -EOSUDO + + debsrc_undo_mounts "${rootfs}" } deb_dl_dir_import() {