[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/14: packages: Retain version in file name when repacking source check
From: |
guix-commits |
Subject: |
02/14: packages: Retain version in file name when repacking source checkouts. |
Date: |
Thu, 20 Jun 2019 18:01:12 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit 814e12dc87a191718374d811c0a3024d38dffcbb
Author: Marius Bakke <address@hidden>
Date: Sun Jun 16 10:50:15 2019 +0200
packages: Retain version in file name when repacking source checkouts.
Fixes <https://bugs.gnu.org/34066>.
* guix/packages.scm (patch-and-repack)<tarxz-name>: If FILE-NAME is a source
checkout, reuse the name without the '-checkout' part.
---
guix/packages.scm | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 9d2ab5b..ac965ac 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2015 Eric Bavier <address@hidden>
;;; Copyright © 2016 Alex Kost <address@hidden>
;;; Copyright © 2017 Efraim Flashner <address@hidden>
+;;; Copyright © 2019 Marius Bakke <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -505,11 +506,17 @@ specifies modules in scope when evaluating SNIPPET."
(and=> (file-extension file-name)
(cut string-every char-set:hex-digit <>)))
+ (define (checkout? directory)
+ ;; Return true if DIRECTORY is a checkout (git, svn, etc).
+ (string-suffix? "-checkout" directory))
+
(define (tarxz-name file-name)
;; Return a '.tar.xz' file name based on FILE-NAME.
- (let ((base (if (numeric-extension? file-name)
- original-file-name
- (file-sans-extension file-name))))
+ (let ((base (cond ((numeric-extension? file-name)
+ original-file-name)
+ ((checkout? file-name)
+ (string-drop-right file-name 9))
+ (else (file-sans-extension file-name)))))
(string-append base
(if (equal? (file-extension base) "tar")
".xz"
- 09/14: gnu: isl: Fix fallback URL., (continued)
- 09/14: gnu: isl: Fix fallback URL., guix-commits, 2019/06/20
- 04/14: gnu: libx11: Update to 1.6.8., guix-commits, 2019/06/20
- 11/14: gnu: libxi: Update to 1.7.10., guix-commits, 2019/06/20
- 10/14: gnu: isl: Update to 0.21., guix-commits, 2019/06/20
- 05/14: gnu: util-linux: Update to 2.34., guix-commits, 2019/06/20
- 06/14: gnu: meson: Update to 0.51.0., guix-commits, 2019/06/20
- 12/14: gnu: xorgproto: Update to 2019.1., guix-commits, 2019/06/20
- 08/14: gnu: ncurses: Update to 6.1-20190909., guix-commits, 2019/06/20
- 07/14: gnu: commencement: Return #t from all phases., guix-commits, 2019/06/20
- 01/14: gnu: dbus: Update to 1.12.16., guix-commits, 2019/06/20
- 02/14: packages: Retain version in file name when repacking source checkouts.,
guix-commits <=
- 03/14: gnu: Replace uses of 'cmake' with 'cmake-minimal'., guix-commits, 2019/06/20