GNU bug report logs -
#34066
patch-and-repack can truncate version number
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34066 in the body.
You can then email your comments to 34066 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#34066
; Package
guix
.
(Mon, 14 Jan 2019 09:51:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Mon, 14 Jan 2019 09:51:01 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)]
When using 'git-fetch' for the source, when a patch is applied part of
the version number is truncated.
The following derivations will be built:
/gnu/store/zsy0j8jfg4q4nz8xk5bpc3h5qrclm679-opencv-3.4.3-checkout.drv
/gnu/store/kadg4jnyar79mpz5bmmg4w3qgn0iy81r-opencv-3.4.tar.xz.drv
--
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)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#34066
; Package
guix
.
(Mon, 14 Jan 2019 21:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 34066 <at> debbugs.gnu.org (full text, mbox):
Hi Efraim,
Efraim Flashner <efraim <at> flashner.co.il> writes:
> When using 'git-fetch' for the source, when a patch is applied part of
> the version number is truncated.
>
> The following derivations will be built:
> /gnu/store/zsy0j8jfg4q4nz8xk5bpc3h5qrclm679-opencv-3.4.3-checkout.drv
> /gnu/store/kadg4jnyar79mpz5bmmg4w3qgn0iy81r-opencv-3.4.tar.xz.drv
I guess the issue is in 'tarxz-name', defined within 'patch-and-repack':
(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))))
(string-append base
(if (equal? (file-extension base) "tar")
".xz"
".tar.xz"))))
Unless the extension (everything after the last '.') of the original
file name is composed entirely of hexadecimal characters, it is removed.
In this case, I guess the extension is "3-checkout", so it's removed.
I'm reluctant to suggest a fix until I understand the rationale for this
behavior. It was added by Ludovic in February 2014, in commit
3ca00bb51e3ff906a700b6925e0ce81558c8c469.
commit 3ca00bb51e3ff906a700b6925e0ce81558c8c469
Author: Ludovic Courtès <ludo <at> gnu.org>
Date: Fri Feb 28 10:41:44 2014 +0100
packages: Support 'patches' and 'snippets' for sources that are directories.
* guix/packages.scm (patch-and-repack)[numeric-extension?, tarxz-name]:
New procedures.
[builder]: Adjust to deal with SOURCE when it's a directory.
<body>: Use 'tarxz-name'. Always add (guix build utils) to
IMPORTED-MODULES.
Do you remember why you decided to remove non-numeric extensions,
Ludovic?
Thanks,
Mark
Information forwarded
to
bug-guix <at> gnu.org
:
bug#34066
; Package
guix
.
(Tue, 15 Jan 2019 12:40:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 34066 <at> debbugs.gnu.org (full text, mbox):
Hello!
Mark H Weaver <mhw <at> netris.org> skribis:
> Efraim Flashner <efraim <at> flashner.co.il> writes:
>
>> When using 'git-fetch' for the source, when a patch is applied part of
>> the version number is truncated.
>>
>> The following derivations will be built:
>> /gnu/store/zsy0j8jfg4q4nz8xk5bpc3h5qrclm679-opencv-3.4.3-checkout.drv
>> /gnu/store/kadg4jnyar79mpz5bmmg4w3qgn0iy81r-opencv-3.4.tar.xz.drv
>
> I guess the issue is in 'tarxz-name', defined within 'patch-and-repack':
>
> (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))))
> (string-append base
> (if (equal? (file-extension base) "tar")
> ".xz"
> ".tar.xz"))))
>
> Unless the extension (everything after the last '.') of the original
> file name is composed entirely of hexadecimal characters, it is removed.
> In this case, I guess the extension is "3-checkout", so it's removed.
>
> I'm reluctant to suggest a fix until I understand the rationale for this
> behavior. It was added by Ludovic in February 2014, in commit
> 3ca00bb51e3ff906a700b6925e0ce81558c8c469.
>
> commit 3ca00bb51e3ff906a700b6925e0ce81558c8c469
> Author: Ludovic Courtès <ludo <at> gnu.org>
> Date: Fri Feb 28 10:41:44 2014 +0100
>
> packages: Support 'patches' and 'snippets' for sources that are directories.
>
> * guix/packages.scm (patch-and-repack)[numeric-extension?, tarxz-name]:
> New procedures.
> [builder]: Adjust to deal with SOURCE when it's a directory.
> <body>: Use 'tarxz-name'. Always add (guix build utils) to
> IMPORTED-MODULES.
>
> Do you remember why you decided to remove non-numeric extensions,
> Ludovic?
I think the reason is that if the source directory is
/gnu/store/…-opencv-1.2.3, you want to keep it as is. IOW,
‘numeric-extension?’ is trying to determine whether the extension is
part of a version number.
Obviously it’s not working well in this case. :-)
I was thinking about using ‘package-name->name+version’ to improve the
heuristic but that doesn’t look very good either:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (package-name->name+version "foo-1.2-checkout" #\-)
$7 = "foo-1.2"
$8 = "checkout"
--8<---------------cut here---------------end--------------->8---
Ludo’.
Reply sent
to
Marius Bakke <mbakke <at> fastmail.com>
:
You have taken responsibility.
(Thu, 20 Jun 2019 22:08:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
bug acknowledged by developer.
(Thu, 20 Jun 2019 22:08:05 GMT)
Full text and
rfc822 format available.
Message #16 received at 34066-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Efraim Flashner <efraim <at> flashner.co.il> writes:
> When using 'git-fetch' for the source, when a patch is applied part of
> the version number is truncated.
>
> The following derivations will be built:
> /gnu/store/zsy0j8jfg4q4nz8xk5bpc3h5qrclm679-opencv-3.4.3-checkout.drv
> /gnu/store/kadg4jnyar79mpz5bmmg4w3qgn0iy81r-opencv-3.4.tar.xz.drv
Fixed in 814e12dc87a191718374d811c0a3024d38dffcbb.
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 19 Jul 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.