unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40528: 'guix lint' does not check whether propagated-inputs should be native
@ 2020-04-09 21:24 Marius Bakke
  2020-04-09 21:31 ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: Marius Bakke @ 2020-04-09 21:24 UTC (permalink / raw)
  To: 40528

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]

'guix lint -c inputs-should-be-native' only checks the 'inputs' field of
a package, not propagated-inputs.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#40528: 'guix lint' does not check whether propagated-inputs should be native
  2020-04-09 21:24 bug#40528: 'guix lint' does not check whether propagated-inputs should be native Marius Bakke
@ 2020-04-09 21:31 ` Efraim Flashner
  2020-04-09 21:42   ` Marius Bakke
  0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2020-04-09 21:31 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40528


[-- Attachment #1.1: Type: text/plain, Size: 641 bytes --]

On Thu, Apr 09, 2020 at 11:24:25PM +0200, Marius Bakke wrote:
> 'guix lint -c inputs-should-be-native' only checks the 'inputs' field of
> a package, not propagated-inputs.

The attached patch should add the propagated inputs to the list of
inputs to check. Do we want to start telling it to ignore some of them?

gnu/packages/check.scm:2200:2: python-nose-timer@0.7.5: 'python-nose' should probably be a native input


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: 0001-lint-Check-for-inappropriate-inputs-in-propagated-in.patch --]
[-- Type: text/plain, Size: 1499 bytes --]

From 2ca0a385847c8dfcaffe4f32c5dbce7297086859 Mon Sep 17 00:00:00 2001
From: Efraim Flashner <efraim@flashner.co.il>
Date: Fri, 10 Apr 2020 00:29:56 +0300
Subject: [PATCH] lint: Check for inappropriate inputs in propagated-inputs
 too.

* guix/lint.scm (check-inputs-should-be-native): Also check the
propagated inputs of the package.
---
 guix/lint.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/guix/lint.scm b/guix/lint.scm
index 72582cfffb..bda5c0cd77 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2017 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
-;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -286,7 +286,8 @@ of a package, and INPUT-NAMES, a list of package specifications such as
 (define (check-inputs-should-be-native package)
   ;; Emit a warning if some inputs of PACKAGE are likely to belong to its
   ;; native inputs.
-  (let ((inputs (package-inputs package))
+  (let ((inputs (append (package-inputs package)
+                        (package-propagated-inputs package)))
         (input-names
          '("pkg-config"
             "autoconf"
-- 
2.26.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#40528: 'guix lint' does not check whether propagated-inputs should be native
  2020-04-09 21:31 ` Efraim Flashner
@ 2020-04-09 21:42   ` Marius Bakke
  2020-04-09 21:50     ` Efraim Flashner
  0 siblings, 1 reply; 5+ messages in thread
From: Marius Bakke @ 2020-04-09 21:42 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: 40528

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

Efraim Flashner <efraim@flashner.co.il> writes:

> On Thu, Apr 09, 2020 at 11:24:25PM +0200, Marius Bakke wrote:
>> 'guix lint -c inputs-should-be-native' only checks the 'inputs' field of
>> a package, not propagated-inputs.
>
> The attached patch should add the propagated inputs to the list of
> inputs to check. Do we want to start telling it to ignore some of them?

Wow, that was incredibly fast!

> gnu/packages/check.scm:2200:2: python-nose-timer@0.7.5: 'python-nose' should probably be a native input

I'm inclined to leave it.  I think many of these plugin packages should
not be propagating the package that they plug into anyway.

LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

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

* bug#40528: 'guix lint' does not check whether propagated-inputs should be native
  2020-04-09 21:42   ` Marius Bakke
@ 2020-04-09 21:50     ` Efraim Flashner
  2020-04-10  8:51       ` Christopher Baines
  0 siblings, 1 reply; 5+ messages in thread
From: Efraim Flashner @ 2020-04-09 21:50 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 40528-done

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Thu, Apr 09, 2020 at 11:42:18PM +0200, Marius Bakke wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > On Thu, Apr 09, 2020 at 11:24:25PM +0200, Marius Bakke wrote:
> >> 'guix lint -c inputs-should-be-native' only checks the 'inputs' field of
> >> a package, not propagated-inputs.
> >
> > The attached patch should add the propagated inputs to the list of
> > inputs to check. Do we want to start telling it to ignore some of them?
> 
> Wow, that was incredibly fast!
> 
> > gnu/packages/check.scm:2200:2: python-nose-timer@0.7.5: 'python-nose' should probably be a native input
> 
> I'm inclined to leave it.  I think many of these plugin packages should
> not be propagating the package that they plug into anyway.
> 
> LGTM!

OK, patch pushed.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#40528: 'guix lint' does not check whether propagated-inputs should be native
  2020-04-09 21:50     ` Efraim Flashner
@ 2020-04-10  8:51       ` Christopher Baines
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Baines @ 2020-04-10  8:51 UTC (permalink / raw)
  To: Marius Bakke, 40528-done

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]


Efraim Flashner <efraim@flashner.co.il> writes:

> On Thu, Apr 09, 2020 at 11:42:18PM +0200, Marius Bakke wrote:
>> Efraim Flashner <efraim@flashner.co.il> writes:
>>
>> > On Thu, Apr 09, 2020 at 11:24:25PM +0200, Marius Bakke wrote:
>> >> 'guix lint -c inputs-should-be-native' only checks the 'inputs' field of
>> >> a package, not propagated-inputs.
>> >
>> > The attached patch should add the propagated inputs to the list of
>> > inputs to check. Do we want to start telling it to ignore some of them?
>>
>> Wow, that was incredibly fast!
>>
>> > gnu/packages/check.scm:2200:2: python-nose-timer@0.7.5: 'python-nose' should probably be a native input
>>
>> I'm inclined to leave it.  I think many of these plugin packages should
>> not be propagating the package that they plug into anyway.
>>
>> LGTM!
>
> OK, patch pushed.

Looks like it's working :) [1]

1: http://data.guix.gnu.org/compare?base_commit=960abd585940c33744040c79e2a37e588d36e589&target_commit=d95252baf97adb261dd823d4e7a74a7522815c1c

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

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

end of thread, other threads:[~2020-04-10  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-09 21:24 bug#40528: 'guix lint' does not check whether propagated-inputs should be native Marius Bakke
2020-04-09 21:31 ` Efraim Flashner
2020-04-09 21:42   ` Marius Bakke
2020-04-09 21:50     ` Efraim Flashner
2020-04-10  8:51       ` Christopher Baines

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).