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")
: Update to 0.6.4. Change-Id: Ie2bddb384af8aad55ef53f2a8000be76aa50a781 Greg Hogan 2024-09-28gnu: aws-c-auth: Update to 0.7.26....* gnu/packages/c.scm (aws-c-auth): Update to 0.7.26. Change-Id: Ia175f0eda951f9fd3ab7676e5bdb230b873cf127 Greg Hogan 2024-09-28gnu: aws-c-http: Update to 0.8.8....* gnu/packages/c.scm (aws-c-http): Update to 0.8.8. Change-Id: I5db13f71b0946449d399847e353c53ba7593be34 Greg Hogan 2024-09-28gnu: aws-c-compression: Update to 0.2.19....* gnu/packages/c.scm (aws-c-compression): Update to 0.2.19. Change-Id: Ib521bd0378d2b8aa8f0166df52b9fbde2d27b760 Greg Hogan 2024-09-28gnu: aws-c-sdkutils: Update to 0.1.19....* gnu/packages/c.scm (aws-c-sdkutils): Update to 0.1.19. Change-Id: I7c6ee085cafdd0f0d8df125f2f602b14b073bb81 Greg Hogan 2024-09-28gnu: aws-c-event-stream: Update to 0.4.3....* gnu/packages/c.scm (aws-c-event-stream): Update to 0.4.3. Change-Id: Iae87c5793b1a886fefcf0597ff6254e172869159 Greg Hogan 2024-09-28gnu: aws-c-io: Update to 0.14.18....* gnu/packages/c.scm (aws-c-io): Update to 0.14.18. Change-Id: I2013a9c2f173898e2c48c05824da0044885166e1 Greg Hogan 2024-09-28gnu: aws-c-cal: Update to 0.7.4....* gnu/packages/c.scm (aws-c-cal): Update to 0.7.4. [propagated-inputs]: Add s2n. [inputs]: Remove openssl and openssl:static. Change-Id: I211a3d96ec984ab870b6e1621756ad6463f27a8b Greg Hogan 2024-09-28gnu: aws-checksums: Update to 0.1.18....* gnu/packages/c.scm (aws-checksums): Update to 0.1.18. Change-Id: Iaed4161d8f2ba568e4aaae45a07e707d6a1b42bc Greg Hogan 2024-09-28gnu: aws-c-common: Update to 0.9.27....* gnu/packages/c.scm (aws-c-common): Update to 0.9.27. [arguments]: Disable parallel tests. [supported-systems]: Add armhf-linux and aarch64-linux. Change-Id: I66ddf9ed03f8ead70aa1c86792dd4aa8782ac59e Greg Hogan 2024-08-31gnu: Add c-template-sort....* gnu/packages/c.scm (c-template-sort): New variable. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com> Adam Faiz 2024-08-02gnu: Add libcsptr....* gnu/packages/c.scm (libcsptr): New variable. Change-Id: I47e34191047df0a171a78a11f9ba2ebef4a8c37a Liliana Marie Prikler 2024-07-30gnu: aml: Update to 0.3.0....* gnu/packages/c.scm (aml): Update to 0.3.0. Change-Id: I2bb2c44650485538eaf4dd174cbbc6e697d00e69 Zheng Junjie 2024-07-30gnu: Add aml....* gnu/packages/c.scm (aml): New variable. Change-Id: I271be102bfa1f2e529d70f1e0029263d624821b8 kitzman 2024-05-13gnu: Add sfsexp....* gnu/packages/c.scm (sfsexp): New variable. Change-Id: Iabfbe10b4ad6134ae886a3d26487f881107b559c Signed-off-by: Christopher Baines <mail@cbaines.net> Fabio Natali 2024-04-30gnu: tomlc99: Install pkg-config file....* gnu/packages/c.scm (tomlc99) <arguments>: Add phase to install pkg-config file. Change-Id: Id09f22912fe7e4dcac6a0377e4a78d3d34346106 Signed-off-by: Christopher Baines <mail@cbaines.net> Jean-Pierre De Jesus DIAZ 2024-04-30gnu: tomlc99: Update to 1.0-1.5221b3d....* gnu/packages/c.scm (tomlc99): Update to 1.0-1.5221b3d. Change-Id: Icb9c736fb7d49a097fe6db6451031637b7a01492 Signed-off-by: Christopher Baines <mail@cbaines.net> Jean-Pierre De Jesus DIAZ 2024-03-10gnu: qbe: Update to 1.2....* gnu/packages/c.scm (qbe): Update to 1.2. Change-Id: I0fc2039b416026dc0563b9ead967713e594446bc Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Nguyễn Gia Phong 2024-02-13gnu: tinydir: Update to 1.2.6....* gnu/packages/c.scm (tinydir): Update to 1.2.6. * gnu/packages/patches/tinydir-fix-cbehave-test.patch: Adjust patch. Signed-off-by: Christopher Baines <mail@cbaines.net> David Elsing 2024-01-24gnu: libdispatch: Update to 5.9.2....* gnu/packages/c.scm (libdispatch): Update to 5.9.2. Change-Id: I119d1de974673aa2c08eb51a7bcaa7ce24aeb0b2 Efraim Flashner 2023-12-02gnu: Add pcg-c....* gnu/packages/c.scm (pcg-c): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> David Elsing 2023-11-15gnu: mimalloc: Update to 2.1.2....* gnu/packages/c.scm (mimalloc): Update to 2.1.2. Change-Id: I20ff922250f57beabb427d72e82579e0059fd4f2 Efraim Flashner 2023-11-15gnu: mimalloc: Fix building on powerpc-linux....* gnu/packages/c.scm (mimalloc)[arguments]: When building for powerpc-linux add a configure-flag to use libatomic. Change-Id: I41062686186640bc4c685a0ee5de1e613040dfb9 Efraim Flashner 2023-09-08gnu: Add nsync....* gnu/packages/c.scm (nsync): New variable. Signed-off-by: Ricardo Wurmus <rekado@elephly.net> Andy Tai 2023-06-21gnu: Add tomlc99....* gnu/packages/c.scm (tomlc99): New variable. Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jean-Pierre De Jesus DIAZ 2023-06-18gnu: renameat2: Move to (gnu packages linux)....Being Linux-specific, that's probably a better home. * gnu/packages/c.scm (renameat2): Move to... * gnu/packages/linux.scm (renameat2): ... here. Maxim Cournoyer 2023-06-18gnu: Add renameat2....* gnu/packages/c.scm (renameat2): New variable. Maxim Cournoyer 2023-05-14gnu: Add c-rrb....* gnu/packages/c.scm (c-rrb): New variable. Liliana Marie Prikler 2023-05-11gnu: Add ISPC....* gnu/packages/c.scm (ispc): New variable. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> zamfofex