From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6DA7D138334 for ; Wed, 17 Oct 2018 16:03:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5171CE08CD; Wed, 17 Oct 2018 16:03:20 +0000 (UTC) Received: from atfriesa01.ssi-schaefer.com (atfriesa01.ssi-schaefer.com [193.186.16.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B7ADDE08C3 for ; Wed, 17 Oct 2018 16:03:19 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.54,393,1534802400"; d="scan'208";a="21900286" X-IPAS-Result: =?us-ascii?q?A2FWAQAOXMdb/+shHKxiGgEBAQEBAgEBAQEHAgEBAQGBZQK?= =?us-ascii?q?IBZUAAQEBBoEQJYkEjgmBeQ2EbAKFHDsHDAEDAQEBAQEBAgICgRGFOwEFIw8BV?= =?us-ascii?q?gsYAgImAgJXEwgBAYMcgXWjXRGBIoEuhTqEXoELilh5gQeBEicMgl+FS4I2gjU?= =?us-ascii?q?iAp4xCZBdBheBT4dfhh1XLIhwjR+BXQ6BZn0IgyiQV4x3AQE?= Received: from samail03.wamas.com (HELO mailhost.salomon.at) ([172.28.33.235]) by atfriesa01.ssi-schaefer.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Oct 2018 18:03:18 +0200 Received: from [172.28.42.244] by mailhost.salomon.at with esmtp (Exim 4.77) (envelope-from ) id 1gCoI1-00046L-FW; Wed, 17 Oct 2018 18:03:17 +0200 Subject: [gentoo-dev] Re: Can pkg_nofetch determine if a file is already downloaded? To: gentoo-dev@lists.gentoo.org References: <1539626738.1014.0.camel@gentoo.org> From: Michael Haubenwallner Message-ID: Date: Wed, 17 Oct 2018 18:03:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: <1539626738.1014.0.camel@gentoo.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Archives-Salt: 965a9c3a-88bd-4688-b942-78f0228a6538 X-Archives-Hash: 227f894d4a3dcb86caa6ce473c17f907 On 10/15/2018 08:05 PM, Michał Górny wrote: > On Mon, 2018-10-15 at 13:34 +0200, Michael Haubenwallner wrote: >> Hi, >> >> in pkg_nofetch, beyond to "direct the user to download relevant source files", >> I've found it useful to tell the user which filesystem directory to put the >> files into once downloaded. >> >> Beyond that, I've also found it useful to tell the user whether a relevant >> source file is 'already there' or 'still missing'. >> >> Since the EAPI 6 related update to pkg_* phases to not have access to DISTDIR >> (even in earlier EAPI) any more, I'm wondering if both informations are still >> available to pkg_nofetch in one or another way. >> >> Any idea? >> >> Or is my only option to reduce the information to "all these files need to be >> put in your DISTDIR", requiring the user to find out both the right DISTDIR >> and which of the listed files are still missing herself? >> > > How would you know whether the file in DISTDIR is correct and complete? > Well, pkg_nofetch is called only if some files are still missing, so portage really should have checked them before, and eventually renamed invalid files to "checksum_failure", no? /haubi/