guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: website: package-channel: Fix `vcs-file?' in chan


From: Ludovic Courtès
Subject: branch master updated: website: package-channel: Fix `vcs-file?' in channel section.
Date: Mon, 02 Oct 2023 06:20:45 -0400

This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix-artwork.

The following commit(s) were added to refs/heads/master by this push:
     new 9c5b07c  website: package-channel: Fix `vcs-file?' in channel section.
9c5b07c is described below

commit 9c5b07cde791e18dfefd73bcf213f7e161b2f667
Author: Ivan Vilata-i-Balaguer <ivan@selidor.net>
AuthorDate: Fri Sep 22 20:46:56 2023 +0200

    website: package-channel: Fix `vcs-file?' in channel section.
    
    Building the package after the changes in section "Level 2: The repository 
as
    a channel" would create an empty recursive copy since source files would be
    above the current source directory (now `.guix/modules') passed to
    `git-predicate', thus the resulting predicate would always be false for 
them.
    
    Fixed by making the argument of `git-predicate' be the root of the Git
    checkout again.
    
    Also fix minor error in `package-with-configure-flags' documentation.
    
    * website/drafts/package-channel.md: Fix `vcs-file?' in channel section.
    
    Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
 website/posts/package-channel.md | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/website/posts/package-channel.md b/website/posts/package-channel.md
index dfbf6a2..603afcf 100644
--- a/website/posts/package-channel.md
+++ b/website/posts/package-channel.md
@@ -252,6 +252,11 @@ haven’t changed):
   #:use-module (guix git-download)   ;for ‘git-predicate’
   …)
 
+(define vcs-file?
+  ;; Return true if the given file is under version control.
+  (or (git-predicate (dirname (dirname (current-source-directory))))
+      (const #t)))                                ;not in a Git checkout
+
 (define-public guile
   (package
     (name "guile")
@@ -365,7 +370,7 @@ transformation options.  We can add them like so:
   …)
 
 (define (package-with-configure-flags p flags)
-  "Return P with FLAGS as addition 'configure' flags."
+  "Return P with FLAGS as additional 'configure' flags."
   (package/inherit p
     (arguments
      (substitute-keyword-arguments (package-arguments p)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]