From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Cournoyer Subject: bug#28659: v0.13: guix pull fails; libgit2-0.26.0 and 0.25.1 content hashes fail Date: Wed, 04 Oct 2017 19:53:30 -0400 Message-ID: <87r2uih3lx.fsf@gmail.com> References: <877ewf18d4.fsf@gnu.org> <87wp4e8yk5.fsf@gnu.org> <20171001204237.GA11804@jasmine.lan> <87vajxoavx.fsf@gnu.org> <20171002181929.GA10773@jasmine.lan> <87infx2mmt.fsf@gmail.com> <20171003142449.GB23431@jasmine.lan> <874lrfee45.fsf@gmail.com> <20171004165413.GA4596@jasmine.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dztUL-0007ph-VS for bug-guix@gnu.org; Wed, 04 Oct 2017 19:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dztUI-0005fC-0x for bug-guix@gnu.org; Wed, 04 Oct 2017 19:54:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40805) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dztUH-0005ep-Te for bug-guix@gnu.org; Wed, 04 Oct 2017 19:54:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dztUH-0002Uw-Nx for bug-guix@gnu.org; Wed, 04 Oct 2017 19:54:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20171004165413.GA4596@jasmine.lan> (Leo Famulari's message of "Wed, 4 Oct 2017 12:54:13 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Leo Famulari Cc: 28659@debbugs.gnu.org --=-=-= Content-Type: text/plain Leo Famulari writes: > On Wed, Oct 04, 2017 at 12:22:34AM -0400, Maxim Cournoyer wrote: >> Here are the first 10 lines of the output: >> --8<---------------cut here---------------start------------->8--- >> Number of potentially problematic GitHub packages:1011 >> fdupes >> cbatticon >> sedsed >> cpulimit >> autojump >> sudo > > I think the script is buggy; sudo's source is not downloaded from GitHub > as far as I can tell. Good catch! I was assuming empty lists were falsy, but that's not the case! I've ensured purely boolean predicates now and it gets the list down to 650. Here's the corrected script: --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: find-problematic-github-packages.scm ;;; A script to find packages possibly affected by GitHub ;;; infrastructure update that caused minor changes in the ;;; automatically generated tarballs. (use-modules (ice-9 match) (gnu packages) (guix download) (guix packages)) (define (problematic-uri? uri) (define (contains-github-archive? uri) (regexp-match? (string-match "github.com/.*/archive/" uri))) ;; URI can be a string or a list of string. (match uri ((uri1 uri2 ...) ;match list of strings (not (null? (filter contains-github-archive? uri)))) (uri1 ;match string (contains-github-archive? uri1)))) (define (problematic-github-package? package) (let ((source (package-source package))) (and (origin? source) (eq? (origin-method source) url-fetch) (problematic-uri? (origin-uri source))))) (define (problematic-github-packages) "List of all the potentially problematic GitHub packages." (fold-packages (lambda (p r) (if (problematic-github-package? p) (cons p r) r)) '())) (define (main) "Find and print the names of the potentially problematic GitHub packages." (let ((packages (problematic-github-packages))) (format #t "Number of potentially problematic GitHub packages: ~a~%" (length packages)) (for-each (lambda (p) (format #t "~a~%" (package-name p))) packages))) ;;; Run the program. (main) --=-=-= Content-Type: text/plain And sample output: --8<---------------cut here---------------start------------->8--- Number of potentially problematic GitHub packages: 650 fdupes cbatticon cpulimit thefuck thermald neofetch autojump progress nnn [...] wxwidgets xclip xcape sxhkd maim slop tinyxml2 xlsx2csv --8<---------------cut here---------------end--------------->8--- Maxim --=-=-=--