From: Vincent Legoll <vincent.legoll@gmail.com>
To: guix-devel <guix-devel@gnu.org>
Subject: profile-collisions linter
Date: Tue, 29 Dec 2020 16:05:17 +0100 [thread overview]
Message-ID: <CAEwRq=ps54u0hC-6hnXji1rdupM_6ZyOxvkZQZiSMVZu1eBAuQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
Hello,
I'm having a look at the reported profile-collisions
linter warnings.
See for example:
http://data.guix.gnu.org/revision/f521104e344ed9bf259a6b821fd0f3080f8ebf6b/package/python-requests/2.20.1?locale=en_US.UTF-8
I'm trying to remove the duplicated propagated-inputs
entries (from the inherited package) and then
concatenating the overrides.
I've come with the attached diff, but it's giving me
headaches.
Anyone can give it a look and tell me what is wrong
with my coding ?
PS: I don't know if this would be better posted in guix-help or elsewhere...
Thanks
--
Vincent Legoll
[-- Attachment #2: propagated-inputs-linter-warning.diff --]
[-- Type: text/x-patch, Size: 1335 bytes --]
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index c1de8197e0..94a7210bbf 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -2454,6 +2454,11 @@ APIs.")
than Python’s urllib2 library.")
(license license:asl2.0)))
+(define (propagated-inputs-filtered overrides old_inputs)
+ (let* ((overrides_names (map caar overrides))
+ (old_inputs_filtered (remove (lambda i (member (caar i) overrides_names) old_inputs))))
+ (concatenate '(old_inputs_filtered overrides))))
+
;; Some software requires an older version of Requests, notably Docker/Docker
;; Compose.
(define-public python-requests-2.20
@@ -2466,9 +2471,10 @@ than Python’s urllib2 library.")
(base32
"0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
(propagated-inputs
- `(("python-urllib3" ,python-urllib3-1.24)
- ("python-idna" ,python-idna-2.7)
- ,@(package-propagated-inputs python-requests)))))
+ `,@(propagated-inputs-filtered
+ `(("python-urllib3" ,python-urllib3-1.24)
+ ("python-idna" ,python-idna-2.7))
+ (package-propagated-inputs python-requests)))))
(define-public python2-requests
(package-with-python2 python-requests))
next reply other threads:[~2020-12-29 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 15:05 Vincent Legoll [this message]
2020-12-29 22:36 ` profile-collisions linter Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEwRq=ps54u0hC-6hnXji1rdupM_6ZyOxvkZQZiSMVZu1eBAuQ@mail.gmail.com' \
--to=vincent.legoll@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).