Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.
Hello, Ricardo Wurmus skribis: >>> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New >>> procedures. >>> (glibc-locales): Express in terms of make-glibc-locales. >>> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales. >>> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables. > > […] > >> I don’t like the package name trick, but I don’t have a better solution. >> Perhaps we could have a special property to explicitly allow for several >> versions of this package in the same profile (say >> ‘allow-multiple-versions?’), but that’s a bit more work. > > I also don’t like to work around this by changing the package names. I > thought of allowing multiple versions via property, but it’s not clear > how it should behave. I’d want to have only major versions appear as > non-conflicting and still prevent the installation of variants of the > same version. > > The next question then is if the property should be a procedure that > takes the current and the potentially conflicting package as arguments > and decides whether they are conflicting, or if this should be handled > centrally when the property is present. Would there be other use cases? If not, I would not worry too much about the major vs. non-major conflicts. I have a slight preference for a property that we can ‘write’, which would simplify for instance interaction with inferior packages, hence something like a Boolean ‘allow-multiple-versions?’ property. As a first approach, when this flag is true, the version check in ‘check-for-collisions’ could be bypassed. The property would have to be added to the though, so that the flag is honored even after several “guix package” invocations. How does that sound? Thanks, Ludo’.
Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.
Hi Ludo, >> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New >> procedures. >> (glibc-locales): Express in terms of make-glibc-locales. >> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales. >> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables. […] > I don’t like the package name trick, but I don’t have a better solution. > Perhaps we could have a special property to explicitly allow for several > versions of this package in the same profile (say > ‘allow-multiple-versions?’), but that’s a bit more work. I also don’t like to work around this by changing the package names. I thought of allowing multiple versions via property, but it’s not clear how it should behave. I’d want to have only major versions appear as non-conflicting and still prevent the installation of variants of the same version. The next question then is if the property should be a procedure that takes the current and the potentially conflicting package as arguments and decides whether they are conflicting, or if this should be handled centrally when the property is present. -- Ricardo
Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.
Hi, Ricardo Wurmus skribis: > Ricardo Wurmus writes: > >> * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New >> procedures. >> (glibc-locales): Express in terms of make-glibc-locales. >> (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales. >> (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables. > > This is for the benefit of people who run Guix on top of a foreign > distro. On a Guix system people can simply use the “locale-libcs” field > of their operating system declaration, but on a foreign distro there is > no way to install a locales package for older versions of glibc. > > This patch generates variants for version 2.27 and overrides the name so > that both “glibc-locales” and “glibc-locales-2.27” can be installed into > the same profile. (Without the name override that’s not possible.) Adding the packages makes sense to me. I don’t like the package name trick, but I don’t have a better solution. Perhaps we could have a special property to explicitly allow for several versions of this package in the same profile (say ‘allow-multiple-versions?’), but that’s a bit more work. Thanks, Ludo’.
Re: [PATCH] gnu: Add glibc-locales variants for older versions of glibc.
Ricardo Wurmus writes: > * gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New > procedures. > (glibc-locales): Express in terms of make-glibc-locales. > (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales. > (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables. This is for the benefit of people who run Guix on top of a foreign distro. On a Guix system people can simply use the “locale-libcs” field of their operating system declaration, but on a foreign distro there is no way to install a locales package for older versions of glibc. This patch generates variants for version 2.27 and overrides the name so that both “glibc-locales” and “glibc-locales-2.27” can be installed into the same profile. (Without the name override that’s not possible.) -- Ricardo
[PATCH] gnu: Add glibc-locales variants for older versions of glibc.
* gnu/packages/base.scm (make-glibc-locales, make-glibc-utf8-locales): New procedures. (glibc-locales): Express in terms of make-glibc-locales. (glibc-utf8-locales): Express in terms of make-glibc-utf8-locales. (glibc-locales-2.27, glibc-utf8-locales-2.27): New variables. --- gnu/packages/base.scm | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index e79d2a987..cf86f0658 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2017, 2018 Marius Bakke ;;; Copyright © 2017 Eric Bavier ;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -975,7 +975,7 @@ with the Linux kernel.") (("/bin/pwd") "pwd")) #t -(define-public glibc-locales +(define-public (make-glibc-locales glibc) (package (inherit glibc) (name "glibc-locales") @@ -1010,7 +1010,7 @@ the 'share/locale' sub-directory of this package.") ,(version-major+minor (package-version glibc))) -(define-public glibc-utf8-locales +(define-public (make-glibc-utf8-locales glibc) (package (name "glibc-utf8-locales") (version (package-version glibc)) @@ -1060,6 +1060,18 @@ test environments.") (home-page (package-home-page glibc)) (license (package-license glibc +(define-public glibc-locales + (make-glibc-locales glibc)) +(define-public glibc-utf8-locales + (make-glibc-utf8-locales glibc)) + +(define-public glibc-locales-2.27 + (package (inherit (make-glibc-locales glibc-2.27)) + (name "glibc-locales-2.27"))) +(define-public glibc-utf8-locales-2.27 + (package (inherit (make-glibc-utf8-locales glibc-2.27)) + (name "glibc-utf8-locales-2.27"))) + (define-public which (package (name "which") -- 2.20.1