# GNU Guix --- Functional package management for GNU # Copyright © 2023 Ludovic Courtès # # 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 . # # Test the 'guix refresh' command-line utility. # guix refresh --version manifest="t-guix-refresh-manifest-$$.scm" module_dir="t-guix-refresh-modules-$$" trap 'rm -f "$manifest"; rm -rf "$module_dir"' EXIT # Tell the 'test' updater what to simulate. export GUIX_TEST_UPDATER_TARGETS idutils_version="$(guix package -A ^idutils$ | cut -f2)" GUIX_TEST_UPDATER_TARGETS=' (("guile" "3" (("12.5" "file:///dev/null") ("1.6.4" "file:///dev/null"))) ("libreoffice" "" (("1.0" "file:///dev/null"))) ("idutils" "" (("'$idutils_version'" "file:///dev/null"))) ("the-test-package" "" (("5.5" "file://'$PWD/$module_dir'/source" ("grep" "sed" "libreoffice")))))' # No newer version available. guix refresh -t test idutils # XXX: should return non-zero? case "$(guix refresh -t test idutils 2>&1)" in *"$idutils_version"*"already the latest version"*) true;; *) false;; esac guix refresh -t test libreoffice # XXX: should return non-zero? case "$(guix refresh -t test libreoffice 2>&1)" in *"greater than the latest known version"*"1.0"*) true;; *) false;; esac # Various ways to specify packages. cat > "$manifest" < ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; 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 (gnu packages apr) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages crypto) #:use-module (gnu packages perl) #:use-module (gnu packages xml) #:use-module (gnu packages autotools)) (define-public apr (package (name "apr") (version "1.7.4") (source (origin (method url-fetch) (uri (string-append "mirror://apache/apr/apr-" version ".tar.bz2")) (sha256 (base32 "0xsmqgjiyw3s6va5dm86djnjzg9r0qc1zsldwz4sd8pkhglqsr7w")) (patches (search-patches "apr-skip-getservbyname-test.patch")) (patch-flags '("-p0")))) (build-system gnu-build-system) (arguments ;; Sometimes we end up with two processes concurrently trying to make ;; 'libmod_test.la': <http://hydra.gnu.org/build/60266/nixlog/2/raw>. ;; Thus, build sequentially. `(#:parallel-build? #f #:parallel-tests? #f #:pha