From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZyH9-0005Uc-9P for guix-patches@gnu.org; Thu, 20 Dec 2018 08:22:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZy3W-0005oa-Lb for guix-patches@gnu.org; Thu, 20 Dec 2018 08:08:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:51330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gZy3W-0005oC-FJ for guix-patches@gnu.org; Thu, 20 Dec 2018 08:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gZy3W-0000yC-5O for guix-patches@gnu.org; Thu, 20 Dec 2018 08:08:02 -0500 Subject: [bug#33801] import: github: Support source URIs that redirect to GitHub Resent-Message-ID: From: Arun Isaac In-Reply-To: <87woo4qxg7.fsf@gnu.org> References: <87d0pxtciz.fsf@gnu.org> <87woo4qxg7.fsf@gnu.org> Date: Thu, 20 Dec 2018 18:37:24 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33801@debbugs.gnu.org > We could maintain a cache of redirects, although that wouldn=E2=80=99t be= a > real solution. > > Hmm, now that I think about it, shouldn=E2=80=99t we store the github.com= URL > directly for these packages? We could add a new lint check along the > lines of the =E2=80=98check-mirror-url=E2=80=99 procedure that would allo= w us to find > out which URLs need to be changed. If we took that route, the changes > you made to the importer would no longer be necessary. :-/ On the other hand, if we constrain our updater predicates to not perform network operations, we would be restricting what we can achieve with updaters. For example, suppose in the future we have a cgit-updater to update packages hosted using cgit. The only way to detect that would be using some kind of network operation. The way our updaters currently work, we will only ever be able to properly handle centralized platforms like GitHub, PyPI, etc. And, that's a pity. Another solution, though somewhat inelegant and tedious, would be to add an `updater' field to the package specification so that the packager can explicitly specify what updater to use. WDYT?