aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (test-store-deduplication)
  #:use-module (guix tests)
  #:use-module (guix store)
  #:use-module (guix store roots)
  #:use-module ((guix utils) #:select (call-with-temporary-directory))
  #:use-module ((guix build utils) #:select (delete-file-recursively))
  #:use-module ((guix config) #:select (%state-directory))
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64))

(define %store #f)

(test-begin "store-roots")

;; The 'open-connection' call below gets guix-daemon to create
;; %STATE-DIRECTORY/profiles.
(set! %store (open-connection))

(test-assert "gc-roots, regular root"
  (let* ((item (add-text-to-store %store "something"
                                  (random-text)))
         (root (string-append %gc-roots-directory "/test-gc-root")))
    (symlink item root)
    (let ((result (member root (gc-roots))))
      (delete-file root)
      result)))

(test-assert "gc-roots, indirect root"
  (call-with-temporary-directory
   (lambda (directory)
     (let* ((item (add-text-to-store %store "something"
                                     (random-text)))
            (root (string-append directory "/gc-root")))
       (symlink item root)
       (add-indirect-root %store root)
       (let ((result (member root (gc-roots))))
         (delete-file root)
         result)))))

(test-end "store-roots")
kages/package-management.scm?id=ce22a756d066f3e329b183893d48ac3a5b627a6a'>gnu: guile-fibers: Remove version from latest package....As I think this makes more sense, the version is only specified when you need a specific previous release. * gnu/packages/guile-xyz.scm (guile-fibers): Rename to guile-fibers-1.0. (guile-fibers-1.3): Rename to guile-fibers. (guile-fibers-1.1): Inherit from guile-fibers. * gnu/packages/admin.scm (shepherd-0.10)[native-inputs]: Replace guile-fibers-1.3 with guile-fibers. * gnu/packages/ci.scm (cuirass)[inputs]: Likewise. * gnu/packages/gnunet.scm (gnunet-scheme)[propagated-inputs,native-inputs]: Likewise. * gnu/packages/package-management.scm (guix-build-coordinator) [inputs,propagated-inputs]: Likewise. * gnu/packages/package-management.scm (nar-herder)[inputs,propagated-inputs]: Likewise. * gnu/packages/web.scm (guix-data-service)[propagated-inputs]: Likewise. Christopher Baines 2023-09-18Revert "gnu: guix: Update to 1.4.0-11.658de25e99."...Several people on IRC report that "rewrite-url, to-version specified" fails. This reverts commit 1a0c7f71f0d74167f04377773791305260871b26. Janneke Nieuwenhuizen 2023-09-18gnu: guix: Update to 1.4.0-11.658de25e99....* gnu/packages/package-management.scm (guix): Update to 1.4.0-11.658de25e99. Janneke Nieuwenhuizen 2023-09-16gnu: bffe: Update to 0-2.722c37e....* gnu/packages/package-management.scm (bffe): Update to 0-2.722c37e. Christopher Baines 2023-09-16gnu: guix-build-coordinator: Update to 0-89.9c42dcb....* gnu/packages/package-management.scm (guix-build-coordinator): Update to 0-89.9c42dcb. Christopher Baines 2023-09-15gnu: libostree: Update to 2023.5....* gnu/packages/package-management.scm (libostree): Update to 2023.5. Signed-off-by: Christopher Baines <mail@cbaines.net> kiasoc5 2023-09-15services: bffe: Use guile from the package....Rather than hardcoding a particular guile in the service definition. * gnu/services/guix.scm (bffe-shepherd-services): Use guile from the package. * gnu/packages/package-management.scm (bffe)[inputs]: Remove unnecessary guile-next input. Christopher Baines 2023-09-15gnu: Add bffe....* gnu/packages/package-management.scm (bffe): New variable. Christopher Baines 2023-09-12gnu: nar-herder: Use guile-next....As this provides suspendable soft/custom ports, which I'd like to use. * gnu/packages/package-management.scm (nar-herder)[native-inputs,inputs]: Use guile-next. Christopher Baines 2023-08-29gnu: guix-build-coordinator: Update to 0-88.cbded42....* gnu/packages/package-management.scm (guix-build-coordinator): Update to 0-88.cbded42. Christopher Baines 2023-08-26gnu: guix-build-coordinator: Update to 0-87.06a4469....* gnu/packages/package-management.scm (guix-build-coordinator): Update to 0-87.06a4469. Christopher Baines 2023-08-22gnu: guix: Update to 1.4.0-10.4dfdd82210....* gnu/packages/package-management.scm (guix): Update to 1.4.0-10.4dfdd82210. Janneke Nieuwenhuizen 2023-08-22gnu: guix: Disable some tests on the Hurd....* gnu/packages/package-management.scm (guix)[arguments]: When building on the Hurd, add phase disable-tests/hurd. Janneke Nieuwenhuizen 2023-08-22gnu: guix: Update to 30355c1....Fixes a test failure in 'tests/guix-system.sh' on aarch64-linux, introduced by 4cdbbfa48d87d9a500288249f228fd19d4371919. * gnu/packages/package-management.scm (guix): Update to 30355c1. Ludovic Courtès 2023-08-21gnu: guix: Update to 0e6215a....* gnu/packages/package-management.scm (guix): Update to 0e6215a. Ludovic Courtès 2023-08-12gnu: conda: Add missing dependency....*gnu/packages/package-management.scm (conda)[native-inputs]: Add PYTHON-MOCK. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Mădălin Ionel Patrașcu 2023-07-23gnu: fuse@3: Bind to default FUSE variable....* gnu/packages/linux.scm (fuse): Rename this… (fuse-2): …to this, and… (fuse-3): …rename this… (fuse): …to this! (fuse-static): Rename this… (fuse-2-static): …to this. Adjust all users. Tobias Geerinckx-Rice 2023-07-26gnu: guix-build-coordinator: Update to 0-86.f39f160....* gnu/packages/package-management.scm (guix-build-coordinator): Update to 0-86.f39f160. [arguments]: Update style. Christopher Baines 2023-07-26gnu: nar-herder: Update to 0-21.53682fa....* gnu/packages/package-management.scm (nar-herder): Update to 0-21.53682fa. [arguments]: Update style. Christopher Baines 2023-07-16gnu: conan: Update to 2.0.9....* gnu/packages/package-management.scm (conan): Update to 2.0.9. [arguments]: Upgrade python-pyyaml-5 to python-pyyaml. Tobias Geerinckx-Rice 2023-07-16gnu: gcab: Remove input labels....* gnu/packages/package-management.scm (gcab)[native-inputs]: Remove input labels. Tobias Geerinckx-Rice 2023-07-16gnu: gcab: Update to 1.6....* gnu/packages/package-management.scm (gcab): Update to 1.6. Tobias Geerinckx-Rice