GNU bug report logs - #62640
[PATCH] gnu: Add pmbootstrap.

Previous Next

Package: guix-patches;

Reported by: Sughosha <Sughosha <at> proton.me>

Date: Mon, 3 Apr 2023 08:19:01 UTC

Severity: normal

Tags: patch

Merged with 49577

Done: Danny Milosavljevic <dannym <at> friendly-machines.com>

Bug is archived. No further changes may be made.

Full log


Message #28 received at 62640 <at> debbugs.gnu.org (full text, mbox):

From: André Batista <nandre <at> riseup.net>
To: Herman Rimm <herman <at> rimm.ee>
Cc: Sughosha <Sughosha <at> proton.me>, 62640 <at> debbugs.gnu.org
Subject: Re: [bug#62640] [PATCH] gnu: Add pmbootstrap.
Date: Thu, 29 May 2025 16:39:37 -0300
Quite a lot of improvements!

sáb 24 mai 2025 às 18:52:18 (1748123538), guix-patches <at> gnu.org enviou:
> (...)
> +    (arguments
> +     (list
> +       #:modules `((guix build pyproject-build-system)
> +                   (guix build utils)
> +                   (ice-9 match))
> +       #:phases #~(modify-phases %standard-phases
> +                    (add-after 'unpack 'set-sudo
> +                      (lambda _
> +                        (substitute* "pmb/config/sudo.py"
> +                          (("sudo\"") "/run/privileged/bin/sudo\""))))
> +                    (add-after 'wrap 'wrap-required-programs
> +                      (lambda* (#:key inputs outputs #:allow-other-keys)
> +                        (wrap-program (string-append (assoc-ref outputs "out")
> +                                                     "/bin/pmbootstrap")
> +                          `("PATH" ":" prefix
> +                            ,(map (match-lambda
> +                                    ((input directory)
> +                                     (string-append (assoc-ref inputs input)

Even though this is fine, maintainers have been favoring the usage of
'this-package-inputs' and related functions that improve code semantics
and readability.  The same goes for gexps in place for the usual quote
unquote dance.  See:

<https://guix.gnu.org/en/blog/2021/the-big-change> and
<https://lists.gnu.org/archive/html/guix-commits/2022-09/msg00511.html>

Also, a bit above, instead of 'assoc-ref outputs "out"', you may use
 #$output.

Incidentally, the first link shows that I was really in the wrong as
to the indentation comments in the previous mail.

> +                                                    "/" directory)))
> +                                  '(("bash"            "bin")
> +                                    ("coreutils"       "bin")
> +                                    ("git"             "bin")
> +                                    ("openssl"         "bin")
> +                                    ("procps"          "bin")
> +                                    ("multipath-tools" "sbin")

Breaks alphabetical order, which was consistently respected otherwise.

> +                                    ("tar"             "bin")
> +                                    ("util-linux"      "bin")
> +                                    ("util-linux"      "sbin"))))))))
> +       ;; The first two tests require a pmaports git repository in the workdir.
> +       #:test-flags #~(list (string-append "--deselect=test/core/test_pkgrepo"
> +                                           ".py::test_pkgrepo_pmaports")
> +                            (string-append "--deselect=test/parse/test_bootimg"
> +                                           ".py::test_bootimg")
> +                            ;; RuntimeError: No package repositories specified?
> +                            (string-append "--deselect=test/parse/"
> +                                           "test_deviceinfo.py::"
> +                                           "test_random_valid_deviceinfos"))))

But this is way clearer to me, thanks.. :)

> +    (native-inputs (list mkbootimg
> +                         python-pytest
> +                         python-setuptools
> +                         python-wheel
> +                         util-linux)) ; for losetup
> +    (inputs (list bash-minimal
> +                  coreutils
> +                  git
> +                  multipath-tools
> +                  openssl
> +                  procps
> +                  tar
> +                  util-linux))

I could not check this, so more of a question: are this new inputs
required for what?  They seem to enlarge the package size quite a bit
according to guix size.

Cheers!




This bug report was last modified 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.