unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link.
@ 2016-10-06 18:18 John Darrington
  2016-10-06 18:18 ` [PATCH 2/2] gnu: tzdata: Use modify-phases John Darrington
  2016-10-06 19:36 ` [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link Ludovic Courtès
  0 siblings, 2 replies; 8+ messages in thread
From: John Darrington @ 2016-10-06 18:18 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/base.scm (tzdata)[arguments]: Replace dangling symbolic link
with the correct path.
---
 gnu/packages/base.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index a476837..52d8de3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -946,11 +946,11 @@ command.")
          (lambda* (#:key outputs #:allow-other-keys)
            ;; Move data in the right place.
            (let ((out (assoc-ref outputs "out")))
-             (copy-recursively (string-append out "/share/zoneinfo-posix")
-                               (string-append out "/share/zoneinfo/posix"))
+             (symlink (string-append out "/share/zoneinfo")
+                      (string-append out "/share/zoneinfo/posix"))
+             (delete-file-recursively (string-append out "/share/zoneinfo-posix"))
              (copy-recursively (string-append out "/share/zoneinfo-leaps")
                                (string-append out "/share/zoneinfo/right"))
-             (delete-file-recursively (string-append out "/share/zoneinfo-posix"))
              (delete-file-recursively (string-append out "/share/zoneinfo-leaps"))))
          (alist-delete 'configure %standard-phases)))))
     (inputs `(("tzcode" ,(origin
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] gnu: tzdata: Use modify-phases
  2016-10-06 18:18 [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link John Darrington
@ 2016-10-06 18:18 ` John Darrington
  2016-10-06 19:36   ` Ludovic Courtès
  2016-10-06 19:36 ` [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: John Darrington @ 2016-10-06 18:18 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/base.scm (tzdata)[arguments]: Replace alist- procedures
with modify-phases
---
 gnu/packages/base.scm | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 52d8de3..0760c11 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -936,23 +936,24 @@ command.")
                   (guix build gnu-build-system)
                   (srfi srfi-1))
        #:phases
-       (alist-replace
-        'unpack
-        (lambda* (#:key source inputs #:allow-other-keys)
-          (and (zero? (system* "tar" "xvf" source))
-               (zero? (system* "tar" "xvf" (assoc-ref inputs "tzcode")))))
-        (alist-cons-after
-         'install 'post-install
-         (lambda* (#:key outputs #:allow-other-keys)
-           ;; Move data in the right place.
-           (let ((out (assoc-ref outputs "out")))
-             (symlink (string-append out "/share/zoneinfo")
-                      (string-append out "/share/zoneinfo/posix"))
-             (delete-file-recursively (string-append out "/share/zoneinfo-posix"))
-             (copy-recursively (string-append out "/share/zoneinfo-leaps")
-                               (string-append out "/share/zoneinfo/right"))
-             (delete-file-recursively (string-append out "/share/zoneinfo-leaps"))))
-         (alist-delete 'configure %standard-phases)))))
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source inputs #:allow-other-keys)
+             (and (zero? (system* "tar" "xvf" source))
+                  (zero? (system* "tar" "xvf" (assoc-ref inputs "tzcode"))))))
+         (add-after 'install 'post-install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Move data in the right place.
+             (let ((out (assoc-ref outputs "out")))
+               (symlink (string-append out "/share/zoneinfo")
+                        (string-append out "/share/zoneinfo/posix"))
+               (delete-file-recursively
+                (string-append out "/share/zoneinfo-posix"))
+               (copy-recursively (string-append out "/share/zoneinfo-leaps")
+                                 (string-append out "/share/zoneinfo/right"))
+               (delete-file-recursively
+                (string-append out "/share/zoneinfo-leaps")))))
+         (delete 'configure))))
     (inputs `(("tzcode" ,(origin
                           (method url-fetch)
                           (uri (string-append
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link.
  2016-10-06 18:18 [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link John Darrington
  2016-10-06 18:18 ` [PATCH 2/2] gnu: tzdata: Use modify-phases John Darrington
@ 2016-10-06 19:36 ` Ludovic Courtès
  2016-10-06 20:40   ` Danny Milosavljevic
  1 sibling, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-06 19:36 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/base.scm (tzdata)[arguments]: Replace dangling symbolic link
> with the correct path.
> ---
>  gnu/packages/base.scm | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
> index a476837..52d8de3 100644
> --- a/gnu/packages/base.scm
> +++ b/gnu/packages/base.scm
> @@ -946,11 +946,11 @@ command.")
>           (lambda* (#:key outputs #:allow-other-keys)
>             ;; Move data in the right place.
>             (let ((out (assoc-ref outputs "out")))
> -             (copy-recursively (string-append out "/share/zoneinfo-posix")
> -                               (string-append out "/share/zoneinfo/posix"))
> +             (symlink (string-append out "/share/zoneinfo")
> +                      (string-append out "/share/zoneinfo/posix"))

Or even:

  (symlink "." (string-append out "/share/zoneinfo/posix"))

OK for core-updates, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: tzdata: Use modify-phases
  2016-10-06 18:18 ` [PATCH 2/2] gnu: tzdata: Use modify-phases John Darrington
@ 2016-10-06 19:36   ` Ludovic Courtès
  2016-10-06 21:46     ` Leo Famulari
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-06 19:36 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/base.scm (tzdata)[arguments]: Replace alist- procedures
> with modify-phases

OK for core-updates!

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link.
  2016-10-06 19:36 ` [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link Ludovic Courtès
@ 2016-10-06 20:40   ` Danny Milosavljevic
  2016-10-07 19:53     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Danny Milosavljevic @ 2016-10-06 20:40 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, John Darrington


>   (symlink "." (string-append out "/share/zoneinfo/posix"))

"..", no?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] gnu: tzdata: Use modify-phases
  2016-10-06 19:36   ` Ludovic Courtès
@ 2016-10-06 21:46     ` Leo Famulari
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Famulari @ 2016-10-06 21:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, John Darrington

On Thu, Oct 06, 2016 at 09:36:37PM +0200, Ludovic Courtès wrote:
> John Darrington <jmd@gnu.org> skribis:
> 
> > * gnu/packages/base.scm (tzdata)[arguments]: Replace alist- procedures
> > with modify-phases
> 
> OK for core-updates!

I took the opportunity to update tzdata to the latest release, 2016g.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link.
  2016-10-06 20:40   ` Danny Milosavljevic
@ 2016-10-07 19:53     ` Ludovic Courtès
  2016-10-07 19:58       ` Danny Milosavljevic
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-07 19:53 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel, John Darrington

Danny Milosavljevic <dannym@scratchpost.org> skribis:

>>   (symlink "." (string-append out "/share/zoneinfo/posix"))
>
> "..", no?

No, I don’t think so.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link.
  2016-10-07 19:53     ` Ludovic Courtès
@ 2016-10-07 19:58       ` Danny Milosavljevic
  0 siblings, 0 replies; 8+ messages in thread
From: Danny Milosavljevic @ 2016-10-07 19:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, John Darrington

On Fri, 07 Oct 2016 21:53:29 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Danny Milosavljevic <dannym@scratchpost.org> skribis:
> 
> >>   (symlink "." (string-append out "/share/zoneinfo/posix"))  
> >
> > "..", no?  
> 
> No, I don’t think so.

Ah I see. Endless loop :)

Nevermind, it's correct with ".".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-07 19:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-06 18:18 [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link John Darrington
2016-10-06 18:18 ` [PATCH 2/2] gnu: tzdata: Use modify-phases John Darrington
2016-10-06 19:36   ` Ludovic Courtès
2016-10-06 21:46     ` Leo Famulari
2016-10-06 19:36 ` [PATCH 1/2] gnu: tzdata: Fix dangling symbolic link Ludovic Courtès
2016-10-06 20:40   ` Danny Milosavljevic
2016-10-07 19:53     ` Ludovic Courtès
2016-10-07 19:58       ` Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).