summaryrefslogtreecommitdiff
path: root/guix/build/union.scm
AgeCommit message (Expand)Author
2022-09-02guix: build: Factor out default collision-resolver....This prepares the stage for new collision resolvers without changing the underlying semantics too much. * guix/build/union.scm (resolve+warn-if-harmful): New variable. (warn-about-collision): Rename to... (resolve-collision/default): ... this. Implement in terms of resolve+warn-if-harmful. (union-build): Adjust accordingly. * guix/gexp.scm (directory-union): Likewise. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Attila Lendvai
2021-09-25union: Do not warn about "ld.so.cache" collisions....This is a followup to f85efa86e7690d9181946351631e02b1c20958c9. * guix/build/union.scm (%harmless-collisions): Add "ld.so.cache". Ludovic Courtès
2019-01-09Remove most uses of the _IO*F constants....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. Ludovic Courtès
2018-05-17union: Do not warn about harmless collisions....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. Ludovic Courtès
2018-05-10profiles: Optionally use relative file names for symlink targets....* 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. Ludovic Courtès
2018-05-10union: Add 'relative-file-name'....* guix/build/union.scm (%not-slash): New variable. (relative-file-name): New procedure. * tests/union.scm (test-relative-file-name): New macro and tests. Ludovic Courtès
2018-04-08union: Allow callers to choose the collision resolution policy....* 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. Ludovic Courtès
2018-03-31union: Slightly improve messages for file collisions....* guix/build/union.scm (union-build): Indent file names upon collision. Remove "arbitrarily" from the message. Ludovic Courtès
2018-02-15union: Wrap collisions with newlines....* guix/build/union.scm (union-build): Wrap collisions with newlines. Oleg Pykhalov
2017-11-21union: Parametrize the symlink procedure ....* guix/gexp.scm (directory-union): Add #:hard-links and honor it. * guix/build/union.scm (union-build): Add #:symlink parameter. Ludovic Courtès
2017-05-18union: Gracefully handle dangling symlinks in the input....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. Ludovic Courtès
2017-03-26union: Add create-all-directories? parameter to 'union-build'....* 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> Huang Ying
2016-05-23union: Compare inode numbers in 'file=?'....* guix/build/union.scm (file=?): Compare the inode of ST1 and ST2. Ludovic Courtès
2014-04-03union: Ensure that the output is always a directory....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'. Mark H Weaver
2014-04-02union: Rewrite to be faster; handle symlink/directory conflicts....* 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'. Mark H Weaver
2014-02-10union: Do not compare directories upon collision....* 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>. Ludovic Courtès
2013-10-31union: Do not warn when identical files collide....* guix/build/union.scm (file=?): New procedure. (union-build)[resolve-collision]: Do not warn when identical files collide. Ludovic Courtès
2013-10-30union: Make the log port a parameter....* guix/build/union.scm (union-build): Add 'log-port' keyword parameter; use it. Ludovic Courtès
2013-09-02union: Don't traverse sub-directories only found in one element of the union....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. Ludovic Courtès
2013-02-06union: Don't warn when colliding leaves point to the same file....* guix/build/union.scm (union-build)[resolve-collision]: Pass LEAVES through `delete-duplicates'; warn iff the result contains more than one item. Ludovic Courtès
2013-02-06union: Delete duplicates when passed the same input several times....* 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. Ludovic Courtès
2013-01-11Merge branch 'core-updates'...Conflicts: guix/build/union.scm Ludovic Courtès
2013-01-09union: Detect collisions, and delete duplicate leaves....* 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. Ludovic Courtès
2013-01-05Update license headers of builder-side code....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. Ludovic Courtès
2012-10-29Add (guix build union)....* guix/build/union.scm, tests/union.scm: New files. * Makefile.am (MODULES): Add `guix/build/union.scm'. (TESTS): Add `tests/union.scm'. Ludovic Courtès