git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 3/8] perl: generalize the Git::LoadCPAN facility

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 16, 2018, 14:39 UTC
Message-ID
<87k1vdf188.fsf@evledraar.gmail.com>
In-Reply-To
<20180215212338.GL27038@zaya.teonanacatl.net>
On Thu, Feb 15 2018, Todd Zullinger jotted:
Show 60 quoted lines
> [I dropped bbourbie@slb.com from the Cc: list, as it bounced
> on my previous reply.]
>
> Ævar Arnfjörð Bjarmason wrote:
>> That makes sense, I'll incorporate that in a re-roll. I like
>> NO_PERL_CPAN_FALLBACKS or just NO_CPAN_FALLBACKS better.
>
> Either is an improvement.  Starting with NO_PERL_ seems
> like a slightly better bikeshed color. :)
>
>> I'd really like to find some solution that works differently though,
>> because with this approach we'll run the full test suite against a
>> system where our fallbacks will be in place (although if the OS
>> distributor has done as promised we won't use them), and then just
>> remove this at 'make install' time, also meaning we'll re-gen it before
>> running 'make install' again, only to rm it again.
>>
>> The former issue we could deal with by munging the Git::LoadCPAN file so
>> it knows about NO_PERL_CPAN_FALLBACKS, and will always refuse to use the
>> fallbacks if that's set. That's a good idea anyway, because right now if
>> you e.g. uninstall Error.pm on Debian (which strips the CPAN fallbacks)
>> you get a cryptic "BUG: ..." message, it should instead say "we couldn't
>> get this module the OS promised we'd have" or something to that effect.
>
> Teaching Git::LoadCPAN to never fallback sounds like a good
> idea.  At least then if the packager intended to avoid the
> fallbacks and didn't get it right the error message could be
> more useful.
>
> Hopefully that's not a common problem for packagers though.
> (And adding the Makefile knob was intended to help make it
> easier for packagers to achieve this common goal.)
>
>> The latter is trickier, I don't see an easy way to coerce the Makefile
>> into not copying the FromCPAN directory without going back to a
>> hardcoded list again, the easiest thing is probably to turn that:
>>
>>     $(TAR) cf - .)
>>
>> Into:
>>
>>     $(TAR) cf - $(find ... -not ....)
>>
>> Or something like that to get all the stuff that isn't the Git/FromCPAN
>> directory.
>>
>> Other suggestions most welcome.
>
> What about moving perl/Git/FromCPAN to perl/FromCPAN and
> then including perl/FromCPAN in LIB_PERL{,_GEN} only if
> NO_PERL_CPAN_FALLBACKS is unset?
>
>  LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
> +ifndef NO_PERL_CPAN_FALLBACKS
> +LIB_PERL += $(wildcard perl/FromCPAN/*.pm perl/FromCPAN/*/*.pm)
> +endif
>  LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
>
> I haven't tested that at all, so it could be broken in many
> ways.

Yes that's a much better idea, it evades the whole problem of conflating the perl/Git* glob.

Previous: Todd ZullingerNext: Todd Zullinger
Message 18 of 66 in “various perl fixes”
  1. 0/8 various perl fixesÆvar Arnfjörð Bjarmason, Feb 14, 2018
  2. 1/8 perl: *.pm files should not have the executable bitÆvar Arnfjörð Bjarmason, Feb 14, 2018
  3. Jonathan NiederFeb 14, 2018
  4. Ævar Arnfjörð BjarmasonFeb 25, 2018
  5. 2/8 perl: move CPAN loader wrappers to another namespaceÆvar Arnfjörð Bjarmason, Feb 14, 2018
  6. Jonathan NiederFeb 14, 2018
  7. 4/8 perl: update our ancient copy of Error.pmÆvar Arnfjörð Bjarmason, Feb 14, 2018
  8. Jonathan NiederFeb 14, 2018
  9. Ævar Arnfjörð BjarmasonFeb 15, 2018
  10. 3/8 perl: generalize the Git::LoadCPAN facilityÆvar Arnfjörð Bjarmason, Feb 14, 2018
  11. Jonathan NiederFeb 14, 2018
  12. Todd ZullingerFeb 15, 2018
  13. Ævar Arnfjörð BjarmasonFeb 25, 2018
  14. Randall S. BeckerFeb 25, 2018
  15. Todd ZullingerFeb 15, 2018
  16. Ævar Arnfjörð BjarmasonFeb 15, 2018
  17. Todd ZullingerFeb 15, 2018
  18. Ævar Arnfjörð BjarmasonFeb 16, 2018
  19. Todd ZullingerFeb 16, 2018
  20. Jonathan NiederFeb 16, 2018
  21. Todd ZullingerFeb 17, 2018
  22. Todd ZullingerFeb 17, 2018
  23. 6/8 git-send-email: unconditionally use Net::{SMTP,Domain}Ævar Arnfjörð Bjarmason, Feb 14, 2018
  24. Jonathan NiederFeb 14, 2018
  25. Ævar Arnfjörð BjarmasonFeb 15, 2018
  26. 7/8 gitweb: hard-depend on the Digest::MD5 5.8 moduleÆvar Arnfjörð Bjarmason, Feb 14, 2018
  27. Jonathan NiederFeb 14, 2018
  28. 5/8 perl: update our copy of Mail::AddressÆvar Arnfjörð Bjarmason, Feb 14, 2018
  29. Jonathan NiederFeb 14, 2018
  30. Matthieu MoyFeb 15, 2018
  31. Ævar Arnfjörð BjarmasonFeb 15, 2018
  32. 8/8 perl: hard-depend on the File::{Temp,Spec} modulesÆvar Arnfjörð Bjarmason, Feb 14, 2018
  33. Jonathan NiederFeb 14, 2018
  34. Ævar Arnfjörð BjarmasonFeb 15, 2018
  35. Junio C HamanoFeb 15, 2018
  36. 00/13 various perl fixesÆvar Arnfjörð Bjarmason, Feb 25, 2018
  37. 01/13 perl: *.pm files should not have the executable bitÆvar Arnfjörð Bjarmason, Feb 25, 2018
  38. 02/13 Git.pm: remove redundant "use strict" from sub-packageÆvar Arnfjörð Bjarmason, Feb 25, 2018
  39. 03/13 Git.pm: add the "use warnings" pragmaÆvar Arnfjörð Bjarmason, Feb 25, 2018
  40. 04/13 gitweb: hard-depend on the Digest::MD5 5.8 moduleÆvar Arnfjörð Bjarmason, Feb 25, 2018
  41. Eric SunshineFeb 25, 2018
  42. 05/13 Git.pm: hard-depend on the File::{Temp,Spec} modulesÆvar Arnfjörð Bjarmason, Feb 25, 2018
  43. 07/13 perl: update our ancient copy of Error.pmÆvar Arnfjörð Bjarmason, Feb 25, 2018
  44. 06/13 git-send-email: unconditionally use Net::{SMTP,Domain}Ævar Arnfjörð Bjarmason, Feb 25, 2018
  45. Eric SunshineFeb 25, 2018
  46. 09/13 perl: move CPAN loader wrappers to another namespaceÆvar Arnfjörð Bjarmason, Feb 25, 2018
  47. 08/13 perl: update our copy of Mail::AddressÆvar Arnfjörð Bjarmason, Feb 25, 2018
  48. 10/13 perl: generalize the Git::LoadCPAN facilityÆvar Arnfjörð Bjarmason, Feb 25, 2018
  49. 11/13 perl: move the perl/Git/FromCPAN tree to perl/FromCPANÆvar Arnfjörð Bjarmason, Feb 25, 2018
  50. 13/13 perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKSÆvar Arnfjörð Bjarmason, Feb 25, 2018
  51. 12/13 Makefile: add NO_PERL_CPAN_FALLBACKS knobÆvar Arnfjörð Bjarmason, Feb 25, 2018
  52. 00/13 various perl fixesÆvar Arnfjörð Bjarmason, Mar 3, 2018
  53. 01/13 perl: *.pm files should not have the executable bitÆvar Arnfjörð Bjarmason, Mar 3, 2018
  54. 02/13 Git.pm: remove redundant "use strict" from sub-packageÆvar Arnfjörð Bjarmason, Mar 3, 2018
  55. 04/13 gitweb: hard-depend on the Digest::MD5 5.8 moduleÆvar Arnfjörð Bjarmason, Mar 3, 2018
  56. 05/13 Git.pm: hard-depend on the File::{Temp,Spec} modulesÆvar Arnfjörð Bjarmason, Mar 3, 2018
  57. 03/13 Git.pm: add the "use warnings" pragmaÆvar Arnfjörð Bjarmason, Mar 3, 2018
  58. 06/13 git-send-email: unconditionally use Net::{SMTP,Domain}Ævar Arnfjörð Bjarmason, Mar 3, 2018
  59. 10/13 perl: generalize the Git::LoadCPAN facilityÆvar Arnfjörð Bjarmason, Mar 3, 2018
  60. 11/13 perl: move the perl/Git/FromCPAN tree to perl/FromCPANÆvar Arnfjörð Bjarmason, Mar 3, 2018
  61. 12/13 Makefile: add NO_PERL_CPAN_FALLBACKS knobÆvar Arnfjörð Bjarmason, Mar 3, 2018
  62. 13/13 perl Git::LoadCPAN: emit better errors under NO_PERL_CPAN_FALLBACKSÆvar Arnfjörð Bjarmason, Mar 3, 2018
  63. 08/13 perl: update our copy of Mail::AddressÆvar Arnfjörð Bjarmason, Mar 3, 2018
  64. 09/13 perl: move CPAN loader wrappers to another namespaceÆvar Arnfjörð Bjarmason, Mar 3, 2018
  65. 07/13 perl: update our ancient copy of Error.pmÆvar Arnfjörð Bjarmason, Mar 3, 2018
  66. Junio C HamanoMar 5, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.