GNU bug report logs -
#36242
Repacked source checkouts get a misleading file name
Previous Next
Reported by: Marius Bakke <mbakke <at> fastmail.com>
Date: Sun, 16 Jun 2019 09:05:02 UTC
Severity: normal
Done: Marius Bakke <mbakke <at> fastmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 36242 in the body.
You can then email your comments to 36242 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#36242
; Package
guix
.
(Sun, 16 Jun 2019 09:05:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 16 Jun 2019 09:05:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
When repacking a source checkout (e.g. by using git-fetch with a
snippet), the generated file name contains only the first two version
identifiers.
E.g. `guix build -S eudev` returns
/gnu/store/7lgsxmr0rk9f8fbq6k0kj1aqb7lnrlll-eudev-3.2.tar.xz
...even though it should be "3.2.8".
This patch fixes it:
[0001-packages-Keep-full-version-in-file-name-when-repacki.patch (text/x-patch, inline)]
From 0c44561d0d45de91f4674d659b86d740642ae801 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke <at> fastmail.com>
Date: Sun, 16 Jun 2019 10:50:15 +0200
Subject: [PATCH] packages: Keep full version in file name when repacking
source checkouts.
* guix/packages.scm (patch-and-repack): If ORIGINAL-FILE-NAME is a source
checkout, drop the '-checkout' part so the version-detecting code works.
---
guix/packages.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index c94a651f27..5b8969e079 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -505,11 +505,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"
--
2.22.0
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#36242
; Package
guix
.
(Sun, 16 Jun 2019 09:14:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 36242 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, Jun 16, 2019 at 11:04:26AM +0200, Marius Bakke wrote:
> Hello,
>
> When repacking a source checkout (e.g. by using git-fetch with a
> snippet), the generated file name contains only the first two version
> identifiers.
>
> E.g. `guix build -S eudev` returns
>
> /gnu/store/7lgsxmr0rk9f8fbq6k0kj1aqb7lnrlll-eudev-3.2.tar.xz
>
> ...even though it should be "3.2.8".
>
> This patch fixes it:
>
> From 0c44561d0d45de91f4674d659b86d740642ae801 Mon Sep 17 00:00:00 2001
> From: Marius Bakke <mbakke <at> fastmail.com>
> Date: Sun, 16 Jun 2019 10:50:15 +0200
> Subject: [PATCH] packages: Keep full version in file name when repacking
> source checkouts.
>
> * guix/packages.scm (patch-and-repack): If ORIGINAL-FILE-NAME is a source
> checkout, drop the '-checkout' part so the version-detecting code works.
> ---
> guix/packages.scm | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/guix/packages.scm b/guix/packages.scm
> index c94a651f27..5b8969e079 100644
> --- a/guix/packages.scm
> +++ b/guix/packages.scm
> @@ -505,11 +505,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"
> --
> 2.22.0
>
Pinging Mark and Ludo, similar to https://issues.guix.info/issue/34066
--
Efraim Flashner <efraim <at> 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
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Sun, 16 Jun 2019 09:25:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
bug acknowledged by developer.
(Sun, 16 Jun 2019 09:25:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 36242-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Efraim Flashner <efraim <at> flashner.co.il> writes:
> On Sun, Jun 16, 2019 at 11:04:26AM +0200, Marius Bakke wrote:
>> Hello,
>>
>> When repacking a source checkout (e.g. by using git-fetch with a
>> snippet), the generated file name contains only the first two version
>> identifiers.
>>
>> E.g. `guix build -S eudev` returns
>>
>> /gnu/store/7lgsxmr0rk9f8fbq6k0kj1aqb7lnrlll-eudev-3.2.tar.xz
>>
>> ...even though it should be "3.2.8".
>>
>> This patch fixes it:
>>
>
>> From 0c44561d0d45de91f4674d659b86d740642ae801 Mon Sep 17 00:00:00 2001
>> From: Marius Bakke <mbakke <at> fastmail.com>
>> Date: Sun, 16 Jun 2019 10:50:15 +0200
>> Subject: [PATCH] packages: Keep full version in file name when repacking
>> source checkouts.
>>
>> * guix/packages.scm (patch-and-repack): If ORIGINAL-FILE-NAME is a source
>> checkout, drop the '-checkout' part so the version-detecting code works.
>> ---
>> guix/packages.scm | 12 +++++++++---
>> 1 file changed, 9 insertions(+), 3 deletions(-)
>>
>> diff --git a/guix/packages.scm b/guix/packages.scm
>> index c94a651f27..5b8969e079 100644
>> --- a/guix/packages.scm
>> +++ b/guix/packages.scm
>> @@ -505,11 +505,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"
>> --
>> 2.22.0
>>
>
> Pinging Mark and Ludo, similar to https://issues.guix.info/issue/34066
Whoops, was not aware of that report! Closing as duplicate.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#36242
; Package
guix
.
(Mon, 17 Jun 2019 09:41:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 36242 <at> debbugs.gnu.org (full text, mbox):
Hello,
Marius Bakke <mbakke <at> fastmail.com> skribis:
> From 0c44561d0d45de91f4674d659b86d740642ae801 Mon Sep 17 00:00:00 2001
> From: Marius Bakke <mbakke <at> fastmail.com>
> Date: Sun, 16 Jun 2019 10:50:15 +0200
> Subject: [PATCH] packages: Keep full version in file name when repacking
> source checkouts.
>
> * guix/packages.scm (patch-and-repack): If ORIGINAL-FILE-NAME is a source
> checkout, drop the '-checkout' part so the version-detecting code works.
LGTM! For ‘core-updates’, right?
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 15 Jul 2019 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.