From patchwork Wed Nov 25 03:44:06 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: 212 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp372347oou; Wed, 25 Nov 2020 05:44:42 -0800 (PST) X-Received: by 2002:a50:9344:: with SMTP id n4mr1647556eda.85.1606311882544; Wed, 25 Nov 2020 05:44:42 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606311882; cv=pass; d=google.com; s=arc-20160816; b=dXX2F264iTpglFSLfgGVKGvpkKUwGCyw/7x7f4NUomwuXv2cLaYL3aZshbXZw22Ejk 6bAfBVujh7+6hI+8s5vmklT0wI1JNQpaKFqoneMQ/BUPnmmhKuFBJ4BiWntU6myF1ZY2 tTWmXooEQ64etGfv4zhGcM/je7XfDND+N9ySLpDTUzX6DJjC6f7z/aB9utBzxueq2o0k aB3VLtLOSfdyrI1X8PaiFelifNdRa+otvMyWT5+EBPkBvMe2ELogoY25BhjaoPS+ObPt RGsfctpqrUIEZb7qiJ1R5PiTfNUBnGJy97T9RCBO0W5rV5OiGJdKQINQcAd8L87/i7dt HURw== 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=bWmVWSpEx0FZ6xQxIhnsKARAqy1xgZqqdt+O4foR5Yg=; b=LqF16bYfT1GvrQKiFl4NDVxMkOY1Ni9bC+8Q4+4kvm4t8UxWnCsy94eWGGEMEvzYuB sspJf+57sxAk6TIOjPNDPb9Jn1XDgXwDSZo87JZhlkUPsbY2RdZMWt5vb1Ait1Bf6yq2 qx5cXUPGFtXHyAllwXebvooEwb6EfFzC8sovPo0JAujTkha81T5mJUJed5wSlYdAaLd6 LCv/OFsA0+XZEiBHhHKTyXb95RY4MuC+1jpGpyRSxfiAq+tG0/2YVgdrB0EOSrHkuEmw Pb7j/MITDOMKaLnW+85QswYQhtTu0YlO2ZZyk8JjgSKuAybrjTCmn1Qk7gPUU4A1O5Vm SGUg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=hk3S40sY; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbsv77h6qkgqe3r6trja@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSV77H6QKGQE3R6TRJA@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 p3sor2220429edp.22.2020.11.25.05.44.42 (Google Transport Security); Wed, 25 Nov 2020 05:44:42 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbsv77h6qkgqe3r6trja@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=hk3S40sY; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbsv77h6qkgqe3r6trja@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSV77H6QKGQE3R6TRJA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606311882; cv=pass; d=google.com; s=arc-20160816; b=Ef9breBKA8RnSN0chVkj8DDwc+ifT982tO768UAtASM3MGVzuNnkUNX8dcXumBCQTd brvMcstZ3t6uXPRRyiBjbRbNOkVwFJQj06NzvnCFHAcJzAi/cIeIS+8CguGjo7w/CwtD 01JsD6su7VaICHfCXDDsH/UA5cLmTULkJkTT1aGBIJme6wl7EDah/0PZaRKs0I/kvcsG +BEnRKHVUZXyErL4tGRLkgfIcAubPVvr7AAVu3+eVFHwXYhk183ejAY0c1psOQgPPSex hQBLANJ40ouX8Qmm+8BIgvzmffjY/KHdmFNfWzXswZ6qkh8m7NRYtN+nCNyY9NnVrJdD r3rQ== 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=bWmVWSpEx0FZ6xQxIhnsKARAqy1xgZqqdt+O4foR5Yg=; b=xvKlAqFrWQTIeh+hxl3You3cIq4Kn4fJ2aTA6CPBVVta8jyDuAUqxqICiTtXOrX0GP RsogERiygnxeh/jfX8GPg25xQLTu5cgj9iWHoItaJIX5SuTCgaVA8d3QBeIppYRn4a5Y 4k4FMXzrcd9nT02Oh63/BGcI4W+N8ZrgD8SxmAXPDm0t/GAClcrXQWAz+wpfCFiWXGfC u23DjZ4+ZLfiBHpP2K09R87McXfNQZtIMAXW74s8oBPRKtAgNlooySn6vtJcDFA86BP0 lPER/6K1tYnTq6SGDklyh3C2pW2l2ZTaL3CAMRKuCGDisKbS6qUXhXnhSABxqj8Czl3H 7U3g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 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=bWmVWSpEx0FZ6xQxIhnsKARAqy1xgZqqdt+O4foR5Yg=; b=hk3S40sY3uc/JK11CGdBx8pFZ6hEKfrBhtW4+R0exeBwJrT99Vuw69RPttEiifcGBG JBd8BMfIibiNh/sl6CQgwVez0v9rRnJzBWoECWUEQqMtENjk7n/5c5F0hpSuQwdgmaMd m+9yyytpRWBG6gRk9sszlYgXphKLzoUROWX3aR712A074dzQgO5FU+tL94U1oIzy+t8F RjNWMWdtthYfx9BViJ8eKBJDLzCJyKuVPkXBkd5/r4xqI1IgDS2bJra/n/D646CWDo1c IQDK+ZVwmneofLKQFEeFh7X3wfyXrb+9QtbMsGxat5FL9MTFfWQc7zaoRXwRZjLE4Mgj pujQ== 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=bWmVWSpEx0FZ6xQxIhnsKARAqy1xgZqqdt+O4foR5Yg=; b=ir2h95lseRFnxF6D9raxCSXpVTGWKJ6UmahtGpNmw0Q1yZNygKOq3iiPH8Dkc0YsuV 84ldTjYrqBGN6zPn/96CK67SbqgldRKWqpKusutEPVQpETQTYT31c7oPbb8uBJ29tX4z HBpKG0knrTiih1Er3h47oCqg+oWHwDASSLySX6Fnn90M4jdaNc8DlRlL8VFiANx9BV7q BSoPkyS+wD/dl3nD2CHYFadN+5tu8Y2UqfmAwpJyHex9fS9k8gJOgEIGgZ5lTTQtthIF QbqFSfoKwUHER4Pot0fVTsl50xz2WbU7KYtvxy5nG9FbHvXnT1jhDilcNl0+2exFNMhY 8yMQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531/S9/OCEpiReD/XPbSWFSkQ83NoIRETOULXT4k2F6/GjHJlDJs 0BqPnQ6nl/WEZOXbq61AFmQ= X-Google-Smtp-Source: ABdhPJxlk/86gisEsuHafYZSxiG/ndJBKqyRUuIqTD0g6SYX56lX0F1eMBb4HFVW3gi6JZCQhPuHEg== X-Received: by 2002:aa7:da44:: with SMTP id w4mr3409147eds.131.1606311882281; Wed, 25 Nov 2020 05:44:42 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:c1d9:: with SMTP id bw25ls1097125ejb.4.gmail; Wed, 25 Nov 2020 05:44:41 -0800 (PST) X-Received: by 2002:a17:906:a43:: with SMTP id x3mr3077283ejf.197.1606311881313; Wed, 25 Nov 2020 05:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606311881; cv=none; d=google.com; s=arc-20160816; b=05FQ5jXpFJ+qNYfl5AG6SY2Vs28NezVkK5CKGdB9Ekavptp4XSZOdMB1kWFxk9jvtJ 3Pn1tcy1c5OT0BLDKusvCZOTF9U4Li7oiQBuDjQj+xYMP9hw2aLajUvCI3wodsfFFIc1 9gd22dZ1ONIOT1U3ztlsNv3TsNcC1e3RigmZ5ZDRV8+RBM05gtAVzNIs3BqsFy1bghAW pF8q6zk0oSLMvozq2TgBNhprU+le7o7cZMa3MymFEc0zi0CVsMJKeM/QWyInNUdOlgUl R132rXzMn3u2mA6MQP5rDHSH36uxjWHIYDJ2V9t2tcruG7rNwv807GtPZOQbXNM0bGYg NkIA== 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=AopAAE7zNNXq7DVNy6s+zFZp5UrmFlBiidNI1InkWYE=; b=kIrmBqnwTuZ5icCRi9GPI6zPC1OZVrsKhuYJ8TxrgWLMfkG/jFGfl6PxspON9q7qhi IT69TjDkDfDkiQOhDCjmgcFM1o/mil4vEzrpyC0FOqFLdMxSvkRVMhyi4kdl0fNP1zDV N8PEA+agOMl5bIJvZKyIe0oimWHElVI7oULZDQNGW/hVOTza/Wt14r7IqVFBqv4oexmH U7sQs3AApdy36SWuGmMO9zzferNM/zImEUiRzKTF2kyKpqe91mhXI6nXj29E/MfdhNQh LeH3mSzOHYX/GF5qekB3RAk2x6V/swqJ6Hd7/nuXNTKat+hLUQXE1Z+sMPW9tnBTsayl TkFg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id v7si130589edj.5.2020.11.25.05.44.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 05:44:41 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; IronPort-SDR: jxgyWsyB4nTnE9KXMlnX/RsmdHHOSC8pAqBTfsfVGo0PThdikreFCOQylTlisMO5P50njksqZX 9w8rkbX5w2kfB+kyzhk0Fwl57Sf+9vYoZ0tOYXSDubwFQOxPPlIl42ujwQMaIeCiVufahqjHf9 Xb6uFnmGyBOlCiRRtNPS963WUvhKBfn+ecBn9A2JlwOWpiM1W6CXQZbJoZPTHYSLp+F0nilC2s c7pJ7KoYPNHt6cR7FCfpym9Q3/CwWj9pKK29vyPfnEkoO5ZEG6rNvuFoTKY2rjA7WjOjTT0kPX WUU= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="55597777" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 25 Nov 2020 05:44:40 -0800 IronPort-SDR: QUJqhOgusqkEIs5P5cOxtYkFsCl7n0B/AB1Hibm45NaySDa9BMgjsj425kDP5I7ZjBkjdYlcuM D1olnEhMJrfl2R2ibJuZHtSBvroufUlpZT/14OTkbZTwbTRF54DPshznrtfsBvXDKSf8RgGzdk o2O8PeutpVtn24LKTH4+yKTIEsXDR/GuzhSyQv7cwk6IDo1dfzmQEFrNAKisDg8sQzxZavFlaY /XTyZws3jY3f0bGmHeqV3bImW4ivK4K/mXMYA1C57iTR3ZN7OkJ6zRPta8he95M6xFoPlP22jU ecw= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v8 06/14] deb-dl-dir: Factor out the mounting part Date: Wed, 25 Nov 2020 19:14:06 +0530 Message-ID: <20201125134414.26061-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125134236.25878-5-Vijaikumar_Kanagarajan@mentor.com> <20201125134414.26061-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) 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.252 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?1684340088428220053?= X-GMAIL-MSGID: =?utf-8?q?1684340088428220053?= 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 ce691cf..b2d94e7 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() {