* [bug#28273] [PATCH] gnu: Fix current-guix.
@ 2017-08-29 6:49 Christopher Baines
2017-08-29 7:00 ` [bug#28273] " Christopher Baines
2017-08-31 13:18 ` [bug#28273] [PATCH] gnu: " Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Christopher Baines @ 2017-08-29 6:49 UTC (permalink / raw)
To: 28273
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#28273] Fix current-guix
2017-08-29 6:49 [bug#28273] [PATCH] gnu: Fix current-guix Christopher Baines
@ 2017-08-29 7:00 ` Christopher Baines
2017-08-31 13:18 ` [bug#28273] [PATCH] gnu: " Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2017-08-29 7:00 UTC (permalink / raw)
To: 28273
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
You can check if this works for you by running:
guix build -e "((@ (gnu packages package-management) current-guix))"
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#28273] [PATCH] gnu: Fix current-guix.
2017-08-29 6:49 [bug#28273] [PATCH] gnu: Fix current-guix Christopher Baines
2017-08-29 7:00 ` [bug#28273] " Christopher Baines
@ 2017-08-31 13:18 ` Ludovic Courtès
2017-08-31 21:04 ` bug#28273: " Christopher Baines
1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-08-31 13:18 UTC (permalink / raw)
To: Christopher Baines; +Cc: 28273
Christopher Baines <mail@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’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#28273: [PATCH] gnu: Fix current-guix.
2017-08-31 13:18 ` [bug#28273] [PATCH] gnu: " Ludovic Courtès
@ 2017-08-31 21:04 ` Christopher Baines
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2017-08-31 21:04 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 28273-done
[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]
On Thu, 31 Aug 2017 15:18:37 +0200
ludo@gnu.org (Ludovic Courtès) wrote:
> Christopher Baines <mail@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 :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-31 21:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-29 6:49 [bug#28273] [PATCH] gnu: Fix current-guix Christopher Baines
2017-08-29 7:00 ` [bug#28273] " Christopher Baines
2017-08-31 13:18 ` [bug#28273] [PATCH] gnu: " Ludovic Courtès
2017-08-31 21:04 ` bug#28273: " Christopher Baines
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.