all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#34144: guix import github crash
@ 2019-01-20  9:32 Efraim Flashner
  2019-01-20 18:41 ` Arun Isaac
  0 siblings, 1 reply; 4+ messages in thread
From: Efraim Flashner @ 2019-01-20  9:32 UTC (permalink / raw)
  To: 34144; +Cc: bavier

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

$ ./pre-inst-env guix refresh mujs
Backtrace:
          14 (apply-smob/1 #<catch-closure d12200>)
In ice-9/boot-9.scm:
    705:2 13 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 12 (_ #(#(#<directory (guile-user) daa140>)))
In guix/ui.scm:
  1639:12 11 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    829:9 10 (catch _ _ #<procedure 7f096bb0d9b0 at guix/ui.scm:617…> …)
    829:9  9 (catch _ _ #<procedure 7f096bb0d9c8 at guix/ui.scm:735…> …)
In guix/scripts/refresh.scm:
    513:8  8 (_)
In guix/store.scm:
  1693:24  7 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
In guix/scripts/refresh.scm:
   538:14  6 (_ _)
In srfi/srfi-1.scm:
    640:9  5 (for-each #<procedure 1ab7680 at guix/scripts/refresh.…> …)
In guix/scripts/refresh.scm:
    346:2  4 (check-for-package-update #<package mujs@1.0.5 gnu/pac…> …)
In guix/import/github.scm:
   229:25  3 (latest-release #<package mujs@1.0.5 gnu/packages/javas…>)
   172:15  2 (latest-released-version "https://git.ghostscript.com/…" …)
   143:19  1 (fetch-releases-or-tags "https://git.ghostscript.com/mu…")
    120:2  0 (github-user-slash-repository _)

guix/import/github.scm:120:2: In procedure github-user-slash-repository:
Throw to key `match-error' with args `("match" "no matching pattern" ("" "mujs.git"))'.

mujs isn't a github repo, and it looks like there's some checking to be
done somwhere to make sure that the source is actually from a github
repo before checking the github importer for an update.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34144: guix import github crash
  2019-01-20  9:32 bug#34144: guix import github crash Efraim Flashner
@ 2019-01-20 18:41 ` Arun Isaac
  2019-01-20 19:16   ` Ricardo Wurmus
  0 siblings, 1 reply; 4+ messages in thread
From: Arun Isaac @ 2019-01-20 18:41 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 34144, bavier


[-- Attachment #1.1: Type: text/plain, Size: 62 bytes --]


I've attached a patch addressing this issue. May I push it?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-import-github-Check-if-git-URIs-are-GitHub-URIs.patch --]
[-- Type: text/x-patch, Size: 1306 bytes --]

From 57fa15ef15d1fdb0896ce139e1e02c459b285743 Mon Sep 17 00:00:00 2001
From: Arun Isaac <arunisaac@systemreboot.net>
Date: Sun, 20 Jan 2019 22:18:32 +0530
Subject: [PATCH] import: github: Check if git URIs are GitHub URIs.

This fixes a regression introduced in 9a5091d0c181453d0f31ce97f96a4e577a25e796
whereby packages with git origin URIs not hosted on GitHub would be wrongly
detected as being covered under the github updater.
Reported by Efraim Flashner <efraim@flashner.co.il>.

* guix/import/github.scm (updated-github-url): Check if git URIs are GitHub
URIs.
---
 guix/import/github.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index b287313d98..e17ef0b840 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -98,7 +98,9 @@ false if none is recognized"
               (updated-url source-uri))
              ((source-uri ...)
               (find updated-url source-uri))))
-     ((eq? fetch-method download:git-fetch)
+     ((and (eq? fetch-method download:git-fetch)
+           (string-prefix? "https://github.com/"
+                           (download:git-reference-url source-uri)))
       (download:git-reference-url source-uri))
      (else #f))))
 
-- 
2.19.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#34144: guix import github crash
  2019-01-20 18:41 ` Arun Isaac
@ 2019-01-20 19:16   ` Ricardo Wurmus
  2019-01-20 19:51     ` Arun Isaac
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Wurmus @ 2019-01-20 19:16 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 34144, bavier


Hi Arun,

> I've attached a patch addressing this issue. May I push it?

This looks fine to me.  Thanks!

-- 
Ricardo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#34144: guix import github crash
  2019-01-20 19:16   ` Ricardo Wurmus
@ 2019-01-20 19:51     ` Arun Isaac
  0 siblings, 0 replies; 4+ messages in thread
From: Arun Isaac @ 2019-01-20 19:51 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 34144-done, bavier

[-- Attachment #1: Type: text/plain, Size: 52 bytes --]


> This looks fine to me.  Thanks!

Pushed, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-20 19:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-20  9:32 bug#34144: guix import github crash Efraim Flashner
2019-01-20 18:41 ` Arun Isaac
2019-01-20 19:16   ` Ricardo Wurmus
2019-01-20 19:51     ` Arun Isaac

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.