guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 02/02: gnu: certbot: Share python-acme's arguments.


From: Marius Bakke
Subject: Re: 02/02: gnu: certbot: Share python-acme's arguments.
Date: Mon, 10 Apr 2017 00:48:27 +0200
User-agent: Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu)

Leo Famulari <address@hidden> writes:

> lfam pushed a commit to branch master
> in repository guix.
>
> commit f26d6e4e9c5efbe060697f54456cfc9144350114
> Author: Leo Famulari <address@hidden>
> Date:   Sat Apr 8 12:45:16 2017 -0400
>
>     gnu: certbot: Share python-acme's arguments.
>     
>     * gnu/packages/tls.scm (certbot)[arguments]: Use 
> substitute-keyword-arguments to
>     inherit from python-acme.
> ---
>  gnu/packages/tls.scm | 39 +++++++++++++++------------------------
>  1 file changed, 15 insertions(+), 24 deletions(-)
>
> diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
> index ac5e406..08cc607 100644
> --- a/gnu/packages/tls.scm
> +++ b/gnu/packages/tls.scm
> @@ -478,8 +478,6 @@ security, and applying best practice development 
> processes.")
>          "05cqadwzgfcianw3v0qxwja65dxnzw429f7dk8w0mnh21pib72bl"))))
>      (build-system python-build-system)
>  
> -    ;; TODO factorize the 'docs' phase and share arguments between 
> python-acme
> -    ;; and certbot.
>      (arguments
>       `(#:phases
>         (modify-phases %standard-phases
> @@ -541,28 +539,21 @@ security, and applying best practice development 
> processes.")
>      (build-system python-build-system)
>      (arguments
>       `(#:python ,python-2
> -       #:phases
> -       (modify-phases %standard-phases
> -         (add-after 'unpack 'patch-dependency
> -           ;; This module is part of the Python standard library, so we don't
> -           ;; need to use an external package.
> -           ;; https://github.com/certbot/certbot/pull/2249
> -           (lambda _
> -             (substitute* "setup.py"
> -               (("'argparse',") ""))
> -             #t))
> -         (add-after 'build 'docs
> -           (lambda* (#:key outputs #:allow-other-keys)
> -             (let* ((out (assoc-ref outputs "out"))
> -                    (man1 (string-append out "/share/man/man1"))
> -                    (man7 (string-append out "/share/man/man7"))
> -                    (info (string-append out "/info")))
> -               (and
> -                 (zero? (system* "make" "-C" "docs" "man" "info"))
> -                 (install-file "docs/_build/texinfo/Certbot.info" info)
> -                 (install-file "docs/_build/man/certbot.1" man1)
> -                 (install-file "docs/_build/man/certbot.7" man7)
> -                 #t)))))))
> +       ,@(substitute-keyword-arguments (package-arguments python-acme)
> +           ((#:phases phases)
> +            `(modify-phases ,phases
> +              (replace 'docs
> +                (lambda* (#:key outputs #:allow-other-keys)
> +                  (let* ((out (assoc-ref outputs "out"))
> +                         (man1 (string-append out "/share/man/man1"))
> +                         (man7 (string-append out "/share/man/man7"))
> +                         (info (string-append out "/info")))
> +                    (and
> +                      (zero? (system* "make" "-C" "docs" "man" "info"))
> +                      (install-file "docs/_build/texinfo/Certbot.info" info)
> +                      (install-file "docs/_build/man/certbot.1" man1)
> +                      (install-file "docs/_build/man/certbot.7" man7)
> +                      #t)))))))))

Not to pick on this patch, since this problem was present before..but:

"install-file" has an unspecified return value, so I don't think it's
safe to use in an "and" block. The attached patch should be more
correct. WDYT?

Attachment: 0001-gnu-certbot-python-acme-Build-documentation-in-separ.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]