GNU bug report logs -
#28273
[PATCH] gnu: Fix current-guix.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Tue, 29 Aug 2017 06:50:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
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 28273 in the body.
You can then email your comments to 28273 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#28273
; Package
guix-patches
.
(Tue, 29 Aug 2017 06:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 29 Aug 2017 06:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Without this change, I get errors like:
ERROR: In procedure string-drop:
ERROR: Value out of range 0 to 35: 51
* gnu/packages/package-management.scm (current-guix): Pass exactly the same
path to git-predicate and local-file, to ensure that the select? function is
compatible.
---
gnu/packages/package-management.scm | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 67a956dea..a6c97e618 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -312,10 +312,11 @@ generated file."
#t)))
(define-public current-guix
- (let ((select? (delay (or (git-predicate
- (string-append (current-source-directory)
- "/../.."))
- source-file?))))
+ (let* ((repository-root (canonicalize-path
+ (string-append (current-source-directory)
+ "/../..")))
+ (select? (delay (or (git-predicate repository-root)
+ source-file?))))
(lambda ()
"Return a package representing Guix built from the current source tree.
This works by adding the current source tree to the store (after filtering it
@@ -323,7 +324,7 @@ out) and returning a package that uses that as its 'source'."
(package
(inherit guix)
(version (string-append (package-version guix) "+"))
- (source (local-file "../.." "guix-current"
+ (source (local-file repository-root "guix-current"
#:recursive? #t
#:select? (force select?)))))))
--
2.14.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28273
; Package
guix-patches
.
(Tue, 29 Aug 2017 07:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 28273 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
You can check if this works for you by running:
guix build -e "((@ (gnu packages package-management) current-guix))"
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#28273
; Package
guix-patches
.
(Thu, 31 Aug 2017 13:19:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 28273 <at> debbugs.gnu.org (full text, mbox):
Christopher Baines <mail <at> cbaines.net> skribis:
> Without this change, I get errors like:
> ERROR: In procedure string-drop:
> ERROR: Value out of range 0 to 35: 51
>
> * gnu/packages/package-management.scm (current-guix): Pass exactly the same
> path to git-predicate and local-file, to ensure that the select? function is
> compatible.
Good catch, LGTM.
I think that fundamentally, we should arrange for ‘git-predicate’ to not
do any string prefix comparison. That’s bound to fail. If we could
somehow restrict it to comparing inode numbers, that’d be perfect.
Ludo’.
Reply sent
to
Christopher Baines <mail <at> cbaines.net>
:
You have taken responsibility.
(Thu, 31 Aug 2017 21:05:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Baines <mail <at> cbaines.net>
:
bug acknowledged by developer.
(Thu, 31 Aug 2017 21:05:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 28273-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 31 Aug 2017 15:18:37 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Christopher Baines <mail <at> cbaines.net> skribis:
>
> > Without this change, I get errors like:
> > ERROR: In procedure string-drop:
> > ERROR: Value out of range 0 to 35: 51
> >
> > * gnu/packages/package-management.scm (current-guix): Pass exactly
> > the same path to git-predicate and local-file, to ensure that the
> > select? function is compatible.
>
> Good catch, LGTM.
Great, I've merged this now.
> I think that fundamentally, we should arrange for ‘git-predicate’ to
> not do any string prefix comparison. That’s bound to fail. If we
> could somehow restrict it to comparing inode numbers, that’d be
> perfect.
Hmm, yeah, that might work well... I think the structure would simplify
to:
- taking the list of files, creating a list of directories
(rather than a tree)
- combining these lists
- finding each inode for every file and directory
The predicate could then check if the provided inode is known, without
switching on the type as it does at the moment.
I'll put it on my list of things to look at :)
[Message part 2 (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, 29 Sep 2017 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 349 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.