* bug#55186: package-definition-location is wrong for inherited packages
@ 2022-04-29 15:56 Maxim Cournoyer
2022-05-02 21:04 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2022-04-29 15:56 UTC (permalink / raw)
To: 55186
Hi Guix,
Here's another problem with source location I've discovered when
attempting to locate the source of `python2-pytest-warnings', which
reads like:
--8<---------------cut here---------------start------------->8---
(define-public python2-pytest-warnings
(package (inherit (package-with-python2
(strip-python2-variant python-pytest-warnings)))
(properties `((superseded . ,python2-pytest)))))
--8<---------------cut here---------------end--------------->8---
The define-public line is at line 2569, but:
--8<---------------cut here---------------start------------->8---
(define package (car (find-packages-by-name "python2-pytest-warnings")))
(package-definition-location package) location->source-properties)
--8<---------------cut here---------------end--------------->8---
returns 2570, the line below.
Thanks,
Maxim
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#55186: package-definition-location is wrong for inherited packages
2022-04-29 15:56 bug#55186: package-definition-location is wrong for inherited packages Maxim Cournoyer
@ 2022-05-02 21:04 ` Ludovic Courtès
2022-05-16 4:56 ` Maxim Cournoyer
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2022-05-02 21:04 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 55186
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> Here's another problem with source location I've discovered when
> attempting to locate the source of `python2-pytest-warnings', which
> reads like:
>
> (define-public python2-pytest-warnings
> (package (inherit (package-with-python2
> (strip-python2-variant python-pytest-warnings)))
> (properties `((superseded . ,python2-pytest)))))
It works for me:
--8<---------------cut here---------------start------------->8---
$ guix repl
GNU Guile 3.0.8
Copyright (C) 1995-2021 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guix-user)> ,use(guix)
scheme@(guix-user)> ,use(gnu packages check)
scheme@(guix-user)> (package-definition-location python2-mock )
$1 = #<<location> file: "gnu/packages/check.scm" line: 882 column: 0>
scheme@(guix-user)> (package-definition-location python2-nose )
$2 = #<<location> file: "gnu/packages/check.scm" line: 917 column: 0>
scheme@(guix-user)> (package-definition-location python2-nose2 )
$3 = #f
scheme@(guix-user)> ,q
$ guix describe
Generation 214 May 02 2022 21:44:14 (current)
guix 6b588da
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 6b588da368c77cde82ea2f22ca315116228777ad
--8<---------------cut here---------------end--------------->8---
Note that ‘python2-nose2’ has #f. This is because it’s defined without
a literal (package …) form:
--8<---------------cut here---------------start------------->8---
(define-public python2-nose2
(package-with-python2 python-nose2))
--8<---------------cut here---------------end--------------->8---
It’s OK for the initial use case of ‘package-definition-location’, which
was the ‘generic-git’ updater.
Not sure if it helps, but I hope it does anyway. :-)
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#55186: package-definition-location is wrong for inherited packages
2022-05-02 21:04 ` Ludovic Courtès
@ 2022-05-16 4:56 ` Maxim Cournoyer
0 siblings, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2022-05-16 4:56 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 55186-done
Hi Ludovic,
Ludovic Courtès <ludo@gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Here's another problem with source location I've discovered when
>> attempting to locate the source of `python2-pytest-warnings', which
>> reads like:
>>
>> (define-public python2-pytest-warnings
>> (package (inherit (package-with-python2
>> (strip-python2-variant python-pytest-warnings)))
>> (properties `((superseded . ,python2-pytest)))))
>
> It works for me:
Thanks for checking, this works for me too now. I think I was amidst
modifications to the code, that induced me in error. I've fixed what I
think was a typo in a comment in the code that made my understanding
difficult in the early commits of https://issues.guix.gnu.org/55424.
Happily closing,
Maxim
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-16 4:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 15:56 bug#55186: package-definition-location is wrong for inherited packages Maxim Cournoyer
2022-05-02 21:04 ` Ludovic Courtès
2022-05-16 4:56 ` Maxim Cournoyer
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).