summaryrefslogtreecommitdiff
path: root/guix/build/union.scm
AgeCommit message (Collapse)Author
2019-01-09Remove most uses of the _IO*F constants.Ludovic Courtès
These constants, for use with 'setvbuf', were deprecated in Guile 2.2 and disappeared in Guile 3.0. Here we keep these constants in build-side code where removing them is not feasible. * guix/build/download-nar.scm (download-nar): Adjust 'setvbuf' calls to the Guile 2.2+ API. * guix/build/download.scm (open-socket-for-uri): Likewise. (open-connection-for-uri, url-fetch): Likewise. * guix/build/make-bootstrap.scm (make-stripped-libc): Likewise. * guix/build/union.scm (setvbuf) [guile-2.0]: New conditional wrapper. (union-build): Adjust to new API. * guix/ftp-client.scm (ftp-open, ftp-list, ftp-retr): Likewise. * guix/http-client.scm (http-fetch): Likewise. * guix/inferior.scm (proxy): Likewise. * guix/scripts/substitute.scm (fetch, http-multiple-get): Likewise. * guix/self.scm (compiled-modules): Likewise. * guix/ssh.scm (remote-daemon-channel, store-import-channel) (store-export-channel): Likewise. * guix/ui.scm (initialize-guix): Likewise. * tests/publish.scm (http-get-port): Likewise. * guix/store.scm (%newlines): Adjust comment.
2018-05-17union: Do not warn about harmless collisions.Ludovic Courtès
Until now we'd get pointless messages like: warning: collision encountered: /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache /gnu/store/…-inkscape-0.92.3/share/icons/hicolor/icon-theme.cache warning: choosing /gnu/store/…-gtk-icon-themes/share/icons/hicolor/icon-theme.cache * guix/build/union.scm (%harmless-collisions): New variable. (warn-about-collision): Honor it.
2018-05-10profiles: Optionally use relative file names for symlink targets.Ludovic Courtès
* guix/build/union.scm (symlink-relative): New procedure. * guix/build/profiles.scm: Re-export it. (build-profile): Add #:symlink and pass it to 'union-build'. * guix/profiles.scm (profile-derivation): Add #:relative-symlinks?. Pass #:symlink to 'build-profile'. * tests/profiles.scm ("profile-derivation relative symlinks, one entry") ("profile-derivation relative symlinks, two entries"): New tests.
2018-05-10union: Add 'relative-file-name'.Ludovic Courtès
* guix/build/union.scm (%not-slash): New variable. (relative-file-name): New procedure. * tests/union.scm (test-relative-file-name): New macro and tests.
2018-04-08union: Allow callers to choose the collision resolution policy.Ludovic Courtès
* guix/build/union.scm (warn-about-collision): New procedure. (union-build): Add #:resolve-collision. [resolve-collisions]: Call it. * tests/union.scm ("union-build collision first & last"): New test.
2018-03-31union: Slightly improve messages for file collisions.Ludovic Courtès
* guix/build/union.scm (union-build): Indent file names upon collision. Remove "arbitrarily" from the message.
2018-02-15union: Wrap collisions with newlines.Oleg Pykhalov
* guix/build/union.scm (union-build): Wrap collisions with newlines.
2017-11-21union: Parametrize the symlink procedure .Ludovic Courtès
* guix/gexp.scm (directory-union): Add #:hard-links and honor it. * guix/build/union.scm (union-build): Add #:symlink parameter.
2017-05-18union: Gracefully handle dangling symlinks in the input.Ludovic Courtès
Fixes <http://bugs.gnu.org/26949>. Reported by Pjotr Prins <pjotr.public12@thebird.nl>. * guix/build/union.scm (file-is-directory?): Return #f when FILE does not exist or is a dangling symlink. (file=?): Pass #f as a second argument to 'stat'; return #f when both ST1 or ST2 is #f. * tests/profiles.scm (test-equalm): New macro. ("union vs. dangling symlink"): New test.
2017-03-26union: Add create-all-directories? parameter to 'union-build'.Huang Ying
* guix/build/union.scm (union-build): Add create-all-directories? keyword parameter. * tests/union.scm ("union-build #:create-all-directories? #t"): New test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2016-05-23union: Compare inode numbers in 'file=?'.Ludovic Courtès
* guix/build/union.scm (file=?): Compare the inode of ST1 and ST2.
2014-04-03union: Ensure that the output is always a directory.Mark H Weaver
Fixes the creation of single-package profiles, reported by Ludovic Courtès. * guix/build/union.scm (union-build): Add new internal procedure 'union-of-directories' that always creates a directory, containing the code previously used only to merge multiple directories. Call it from the multiple-directory case in 'union' and from the top-level 'union-build'.
2014-04-02union: Rewrite to be faster; handle symlink/directory conflicts.Mark H Weaver
* guix/build/union.scm: Rewrite; only 'file=?' remains unchanged. Remove 'tree-union' and 'delete-duplicate-leaves' exports. Merge inputs in a breadth-first fashion. Follow symlinks for purposes of making decisions about the merge. * tests/union.scm: Remove tests of 'tree-union' and 'delete-duplicate-leaves'.
2014-02-10union: Do not compare directories upon collision.Ludovic Courtès
* guix/build/union.scm (file=?): Return #f if FILE1 and FILE2 are not regular files. Fixes a bug whereby collisions among directories would lead to the invocation of 'file=?' and thus 'call-with-input-file' on directories. Reported by Mark H. Weaver <mhw@netris.org>.
2013-10-31union: Do not warn when identical files collide.Ludovic Courtès
* guix/build/union.scm (file=?): New procedure. (union-build)[resolve-collision]: Do not warn when identical files collide.
2013-10-30union: Make the log port a parameter.Ludovic Courtès
* guix/build/union.scm (union-build): Add 'log-port' keyword parameter; use it.
2013-09-02union: Don't traverse sub-directories only found in one element of the union.Ludovic Courtès
This significantly reduces I/O when building profiles, especially with lots of package-specific sub-directories (such as 'share/emacs/24.3', 'texmf', etc.) * guix/build/union.scm (union-build)[file-tree](others-have-it?): New procedure. Use it in the 'enter?' parameter of 'file-system-fold'; change 'skip' parameter accordingly. * tests/union.scm ("union-build"): Ensure that 'include' is a symlink and 'bin' is a directory.
2013-02-06union: Don't warn when colliding leaves point to the same file.Ludovic Courtès
* guix/build/union.scm (union-build)[resolve-collision]: Pass LEAVES through `delete-duplicates'; warn iff the result contains more than one item.
2013-02-06union: Delete duplicates when passed the same input several times.Ludovic Courtès
* guix/build/union.scm (union-build): Prepend "." to the result of `union-tree', to match the expectations of `delete-duplicate-leaves'. Don't do mkdir when SUBDIR is ".". * tests/union.scm ("union-build"): Keep duplicates in %BOOTSTRAP-INPUTS.
2013-01-11Merge branch 'core-updates'Ludovic Courtès
Conflicts: guix/build/union.scm
2013-01-09union: Detect collisions, and delete duplicate leaves.Ludovic Courtès
* guix/build/union.scm (delete-duplicate-leaves): New procedure. (union-build)[leaf=?, resolve-collision]: New procedures. Use `delete-duplicate-leaves' on the result of `tree-union'. * tests/union.scm ("delete-duplicate-leaves, default", "delete-duplicate-leaves, file names"): New tests.
2013-01-05Update license headers of builder-side code.Ludovic Courtès
Change license headers with this script: (use-modules (guix build utils)) (fluid-set! %default-port-encoding "UTF-8") (substitute* (cons "distro/packages/ld-wrapper.scm" (find-files "guix/build" "\\.scm$")) (("^([[:graph:]]+) This file is part of Guix." _ comment-start) (string-append comment-start " This file is part of GNU Guix.")) (("^([[:graph:]]+) Guix --- Nix package management.*" _ comment-start) (string-append comment-start " GNU Guix --- Functional package management for GNU\n")) (("^([[:graph:]]+) Guix is " _ comment-start) (string-append comment-start " GNU Guix is ")) (("^([[:graph:]]+) along with Guix." _ comment-start) (string-append comment-start " along with GNU Guix.")) (("^([[:graph:]]+) Copyright \\(C\\)" _ comment-start) (string-append comment-start " Copyright ©"))) * distro/packages/ld-wrapper.scm, guix/build/download.scm, guix/build/gnu-build-system.scm, guix/build/union.scm, guix/build/utils.scm: Update license headers.
2012-10-29Add (guix build union).Ludovic Courtès
* guix/build/union.scm, tests/union.scm: New files. * Makefile.am (MODULES): Add `guix/build/union.scm'. (TESTS): Add `tests/union.scm'.