From patchwork Thu Nov 26 08:28:10 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: 243 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1569301oou; Thu, 26 Nov 2020 10:29:01 -0800 (PST) X-Received: by 2002:a1c:a9c4:: with SMTP id s187mr4793731wme.180.1606415341596; Thu, 26 Nov 2020 10:29:01 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606415341; cv=pass; d=google.com; s=arc-20160816; b=nV1V1ooZOCFTf0tmWsDIICB3cusx7v/vQ7PXxec8KAjOoloPakKCBIEiJ/14AdZsNA NNdiR7T4DkgEf8lyF8n0EUkUWL6F+EGXH1WzLe7+tX9LLl0ucH5SjLlj5DaEr+iyGmFd PjanPN8iPy0RkW7rQ7wPdApa58QsjNg0gfw1eZXE4ouk9mz+8dEeK1XvFI6HeoUDZxbd kwmgJDwR8Xg5OUa47w4k60C5Rhb1XYHULJWd1fYop/TikuoAMTHtybyb/YXwlqPEYrlS aPPvHq9hWVVQkgCWiM4gpys0W/jSJoXx7KnG+YW7wxew0ns9NId3MtiSS24Tw6KC6L2V GKBA== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=OYjSKE7FkWqZE2Atnnl2G59XLvFONBZOgptjDpwJUFsJrF4joKnCCQVkOOlSwGsL/j TWGW9k+zCerzmPqA9trWGX/HF6yoxv+hQyZIMaZCaSuL2V//YTPYYl+eAyxXtpdJzZoi hGRnBfV9fELDHUoe1by1fpJQyvamNyZkcmEozSdaL9AwfCN2VTOoOKJwNpwIZqMON/ww hY24bisWvZDoVyO9DemsTmrpmkhncyp36JHXarC959+u39k0Vjhh9Du6AOnFncdvY2H/ s/pkaEi1mSYAtvfNJikPBUzTx64BVSmPHbirBAO4SFWsH2UpSpPXdOAtHb8M+Vd1chZW 9QQg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b="dwt/W2qs"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3PH776QKGQEX7G7MIA@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 p10sor3246205wrw.43.2020.11.26.10.29.01 (Google Transport Security); Thu, 26 Nov 2020 10:29:01 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@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="dwt/W2qs"; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb3ph776qkgqex7g7mia@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB3PH776QKGQEX7G7MIA@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606415341; cv=pass; d=google.com; s=arc-20160816; b=ZamW/5M9FSjXtTxZn6z0x2HxumAKoEHSZC6UMdFXS2wvB7388EbfWWGvkmqY/8X2BS WRqhIbtc0SKZe/p/qL6xisA3a3SttOS2ubErr1O5I8JFMtpGCIP0aewBiddsPf9ho3y3 JZWwLJ2zoIypOMoElT/ZyWhDzUVWUC1zGG8XY01n2R0lNtLDrFQH3q2RyExyvvlgY4I+ thYQ4gGAQhbTZdQv2lQU5JohB+xnaoLP0tt2XxZ8HA59u/wuNncnjyuWYCnHELtPrSwC ElczmwVA0+DIV+Ii22GESso8q/1lyw0I+V+FpCI1ldI2KSXpgnGQqmq0RfiWUMCS+SH8 Y5ZQ== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=O7l+t2eoJn41cqZ6WH8RmyKIF7rnuSTUwQV01CzXUQwKHe7xdWDLrdQMqES200bh1d 5Ej7uk1vD5u5CED0Pm5GLVQSjoUtlRccDOejlTwPqdGKkkVNtjMokhEPdBFoUiRUB0tc MRC8I2/qbNKjZs+GEblhjWRM+oR26+6Sl/8jESTUoO3VmVucQal/uJ1sXYwqeft3EJV2 z2G9g9uUvthP3y0F3Hlf22qFsBsrQjbl9twgB09Uwp1IW9P2hZOXLYSslrUZrCjqluye 73BFumtIEjRBXQ6jOrRXFMuUzv5S4SF5aEMne2BfHwhWUBfRq8MFWyEGheUBFRSby5Vx gVtA== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=dwt/W2qsvLqZImaT48yCYiW9Wx7DNMjLKUniH08/45VOyHAmRorUfY8tBrkgvHJg1V be0aDw/C85AjQCGmt1MRZSkAJWU3xvbCliwpqUsVG+Vq3aWv2xkDSJLLZqAZYO8NKxlq A+CeBEefE2AAyXIEnkMOp6tP/kC49wgFmsg3T0RfUB7hyaDhSi2PE6iUA7K8LCWGVSzh jpBuSM6tCaaY2EpWeJj9RRXEa+z6VKKCpnqLycN0GBe0cRguMcDhx5qtZpI227wmWmw7 SgzIZMclfs5dbzg8X+iwIKeOMNi+sDkcRRdLEKuziezBZ6BySs4D2FnyQqbqTsMY+0Hp Lbcw== 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=Kx8hbm7UmDRRkE6W2SQIl+UJh5T14EcjAkT2JRbp2JE=; b=Quxgsw/euoa9hWd3DKhTPR96gxIwaGGCtPZKkMjFilxU3ehyxNKYXPkOKLwCi6XbsG DoScEuGpj+jWVb20JPNzUsVVf96Ry9hMfB3CEbHh/bi2z4wroLfIPaBJ4SHGp7wgKA8Z 3BaV5NFf67d2aNTO2jzZSMA8GIPoIyamdEOXY92A9mdOU8o15BRJyCOgbNs6VTVAS4f3 nMG9s9bJzGJpx3gssIpyokLDvfV5keqc+Czd9hwNNew4y70gE/rrg+cohI5uYhexsF0m 9uP8OM0SwpzOBLUvbnMLI5AKiJeJdVRPlWw+oCtnmBwmH8xiLw3oKSGNuE7F2L4Kc+hj RT4w== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531Z1YGJtA6y67fwPEsB0Eq6LocqJh7XtcpeH7YMnn7fS9MbvUSE +Bey2lwsf6LwphewSJIIcP4= X-Google-Smtp-Source: ABdhPJymnF1ecevC4XPPDzMsVlR74AUzAmdF/0IvXj9jcYcJqAWIRWrLGAO9Gl54rWuaUCVDdH4KGg== X-Received: by 2002:a5d:44cf:: with SMTP id z15mr5567874wrr.353.1606415341208; Thu, 26 Nov 2020 10:29:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:a4c2:: with SMTP id n185ls1357614wme.2.canary-gmail; Thu, 26 Nov 2020 10:29:00 -0800 (PST) X-Received: by 2002:a1c:31c6:: with SMTP id x189mr4727500wmx.50.1606415340336; Thu, 26 Nov 2020 10:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415340; cv=none; d=google.com; s=arc-20160816; b=WSiEwqr+aPYBGu9f2J3ksfAwFlUixRU+ZVacTG2l6/7suQPDz+pNUKgEI39bssO6e5 16FJBtDsEdQ/4BqJOzy1mvqm2cO+nsegZ3cECrSrH58orXXLUw23sMwmvJyiexxUm5Ed w4MO49EDtDgHrEyfpFXPMVGOQO5VxggsOqtK9MmjkxVP0aJZgYBOefDGla9uWngD2s/9 L4DP8ylr55n4gVnt1WNI4cXyJQCHng+tPOu0UpksMnhDu7YDweRa2xRkezQvy29TY01z bCmh/cqieDcx7220o5Z/Ia+Cev7TZnrLHhnZT4rDzGkCp+ie4CQem0zYcl+/LItQZEFe jR/A== 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=xFNHRVfVS16naSD0VGXPRn0pCP30qtTJMvrXMTt4zRB4Hbt49mVNDTMBegUigLXj+N Y4iZM/UNRJi/rd6Yn0GtNxX2aqxu5dQ7dayIPf1W+0wRBCw24YLoT6zL+w+fDl6WFvGq WInrQrIuKoWjPEqxaNNrpRqDgM3uJG0l94p9WOpSFVMF5MJ+bnG4s8By3PrtBTAuWr5p rCVKlq+ujKdRhZyT8a2YFWtF8OZAXPfDKVL6FBOoqfdnbb/4dfdE0048cCP5ubs21hrX LslCsN8I6ENEjIEk8+sOUEAT1fCxTXeIe9oigiGF0CLnSnmJDrmc0ayyyjdNPhlfNGEK YF6A== 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 y187si226499wmd.1.2020.11.26.10.28.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:29:00 -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: MUO2bO3h0xAcDeJ4uFZteSIZXIVribOAEBJaV7RjijLdcvtyKiwDX0MMC9Ti8qrJJQH6bDtl0c RpMAsALQxX5UQTd4nXFlIa7LEgHgd8byinw3jWhWq6or4E7f62/o6fo4WTJ9Susw3w/89ABpJF 3tKBiDWHlt0cnM9qfP8QPZCp5AVZuvTUFlEoS3luboZeikO1xE1aqVmyRuDvyb9qn85vaCZ6OJ iBvc7GHoeyiX0wugd7Z8d0qVSja30IOrSTcs5Cd6Mv0JNAwnSg00W300k8pU/jaHNLwCEDSpoF SM4= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644676" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:59 -0800 IronPort-SDR: nC3PqbzfU1glXyGRKUJP45JLxywlcN6xyZZPrwPmlXmARlH8ECdRcSMQQCz0AhhKYsF4kKIBkF PehP3fIcIzzvSr0tqTCMLT9Vbqz6VsPNfopUlzzqPsJFnFAUVl2/STCxlIJ2YBjup6ns8zXal7 96y+RiduOorYYZuTuyv7VGM+U63dfNInB+397gTY+7LAGAPjWtSTrK5b3pCHXf9CQikHaRlH/O YeqWC6wfH6bYgdJJQua1zM2q43dkkYNBR3jg0goJ/bbxK+fJCKd4QnKH7ZLSGdXfELGTQY0Aww oYw= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 06/14] deb-dl-dir: Factor out the mounting part Date: Thu, 26 Nov 2020 23:58:10 +0530 Message-ID: <20201126182818.7261-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126182818.7261-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 X-ClientProxiedBy: svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) 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?1684448573360304950?= X-GMAIL-MSGID: =?utf-8?q?1684448573360304950?= 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() {