From patchwork Thu Nov 26 01:21:07 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: 236 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:df02:0:0:0:0:0 with SMTP id i2csp1230699oou; Thu, 26 Nov 2020 03:21:45 -0800 (PST) X-Received: by 2002:a05:6214:20a2:: with SMTP id 2mr2513852qvd.27.1606389705284; Thu, 26 Nov 2020 03:21:45 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1606389705; cv=pass; d=google.com; s=arc-20160816; b=pXpGnmTq63aCOZsjRjlNyddnR7tXVYwgqalLUcadUlrCI6XkTu2GF2kt2ebbMbnuxF ERvJD4AEuf5bgC3ce7j1iSn6yYX7Fn4LtgwW9VhJX6lK5N8ytmLmWL2nd/sP5ehPo/RY mVXSrZSZu7HoaCXMPtCEZzzpXiBmtqDT5v4u39TlcregH5GETLgjC29lHRY4CDNYzRqV Uw2A8ULmJ4+ps5iUozuibWP2xUBdKWa0DlYvYPwUMywo7udwXa9W+nwykzkzyChsmLg2 05sqrryY/HSn+v+e1Zt+8z2qdAsQmXG3rhQvm8QsrTu8zYUZeALYb/9I8xfO8bRZ7LO0 X82Q== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=c3gs1HCcPwnBmXE/DeLfImDHxkE+amdZszHdUpeOD6dvl3cTqb573UJMpl3Ob/tDiJ 8eBI8/R1JpNmVl7zIUApSLvyR/DdA8NMHDM2t53jBbpicF/Ne26gvr2KJ5NAwn03EWgX bFrONU89lPC8B5lASqfF895eNlgeRoqUmwDnhwIlZgm9AqU3ngb8I4YXPWM+SXtnjqNZ cpZp/lLSDzT8tZaKHCB+o6RgtNPsKq2AccoxoowvHUlsx717E+Gci3kWiyQV4VkoBt6T UwahlTBQNvfR/oLYOlKn0vnjyQ0gxK0Golo+D/1uoIBQtR1B7pRkbJZv6ShC9LNbHgaB UrCg== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=cw+HogVC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSE7736QKGQEUGIHWFY@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 h11sor3000163qvw.47.2020.11.26.03.21.45 (Google Transport Security); Thu, 26 Nov 2020 03:21:45 -0800 (PST) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@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=cw+HogVC; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrbse7736qkgqeugihwfy@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRBSE7736QKGQEUGIHWFY@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1606389705; cv=pass; d=google.com; s=arc-20160816; b=rr/yWLh7SuuJuQFVbksNwHg25P+Ao4NT/bEkEcw6895O5NXsjJ3FTyUJZzcApFNeB7 is13DEAo0lGIQpMakxbSEPKQNF0m4CQJ6JPefWWWSUHsrTNroL0UTRvVnf3vQF9xvKOO 9c5kp+ytXgTYKTg2Pt833qt94B9QR9vfTyEafdrTKk4kHXKbcL21qOSjGFShVpjULlAM 30pMR4S/2N+2QmFew7cYkEgb8bFkVrHJzR4dnDA7d8jf24YtbU/07xb5n6VCU8BTwtqz SoQ7QPJC2pfvSAj4b+qaOHan8BZmgl9qZgFYRgipGmKNMkG+AEoAgFaVpQM0WJU47PFe E6wA== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=vsO+UHEU1pXFp3ZclTUOii7L/eop5lA74+7aHjBK9tcv4r6gtXRjkfmYwb1HarSc6M Vxo9XSnCXj8fum70LCTMsbd9emU44vV2/G5iWacysQh/Efn9tOz+5vvpF6BhxAIZhzNl K6u0nSbVY0TfPJ12aaTmH/w25tcJnOiLJzx2GpUBiPgbZtTOeofn94IOYpqBPKJmb8M2 3TPqJl9So9vnoD7p7BYoYXZ/6an9u9tgoO5fTu/2nmk4psTx7cwmis8AWUxPN4qbUXLO kcJxS9wF4rM/pOOJt8LTZh26jcnSfj3wnIdQCr1mt1frfmrQCmKuLRO6wumtz7E5FE6l Qusg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=cw+HogVCGkiAT8Zfs++ipPmIiM4jirpE/fN7YMLZzktQGmrm66lcjiFqmeHD0A7hyN K8IC5kGm9k5VDCbHQc3PRT8KXEHl8wZfDRsm1zADJ60iIzHbfJr8pwycv6aAYqWHGFZv JBXY4BcSwlU1moABLF/hCkHHZFejeRDEW4ZGlzxM4tDfNYpNUeuBT2k2SvPSz6VoDalf L6Q1Hjgdv5stwoAKjKeMVNMHwLsRMhP5+zFR0VgpLJbJ2+Owxh53aZLVDjVUxCISe8Bt xeYpMjqVgDIfqSuyzjv3nkW35O260sIaN8MMxyt8N2i0bWMnoF1Dn0vXlpzLhKUIq4yR aVRg== 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=l52mA+spHVBJl1Y4O2NM5kgM/4T0NSO2qDGUTZ2Z/k4=; b=XIsH7kD5Ft9e2ub4pGist+YUio7Ufn5ySPFvXwMtUdW9Az5HDix0Q2lEucBUOdtU04 Y2+fAP90O71e4dcvioZorImsN3E+ovKR+IuyjIiVFQFDQYjp9xb2FSmzaB2N6bJQXvRF 0YvbdLKg6GZAvbc+w89nMv+kA3FOAF24JKSFdqht79z5HKdw2CpSJDC09DZ00xf8gegh Bvb9HiddCryBMBtvyNuAcov2S9eG8qn6glSt/2ST9nEMiF3pVKTaSkGrVx7RbZgrdH0O jtUCOwW90NIrhHok92zNVRbqrEV+Bo6NLAjRNDdJtzcg+9FKxUfbA/aR6zrYUvx28Jjn RyTQ== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533rPFxeObcuQLaU6wzLEwHQJPw6bTSz6AJ+EmPyxK/fVruq2jDE OnQG8QC9Cz9reAucmZ7FUyM= X-Google-Smtp-Source: ABdhPJycRWfrfIW+NkgnEaihFXLswqqw9mHbojomHrAWLCyjsv4XhtaugSWeJtHI51jDKXnJtl8MUA== X-Received: by 2002:a05:6214:20a7:: with SMTP id 7mr2523940qvd.59.1606389705005; Thu, 26 Nov 2020 03:21:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:a493:: with SMTP id n141ls905494qke.8.gmail; Thu, 26 Nov 2020 03:21:44 -0800 (PST) X-Received: by 2002:a05:620a:790:: with SMTP id 16mr2604679qka.169.1606389704637; Thu, 26 Nov 2020 03:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606389704; cv=none; d=google.com; s=arc-20160816; b=H8/2swzwGpvmoAfs27FmU/RWoBwWDWhnv3HorQLa3X53Xa48kJ4rduUDnLqPlqXDxA D8AIAg2dW9tGUsSD8Ipw5Os6ELiuW0TUFPujrdG43gIX2arSL8vdPq/ElCt7FeXMxUDf nh7wRhTfCqdc79O2rfOL19frtcmrZNpOFynbUIrZJjMEhrLn706hGwOeHavK4rwDRre/ xZLgWCbcyBCRHq2PkZCdQmo3ZySBTYvQ6sOY7FJqk3VZ9flsvaLK6JpiBFJTQDf/mw+6 /Wg5EpAl3i0CURes68CZKRHw2HVeuA8w0GXlpaU6TSWIIBlDvyHYGq0OV7FokIXDxkED kNTw== 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=Q48lo71cSZCriedaNwtn8N76N/U2GGAeSpoWv8edEFg=; b=tuXXmMgRhWxOqiFdCJ7pxtCU1yV6gWv297pwvf2JLhC7vs1K6RXLqdIF76kKeN2AHI VJ3gpNuZL8p0FVgbVdYMJ5yFBWcjIgERl1R6aG0EkgKrylMHhVle7xs43ls5ygXOTXBq qFXUeTErkcUOE/V9FlW6zF4ByY5XfDDvKIOhjG4n42vdJkChpqXEzRVUDiRuO6lPpqop f5ZZB9x92wPc+R3jb9l4qif2sOFICyCcFkwc6vK1hU7ieDCaSMSx5ilTynSOy3qlKP3g sbcSNQN5yGiv8CHuia4XVRJcBIUGBqdzEMVZIRKb2gg81eIKqshvkmoEs8h8vIE27Qsz KVzA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id f21si113872qtx.5.2020.11.26.03.21.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 03:21:44 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: K2a7DTJkJu+vAdcP4EmhYVF56OfZTwaWEn64gpvQRiaygGLte4Lg4CqvVXiwwTN1B5Q1ZvRXS7 w6C8o6VLzUCt2FgYeiS05ZgV2Mb9nOIEppqbbNF5kCj8YEY6NrvDGvyXruMVud7gAszE1RZSIF 3974shqdEhKGp48MJEcTq6W7x0uWGz97HkK55XEhp2L/AzRCpijRo6xMKOULBD85pSx54hq8ve icsxbiTP6rBlnDIuFAR9DoMr5aj/r7TKE6eWe9bjIJrRnKMu3tGgslSfQgI2QfcROcInT8psX8 sz0= X-IronPort-AV: E=Sophos;i="5.78,371,1599552000"; d="scan'208";a="55523590" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 26 Nov 2020 03:21:44 -0800 IronPort-SDR: IQdwUck33O0lbu+4u2lmFPyS9woRkFs1xOOMHu/7HWQtqZdhmzGmMlfGPCPj2nsjt2yBVc5G5K /Df1xFoyG0aqba5u1LQY32a7/AAeenIWblDXvBVeZI2c7/TB3eHZ7gfOXaYJSi3UuAWJEdwFgE FJ4cAVGd14uddSQLMpfT3b1BMBuM34JOBABeiaGCwzD0e5VNrKM6JleKYG+q4hKFHgKIrOlqoz C3+/yPrPGjNahsKOyoOpSVxWfSJ0/c8Qnje8GN/B9GmXMVv+2rpHEjbRO5EJKFYn2ljQm6HgLc cHE= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v9 13/14] rootfs: Handle failures when postprocess is rerun Date: Thu, 26 Nov 2020 16:51:07 +0530 Message-ID: <20201126112108.3320-5-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126112108.3320-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201126111912.3037-9-Vijaikumar_Kanagarajan@mentor.com> <20201126112108.3320-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.141.98 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?1684421692071537856?= X-GMAIL-MSGID: =?utf-8?q?1684421692071537856?= The apt state information in var/lib/apt/lists is cleared as part of postprocessing. This makes apt-get calls in cache_deb_src fail when rerunning the postprocess task. Since we cannot run apt-get update again to refresh the state information, copy the apt state information from the initial bootstrapped image. Signed-off-by: Vijai Kumar K --- meta/classes/rootfs.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index b6dc2c8..f7ba4c8 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -189,6 +189,10 @@ cache_deb_src() { sudo mv "${ROOTFSDIR}"/etc/resolv.conf "${ROOTFSDIR}"/etc/resolv.conf.isar fi rootfs_install_resolvconf + # Note: ISAR updates the apt state information(apt-get update) only once during bootstrap and + # relies on that through out the build. Copy that state information instead of apt-get update + # which generates a new state from upstream. + sudo cp -Trpn "${BOOTSTRAP_SRC}/var/lib/apt/lists/" "${ROOTFSDIR}/var/lib/apt/lists/" deb_dl_dir_import ${ROOTFSDIR} ${ROOTFS_DISTRO} debsrc_download ${ROOTFSDIR} ${ROOTFS_DISTRO}