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")
gmsg'> * gnu/packages/bioconductor.scm (r-pfamanalyzer): New variable. 2023-07-12gnu: r-mzr: Update to 2.34.1.Ricardo Wurmus * gnu/packages/bioconductor.scm (r-mzr): Update to 2.34.1. [properties]: Tell updater to not remove the "boost" input. 2023-07-12gnu: r-norm: Update to 1.0-11.1.Ricardo Wurmus * gnu/packages/statistics.scm (r-norm): Update to 1.0-11.1. 2023-07-12gnu: r-logspline: Update to 2.1.20.Ricardo Wurmus * gnu/packages/statistics.scm (r-logspline): Update to 2.1.20. 2023-07-12gnu: r-pbapply: Update to 1.7-2.Ricardo Wurmus * gnu/packages/statistics.scm (r-pbapply): Update to 1.7-2. 2023-07-12gnu: r-robust: Update to 0.7-2.Ricardo Wurmus * gnu/packages/statistics.scm (r-robust): Update to 0.7-2. 2023-07-12gnu: r-rrcov: Update to 1.7-4.Ricardo Wurmus * gnu/packages/statistics.scm (r-rrcov): Update to 1.7-4. 2023-07-12gnu: r-robustbase: Update to 0.99-0.Ricardo Wurmus * gnu/packages/statistics.scm (r-robustbase): Update to 0.99-0. 2023-07-12gnu: r-deoptimr: Update to 1.0-14.Ricardo Wurmus * gnu/packages/statistics.scm (r-deoptimr): Update to 1.0-14. 2023-07-12gnu: r-mvtnorm: Update to 1.2-2.Ricardo Wurmus * gnu/packages/statistics.scm (r-mvtnorm): Update to 1.2-2. 2023-07-12gnu: r-rmarkdown: Update to 2.23.Ricardo Wurmus * gnu/packages/statistics.scm (r-rmarkdown): Update to 2.23. 2023-07-12gnu: r-rcpparmadillo: Update to 0.12.4.1.0.Ricardo Wurmus * gnu/packages/statistics.scm (r-rcpparmadillo): Update to 0.12.4.1.0. 2023-07-12gnu: r-rstudioapi: Update to 0.15.0.Ricardo Wurmus * gnu/packages/statistics.scm (r-rstudioapi): Update to 0.15.0. 2023-07-12gnu: r-xml2: Update to 1.3.5.Ricardo Wurmus * gnu/packages/statistics.scm (r-xml2): Update to 1.3.5. 2023-07-12gnu: r-locfit: Update to 1.5-9.8.Ricardo Wurmus * gnu/packages/statistics.scm (r-locfit): Update to 1.5-9.8. 2023-07-12gnu: r-dbplyr: Update to 2.3.3.Ricardo Wurmus * gnu/packages/statistics.scm (r-dbplyr): Update to 2.3.3. 2023-07-12gnu: r-testthat: Update to 3.1.10.Ricardo Wurmus * gnu/packages/statistics.scm (r-testthat): Update to 3.1.10. 2023-07-12gnu: r-matrix: Update to 1.6-0.Ricardo Wurmus * gnu/packages/statistics.scm (r-matrix): Update to 1.6-0. 2023-07-12gnu: r-kernsmooth: Update to 2.23-22.Ricardo Wurmus * gnu/packages/statistics.scm (r-kernsmooth): Update to 2.23-22. 2023-07-12gnu: r-paws: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws): Update to 0.3.0. 2023-07-12gnu: r-paws-compute: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-compute): Update to 0.3.1. 2023-07-12gnu: r-paws-storage: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-storage): Update to 0.3.0. 2023-07-12gnu: r-paws-database: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-database): Update to 0.3.0. 2023-07-12gnu: r-paws-networking: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-networking): Update to 0.3.0. 2023-07-12gnu: r-paws-management: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-management): Update to 0.3.1. 2023-07-12gnu: r-paws-machine-learning: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-machine-learning): Update to 0.3.0. 2023-07-12gnu: r-paws-analytics: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-analytics): Update to 0.3.0. 2023-07-12gnu: r-paws-security-identity: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-security-identity): Update to 0.3.1. 2023-07-12gnu: r-paws-application-integration: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-application-integration): Update to 0.3.1. 2023-07-12gnu: r-paws-end-user-computing: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-end-user-computing): Update to 0.3.0. 2023-07-12gnu: r-paws-developer-tools: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-developer-tools): Update to 0.3.1. 2023-07-12gnu: r-paws-cost-management: Update to 0.3.1.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-cost-management): Update to 0.3.1. 2023-07-12gnu: r-paws-customer-engagement: Update to 0.3.0.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-customer-engagement): Update to 0.3.0. 2023-07-12gnu: r-paws-common: Update to 0.5.8.Ricardo Wurmus * gnu/packages/cran.scm (r-paws-common): Update to 0.5.8. 2023-07-12gnu: r-delaporte: Update to 8.1.1.Ricardo Wurmus * gnu/packages/cran.scm (r-delaporte): Update to 8.1.1. 2023-07-12gnu: r-intervals: Update to 0.15.4.Ricardo Wurmus * gnu/packages/cran.scm (r-intervals): Update to 0.15.4. 2023-07-12gnu: r-readtext: Update to 0.90.Ricardo Wurmus * gnu/packages/cran.scm (r-readtext): Update to 0.90. 2023-07-12gnu: r-downlit: Update to 0.4.3.Ricardo Wurmus * gnu/packages/cran.scm (r-downlit): Update to 0.4.3. 2023-07-12gnu: r-mlr3tuning: Update to 0.19.0.Ricardo Wurmus * gnu/packages/cran.scm (r-mlr3tuning): Update to 0.19.0. [native-inputs]: Add r-knitr. 2023-07-12gnu: r-seurat: Update to 4.3.0.1.Ricardo Wurmus * gnu/packages/cran.scm (r-seurat): Update to 4.3.0.1. 2023-07-12gnu: r-scattermore: Update to 1.2.Ricardo Wurmus * gnu/packages/cran.scm (r-scattermore): Update to 1.2. 2023-07-12gnu: r-confintr: Update to 1.0.2.Ricardo Wurmus * gnu/packages/cran.scm (r-confintr): Update to 1.0.2. 2023-07-12gnu: r-rfast: Update to 2.0.8.Ricardo Wurmus * gnu/packages/cran.scm (r-rfast): Update to 2.0.8. 2023-07-12gnu: r-cpp11: Update to 0.4.4.Ricardo Wurmus * gnu/packages/cran.scm (r-cpp11): Update to 0.4.4. 2023-07-12gnu: r-spatstat-geom: Update to 3.2-2.Ricardo Wurmus * gnu/packages/cran.scm (r-spatstat-geom): Update to 3.2-2. 2023-07-12gnu: r-spatstat-sparse: Update to 3.0-2.Ricardo Wurmus * gnu/packages/cran.scm (r-spatstat-sparse): Update to 3.0-2.