From patchwork Tue Nov 24 22:02:53 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: 196 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp150575oou; Wed, 25 Nov 2020 00:03:46 -0800 (PST) X-Received: by 2002:a5b:886:: with SMTP id e6mr2406461ybq.473.1606291426162; Wed, 25 Nov 2020 00:03:46 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606291426; cv=pass; d=google.com; s=arc-20160816; b=aazVf1GHnn7UGhf3BxdxFAJzXhy0kCR/65EuWa9A40h69+fnzwXZ4uXRd+ypNnvl1G 7tb2uUAPVhkxnaGh7p4nLvssPRPpV/DDKey92j2xElNxQ50QVAFnuIuY6wA3MFAQiUWc UZabEUzQUcR3AhuiY1DA9A+KBHe1XNfWDN6byMH19pfkoPuCH37u3hUaNr6n7wXPZ7dF NNQcUMcweoNwNzk8WO25aIuefpdElxrhElPKYcjJf3sELoDBymyMdSIRXzU/75dBs5eo bm7/VPVmiPPKgPFc2wlkdFCBD8VnHrtS6pXgh6vR97t7mquudlt3Ri6NNBsdoalApqN0 Xjsg== 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=6yeDRiSbEoz1lcIixPnEzyCybEX6uactnnB4JQ7SAA0=; b=hmve0YZk28rDBex2Z2GaH+I9gMx7YnkoMAIpJipV+9saH7zsuCMTVCJ1w4egjxcid0 0+h7yMdtqlWDJrdZoCaT3RQviriogZFBm7aiSKtsUJ+5lQhRELPBAkdU5Im60Mbosf3O t3l4iahUoRIdnuS8jq8XaN15b8hQ9nSn9pGyEnwun8f1IEN3OwOjq8RVIDF5e+xDx4AG fJcxY6+PNrRD6n5cf4pEbWVk8AHBqt8kqmsjrcY2ojDvATiZD8aWK4vYM+UMneqt660F PEz58IbRUi5H8J0K305Z4CC+VvL/hqX8zxI//OKH5xyiJOPMVJO49hQSScARldddQ46m +2Pw== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=mgxIy0f6; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym77d6qkgqeztbmuhi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYM77D6QKGQEZTBMUHI@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 s16sor382639ybs.124.2020.11.25.00.03.45 (Google Transport Security); Wed, 25 Nov 2020 00:03:46 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym77d6qkgqeztbmuhi@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=mgxIy0f6; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbym77d6qkgqeztbmuhi@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBYM77D6QKGQEZTBMUHI@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606291425; cv=pass; d=google.com; s=arc-20160816; b=zYxur920zS+N9wJPhjxH+e6s7yopLfkNye1Dp20LBggxJXEJ77fQjnIz9ul8SbzSLH mxnpYaLcKL/6NC1ew9d5MMFWHRc3KWFA1a1Cm/Fg42m/Jfp3cL3PGeT5tjik4WBpVaTV oByygCYXSHPwzTwefeldJbir0TLhZfi4j6mpHZGvVnCWU5MyjZq+xqtOC6TnYa9hwqZv KKFT8WYnZ7ZLVumImXt0gnp8LwNrNVKs1+9Q3Z/50bmj9zvhcYXQg1ZHn3OykKFypyGO 0e67xxYhkbpC6lQQSwpVLCZhjBNprnOj/RfeiMzaumRYCFnKtYjB/5IeRl65NtETCbPP SboA== 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=6yeDRiSbEoz1lcIixPnEzyCybEX6uactnnB4JQ7SAA0=; b=KBhtvUL6F9ftpbs2P+I//ge9slwSJHh5aDxyn96mg8d2qHdFbjQWdpvOrBcbW91SLs 123xyDwykXC+Ihu6nbPVtw91ODho73ub3b8K2Oil7eKpXb/S3fhn2NLeMwTngzYuQF97 KxQT04Rt3tTHnqFXb9cg71+4x+TBXUcmlOtdvdC4ddfSipEMcUZuXXc2rxh2s0BNTWH7 KRE8LY27my/alnxI31mElnPI5zEhCzriTRNN2VpYY77ZCGUfYFqr2Prnwn/Yr+5x4iAg Sq40P31r/HRdNA50C2dAR7Sw1QPPfvLZ9YsY1A2ZRJfVPBvsQ61MsdBa6SnznseRoejW xSVg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 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=6yeDRiSbEoz1lcIixPnEzyCybEX6uactnnB4JQ7SAA0=; b=mgxIy0f6GDy9WyvQuCwXYZBn6O2rd61OgEnmDAeyuJPEoSmKLp0QtGj4ORa248SZyR JflsDATnYdV8YcuApxaQsqU7+Anfu021qqGBvG6mySdBDIYKDLYrNhUaL5syfVtt4OGe JhneivkZQRYBu4g1z6w3Vij+h5RF15wKbwWGFhSvrJ8ynR0PnTSRGMOTeV4YUZcSGrV9 8LPywVxkmHYC0tIpl9qaMgLUdJ39GHuE76/3ANOffZlR64u8xP9t30KdQjpLqPlljqqa /AkpkCotenHHEKewRtrpKhQ2bx1qjLTnsP41uV/7G5zMgvGhozyIJecyJt6DlsnVf4Id iHMg== 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=6yeDRiSbEoz1lcIixPnEzyCybEX6uactnnB4JQ7SAA0=; b=nAaJtrkTGIbiAIRaa8ZgDFrOv/PcpFf2WpxL+jcxV3Ltt3+dJITtzD2ugHT5MqyvU0 Dj7MUUdGjVufbw/M+VuUIS5pLLEjhsPsX+2nWExZxwTyG/kcbastmd/UMKkYg1rHvZmc N3YF3ic7Lfdt6HRw3Gle+8IqvND5aXt0YpVjlI3PIjmMnJSuJ9CtwX97AflbLzX5i7p9 DYkcNH4zHYqrdA078U1wpRfbspYZQzVLVmfU0HVBruq/qO+MXXnlkXkn2Pcdtxp4hfwu pLlwLeVM/YEkfFEPbMwGPv/aDzWYqKfqQkyXUg6iQLvbSQyXQgzKz+rEqzv089asdEgB gT/Q== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530IgetqWXrtkyPEuCqMhUbUlNJbr/jgNr9n0T30pTO+gmVL3+EX 3aGJppOV9Sx1a7kos0Ry3LU= X-Google-Smtp-Source: ABdhPJwqhS/Wdulb6d/DDeZxFYYcauZUq05Ai9hYb4JSPRAmJA1iraLNJCc11AiXYzNjaC2YLm/mjQ== X-Received: by 2002:a25:d34a:: with SMTP id e71mr3656094ybf.229.1606291425657; Wed, 25 Nov 2020 00:03:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:3806:: with SMTP id f6ls809929yba.4.gmail; Wed, 25 Nov 2020 00:03:45 -0800 (PST) X-Received: by 2002:a25:f09:: with SMTP id 9mr2348884ybp.129.1606291425323; Wed, 25 Nov 2020 00:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606291425; cv=none; d=google.com; s=arc-20160816; b=xbrnToagLRmWPqa+eq4kELMVEzSTKiPZRCL17zMNDfsL6nEw+epo9DrtnF6KLr0dfL X0xRffn8qqHJxK859UxFkUSWXHxyK08IGRcH6v5yz1nFkpv/rX+1A+FzzvmiHhFkVbqs C4iin9W1x0KCzBJPVrZdQA1X5Nk9pZj33bLzinVbg/ctGs+9ofkOkf0CJHfsN32rdauE 3hU+VKGwL/vn95T2Q5yGFO3C++CktywsvsTKFtJONmFEqUI1g6Y7LhLR6R68lvNIVYF7 XpS8G9AtiwXF/04pBXMtDuzPbI2O7IYKQ+Eo3yyqUtnHy+KH9jrH0NEmcIn299fWhpsK R03g== 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=bZM/aWGThwLMye7EZ75AOEiPR7aqWqoryaKoK3He8JMg4MOh4+TOVfgTX/mxge3Idk jrRm71R0hp5iHL2Pm4JWU0GZm8/RHSEk368zToYjUcpBpqC46SYyJqi5wW4PgYcXiUVy +ZsZ5Al/BMF3XQF6SNDQZNKHQYQnfiXobe87qDUpseuweyG3Pb2t+Nufl/uTwBEzlzoz 53rMrmnjUJPhQ+U5iX9Kxe3jzSmlITXVfllkJ634lCErtM6xCQnjaMDA9n0dkW2imuCL CAWJZZmISXrtdOvWSGHSzbQrg9g1Wy1mtPlSGqsAMLJIukRR98iDHrbAW1UzU/uNDkxs Xu4A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id 199si77218ybd.5.2020.11.25.00.03.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Nov 2020 00:03:45 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; IronPort-SDR: ltzfs4X5xAUm3VocYTAmor7ryGE52YeUteIGU9tk2Lj+fkDwa0cbrzNHiLiYf7tX/jJpf48fmq yY6dbZSs33+YY4gwArHTs3jROA/d72rAaWNzbLUsWUi1abO2IdZawTc5xqRFpslblUNpWkP8OF MAN8W8z4+aj+uRWnY5yzFP5mQFYLR9P1d9u0pZh83bzev3XH/XCTUjSCU/rPpTcX1Qz0QxVgwZ hdLWlfHtN0qkPiZLfICVBOI44kCdODkKrSZDDepTX4FaDKUjbKSTV/cIdRHXitAtQg1MAglFvy 0wY= X-IronPort-AV: E=Sophos;i="5.78,368,1599552000"; d="scan'208";a="57762483" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 25 Nov 2020 00:03:44 -0800 IronPort-SDR: tlAncAdUvSAvzC0EBB4Rm2cZEYZFVC+w9HER2RJjXhlJ86JszuijiZFhP9WO0LL6b+4JdT1i1w 9VrI7oEhFZ39ui2LPbGTMkV7/mUoJWumzbCZALxrZp8GnAc+9gKClj5TyCR9FKEpuR8VaS8a2e OyOyYJyQGZPEXZS8rfhG3ANidGXwD3c9dpQ4SZfkHkUkY9WlSGHBex978TCRc6PH9+SP/qE+2R yc9pD3t/A7co9QKJqUjQzw2Xzkkj3deWG07HYlTjQwTzCb7uvxTTZCI4QQwHk2LSXtS2BnJv4O kvQ= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v7 06/14] deb-dl-dir: Factor out the mounting part Date: Wed, 25 Nov 2020 13:32:53 +0530 Message-ID: <20201125080301.15818-7-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201125080301.15818-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201125080301.15818-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.129.153 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?1684318638372851649?= X-GMAIL-MSGID: =?utf-8?q?1684318638372851649?= 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() {