Skip Menu |

This queue is for tickets about the Graphics-TIFF CPAN distribution.

Report information
The Basics
Id: 128147
Status: resolved
Priority: 0/
Queue: Graphics-TIFF

People
Owner: Nobody in particular
Requestors: phil4597 [...] catskilltech.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: GT as optional library
Date: Mon, 31 Dec 2018 13:32:23 -0500
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Phil M Perry <phil4597 [...] catskilltech.com>
My package (PDF::Builder) can make use of Graphics::TIFF if the user happens to have it installed. I don't want to make it a mandatory prerequisite, as many systems may lack libtiff.a. The current setup, where the user needs to read the documentation and manually install Graphics::TIFF (if they want it), works well enough. The only thing lacking is a way for PDF::Builder to show up in Graphics::TIFF's "Reverse dependencies" list as a user of this library. I would like this as both a courtesy to you (to acknowledge that /someone/ is using this library), and as advertising for my library. I see there is a "recommends" keyword for somewhere in Makefile.PL (which is my starting point), but I can't find any documentation on what it does, and whether it will make PDF::Builder show up on your Reverse dependencies list without automatically installing Graphics::TIFF. Do you know how to do this?
Subject: Re: [rt.cpan.org #128147] GT as optional library
Date: Tue, 1 Jan 2019 10:58:06 +0100
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
Subject: Re: [rt.cpan.org #128147] GT as optional library
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
On 31/12/2018 19:33, phil4597@catskilltech.com via RT wrote: Show quoted text
> library), and as advertising for my library. I see there is a > "recommends" keyword for somewhere in Makefile.PL (which is my starting > point), but I can't find any documentation on what it does, and whether > it will make PDF::Builder show up on your Reverse dependencies list > without automatically installing Graphics::TIFF. Do you know how to do this?
I couldn't find a recommends keyword for MakeMaker, but there is one for Module::Build: https://metacpan.org/pod/distribution/Module-Build/lib/Module/Build/API.pod
Download signature.asc
application/pgp-signature 833b

Message body not shown because it is not plain text.

On Tue Jan 01 04:58:37 2019, RATCLIFFE wrote: Show quoted text
> I couldn't find a recommends keyword for MakeMaker, but there is one > for > Module::Build: > > https://metacpan.org/pod/distribution/Module- > Build/lib/Module/Build/API.pod
Hi Jeff, and thanks for responding. I still can't find any information about whether "recommends" lists me in your Reverse dependencies, which is what I'm looking for. It sounds like it will suggest to the user during installation that they install Graphics::TIFF (or other optional libraries), which I don't want to do. People will tend to automatically agree to install other stuff, and if GT fails (say, due to lack of libtiff.a), I fear they will blow off PDF::Builder at that point. I'd rather they make a cool, rational decision to install GT based upon their needs, and not blindly click "yes" during install. My starting point right now is Makefile.PL, hand-updated as necessary. I may have to consider going to MakeMaker or Build.PL (further up the food chain) if that's what it takes to be able to use "recommends". I'm looking at the DBD::AnyData package (as an example), which has both a Build.PL and a Makefile.PL, but only the Build.PL features "recommends". I'm not sure if Makefile.PL was built from Build.PL, or by hand, and the author forgot the "recommends" entry. Maybe it's time to try to contact the CPAN staff and see what they know about this.
Subject: Re: [rt.cpan.org #128147] GT as optional library
Date: Sun, 6 Jan 2019 19:01:13 +0100
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
Subject: Re: [rt.cpan.org #128147] GT as optional library
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
Hi Phil, On 02/01/2019 15:49, Phil M. Perry via RT wrote: Show quoted text
> I still can't find any information about whether "recommends" lists me in your Reverse dependencies, which is what I'm looking for.
When do you expect this to happen? Reverse dependencies can only normally be calculated by a package manager, as they can be very volatile. There is https://metacpan.org/pod/CPAN::ReverseDependencies If you are looking for the Graphics::TIFF page on CPAN or metaCPAN to mention PDF::Builder, then I can add that manually to the POD. Show quoted text
> It sounds like it will suggest to the user during installation that they install Graphics::TIFF (or other optional libraries), which I don't want to do. People will tend to automatically agree to install other stuff, and if GT fails (say, due to lack of libtiff.a), I fear they will blow off PDF::Builder at that point. I'd rather they make a cool, rational decision to install GT based upon their needs, and not blindly click "yes" during install.
Surely this is exactly what you want, and why you want "recommends" and not "requires", as Graphics::TIFF failing to build due to a missing libtiff should not fail the PDF::Builder install. Why don't you give it a go? Set up a Build.PL for Module::Build with recommends, remove libtiff and Graphics::TIFF and see what happens. Show quoted text
> My starting point right now is Makefile.PL, hand-updated as necessary. I may have to consider going to MakeMaker or Build.PL (further up the food chain) if that's what it takes to be able to use "recommends". I'm looking at the DBD::AnyData package (as an example), which has both a Build.PL and a Makefile.PL, but only the Build.PL features "recommends". I'm not sure if Makefile.PL was built from Build.PL, or by hand, and the author forgot the "recommends" entry.
Makefile.PL is MakeMaker. AFAIK, Makefile.PL/MakeMaker do not support recommends. Show quoted text
> Maybe it's time to try to contact the CPAN staff and see what they know about this.
And/or maybe the authors of MakeMaker and Module::Build. Regards Jeff
Download signature.asc
application/pgp-signature 833b

Message body not shown because it is not plain text.

On Sun Jan 06 13:08:49 2019, RATCLIFFE wrote: Show quoted text
> Hi Phil, > > On 02/01/2019 15:49, Phil M. Perry via RT wrote:
> > I still can't find any information about whether "recommends" lists > > me in your Reverse dependencies, which is what I'm looking for.
> > When do you expect this to happen? > > Reverse dependencies can only normally be calculated by a package > manager, as they can be very volatile. There is > > https://metacpan.org/pod/CPAN::ReverseDependencies
As a courtesy to optional library authors (like you), I'd like to be listed in your library's Reverse dependencies as a user of your library. That's primarily what I'm looking for with this whole issue. It doesn't hurt that it also provides some advertising for me. Show quoted text
> > If you are looking for the Graphics::TIFF page on CPAN or metaCPAN to > mention PDF::Builder, then I can add that manually to the POD.
You may, if you wish to, but package authors (me) shouldn't have to go around asking optional library authors (you) to manually update their PODs. There should be some way to handle this automatically and that it show up in the CPAN listings. Show quoted text
>
> > It sounds like it will suggest to the user during installation that > > they install Graphics::TIFF (or other optional libraries), which I > > don't want to do. People will tend to automatically agree to install > > other stuff, and if GT fails (say, due to lack of libtiff.a), I fear > > they will blow off PDF::Builder at that point. I'd rather they make > > a cool, rational decision to install GT based upon their needs, and > > not blindly click "yes" during install.
> > Surely this is exactly what you want, and why you want "recommends" > and not "requires", as Graphics::TIFF failing to build due to a > missing libtiff should not fail the PDF::Builder install.
I have two concerns: 1) a failing Graphics::TIFF install looks bad, even if PDF::Builder still succeeds (naive users might not trust it), and 2) adding Graphics::TIFF would bloat their Perl library installation even if they never use TIFF images. As I said, I'd rather they make a cool, rational decision, after thinking it over, than automatically concur with an additional installation they don't really need. Show quoted text
> > Why don't you give it a go? Set up a Build.PL for Module::Build with > recommends, remove libtiff and Graphics::TIFF and see what happens.
That's a possibility. At least I can see if it actually tries to install Graphics::TIFF (with or without permission). I'm not going to spend the time on this, though, until I know whether PDF::Builder would definitely show up in the Reverse dependencies. Show quoted text
>
> > My starting point right now is Makefile.PL, hand-updated as > > necessary. I may have to consider going to MakeMaker or Build.PL > > (further up the food chain) if that's what it takes to be able to > > use "recommends". I'm looking at the DBD::AnyData package (as an > > example), which has both a Build.PL and a Makefile.PL, but only the > > Build.PL features "recommends". I'm not sure if Makefile.PL was > > built from Build.PL, or by hand, and the author forgot the > > "recommends" entry.
> > Makefile.PL is MakeMaker. AFAIK, Makefile.PL/MakeMaker do not support > recommends.
That's disappointing that I would have to shift to Build.PL. I'll consider it if I can get the desired results from "recommends", or there are other considerations. Show quoted text
>
> > Maybe it's time to try to contact the CPAN staff and see what they > > know about this.
I did, but haven't heard anything back yet. Show quoted text
> > And/or maybe the authors of MakeMaker and Module::Build. > > Regards > > Jeff
Thanks for the information and suggestions. Perhaps I'll try playing with Build.PL some day when I have some free time, and switch over to it (from the hand-coded Makefile.PL) if it gives the desired results. By the way, per our old discussion, did you ever make any headway on building libtiff.a from C during Graphics::TIFF install? Installations compile/link C code all the time, but I don't know how a ".a" library archive would fit in to this.
New news: I was just doing my regular "upgrades" via CPAN, and one of them was GD. It tried very hard to install Test::Kwalitee, but failed. At the end it listed that package (among others) under "Optional" (and having failed), but GD _did_ successfully upgrade to the newest (10 January) release. My curiosity was piqued, so I looked in the GD package to see what this "Optional" was. They have only Makefile.PL, and it includes a "recommends" section with Test::Kwalitee (and several others). It looks like if a package is recommended, the upgrade or install WILL attempt to install it. I'm not enthralled by this, as installing a lot of optional libraries that someone doesn't plan to use could really bloat a system, but I _could_ document it and tell users that they are free to remove unused libraries. (Unfortunately, they'll probably have to remove the unused libs each time they upgrade PDF::Builder. Maybe a script to remove them all at once?) Good news: Test::Kwalitee, although not listed on the GD page as a prereq (that's OK, it's not required), _is_ listed under Test::Kwalitee's Reverse dependencies. This would mean that PDF::Builder should be listed under Graphics::TIFF's Reverse dependencies, which I want, should I add a "recommends" section to Makefile.PL. I'll think about it. There will be plenty more optional libraries for PDF::Builder, so I may provide a script to remove them. I'll also have to study GD's Makefile.PL interactive portions, which might be used to prompt for optional library installations?
On Fri Jan 11 12:39:49 2019, PMPERRY wrote: Show quoted text
> Good news: Test::Kwalitee, although not listed on the GD page as a > prereq (that's OK, it's not required), _is_ listed under > Test::Kwalitee's Reverse dependencies.
That of course would be _GD_ is listed under Test::Kwalitee's Reverse dependencies, as a package using Test::Kwalitee, even though it's not _required_.
Subject: Re: [rt.cpan.org #128147] GT as optional library
Date: Fri, 11 Jan 2019 20:18:08 +0100
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
Subject: Re: [rt.cpan.org #128147] GT as optional library
To: bug-Graphics-TIFF [...] rt.cpan.org
From: Jeff <jffry [...] posteo.net>
On 11/01/2019 18:39, Phil M. Perry via RT wrote: Show quoted text
> Good news: Test::Kwalitee, although not listed on the GD page as a prereq (that's OK, it's not required), _is_ listed under Test::Kwalitee's Reverse dependencies. This would mean that PDF::Builder should be listed under Graphics::TIFF's Reverse dependencies, which I want, should I add a "recommends" section to Makefile.PL. I'll think about it. There will be plenty more optional libraries for PDF::Builder, so I may provide a script to remove them. I'll also have to study GD's Makefile.PL interactive portions, which might be used to prompt for optional library installations?
I'm glad to hear that you seem to have solved the problem. Regards Jeff
Download signature.asc
application/pgp-signature 833b

Message body not shown because it is not plain text.

On Fri Jan 11 14:18:26 2019, RATCLIFFE wrote: Show quoted text
> > I'm glad to hear that you seem to have solved the problem. > > Regards > > Jeff
Hmm. Looks like only the owner (you) can close a ticket. Thanks!