From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6899501277566205952 X-Received: by 2002:a7b:cf32:: with SMTP id m18mr4882428wmg.58.1606415335084; Thu, 26 Nov 2020 10:28:55 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:f70d:: with SMTP id r13ls3466089wrp.1.gmail; Thu, 26 Nov 2020 10:28:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGqQFoPeO0Nw90ydkl10zHZP4cxbNtlV7c7KwTBis/SuApuvulMMNpwIzF4IivgQCWGdA2 X-Received: by 2002:a5d:66c3:: with SMTP id k3mr5477835wrw.123.1606415334154; Thu, 26 Nov 2020 10:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606415334; cv=none; d=google.com; s=arc-20160816; b=GlWpbr+Ylm8Z+pQaKDwALAfrSf1yHnTgQj3dVRnPNx+kUqu8WpNTMJ9h3nwCGwELEQ +V80j43kSaXeeGVm3ebUqjayR7WjEMpoRc6wj++Hz3tPkptSeaKJjfZf9mD9rL7FCTEm L59hERH69b9zp1VCM6njQ4lQAspJzywg6QHiVntJoYRWygjZ0Yf/2nXkwNj61qOLkAd7 N4Sqn5bjtf+yTMhlUf4z9hFtZ8JCTF8EKbFGO2uvvkhO1Mwx+1e3BGEgFeZ5av2GSnsC I1VipiOo6ESu8yMuMpnthkzrfzKlYHWNBwGt+9e26Chm7AObJrd32uRVeg5AkDkt/Y5G 4rjA== 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=Vus/iYkiI3L4K+s+bL8jozuCgx9M8/c1fVDoKvrbP6U=; b=KLqCUvX1+QAuxPBeot/XLgcMsO0q5ZqkREciuzeEW4nV9KfdJtrr9NCGygmJJzZpww 9ZRcmGc1Wa6ZgU39EEln8RvXhwQX1umZveUlOFEKpxJNhfzYUqj8Llsyy1VuboL6HMIp dNIapJkA7+/1S2qgXub2KlsxoXk+HE51WyOIYhdwzT2Esiv7wFu9wKSoN+iEXHQYkWW1 MlApbR2uKn4EyWUi1j9eIMl+kYhHIfeUm9uGWAIJhIKeLkAkC8V5xPa5ieOa/f/Yycpj 7gTp5ThanItTOxViOYr6By3d3NEjxxexkAJfn8RR96ZZ5Zokh0WnKTZgwDZ2m3BHCHvm CDjA== 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 Return-Path: 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.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2020 10:28:54 -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; 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 IronPort-SDR: buBg84mXU1HOt50zNsD6+VvBj+IwgYLWLkdgLexRsizrMXQDCNC6aBnAgoQWdzLbExmlhnSPJ1 D1PeAGdXlQxqTWGXdNVIk6uJcxC3s94KXy+ltb5Da+uFBgKF3x8pTZsKXn7WDDjiaH0gj9cAWt b5iyRwIn0QyWrS7C4G9oHBZSvrEVvyqbYBZAlOQjIFCS+M/Y0D+9O9rz84VX6be6rtgHC4R4OS NoIb6D4oVo1GHe55W23FLiZnQef+C/Bb76f2PLAV28uU8Ur3Xb2MbjKv8Y3tHTHTOwqSOKftzH N9g= X-IronPort-AV: E=Sophos;i="5.78,372,1599552000"; d="scan'208";a="55644671" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 26 Nov 2020 10:28:53 -0800 IronPort-SDR: BXI0GYZ233dfrhHoNwEZhfk0ljUrHc3xqtvfk+LcZxTCYY0e7JAMX12A5UpLXH5RNk6WKeEB/E 4u6OZ1oSSgOVq1C2aUXM5fviN8/OqxO313oCytPG9xk8ZCRiW8D8DOibZ5B0HuBI0JvcGZTEL2 OUe1EhX4wmh2/PcSz1pgEfPNCljNUO8Yuy2Pvyj/6RgDQ90tx9D02660O7kNRcJixXG/cjJ6RM 6Q/qHLXlmdx8fiZHux57/8EqguU53qogt5pQGTaQdrqLVJ4EGTLgcerSkMCbULcBvKMXrjwBzc vUM= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v10 04/14] deb-dl-dir: Make debsrc_download faster Date: Thu, 26 Nov 2020 23:58:08 +0530 Message-ID: <20201126182818.7261-5-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 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com 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-TUID: Pekz+umonFGS Eventhough apt-get source skips redownloading of files, it is still slow and takes a lot of time. Instead, lookup if the dsc file is already present in the cache and skip based on it. Signed-off-by: Vijai Kumar K --- meta/classes/deb-dl-dir.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass index bbc6f0a..0e2cef2 100644 --- a/meta/classes/deb-dl-dir.bbclass +++ b/meta/classes/deb-dl-dir.bbclass @@ -20,6 +20,8 @@ EOSUDO find "${rootfs}/var/cache/apt/archives/" -maxdepth 1 -type f -iname '*\.deb' | while read package; do local src="$( dpkg-deb --show --showformat '${source:Package}' "${package}" )" local version="$( dpkg-deb --show --showformat '${source:Version}' "${package}" )" + local dscfile=$(find "${DEBSRCDIR}"/"${rootfs_distro}" -name "${src}_${version}.dsc") + [ -n "$dscfile" ] && continue sudo -E chroot --userspec=$( id -u ):$( id -g ) ${rootfs} \ sh -c ' mkdir -p "/deb-src/${1}/${2}" && cd "/deb-src/${1}/${2}" && apt-get -y --download-only --only-source source "$2"="$3" ' download-src "${rootfs_distro}" "${src}" "${version}" -- 2.17.1