Disabling livecheck in subports
Bradley Giesbrecht
pixilla at macports.org
Sun Jan 15 08:47:14 PST 2012
On Jan 14, 2012, at 3:01 PM, Ryan Schmidt wrote:
> On Jan 14, 2012, at 04:19, Dan Ports wrote:
>> On Fri, Jan 13, 2012 at 07:30:12PM -0600, Ryan Schmidt wrote:
>>> It seems to me that livecheck should be disabled in subports. I use "port livecheck maintainer:ryandesign" to check all my ports for updates, and I imagine other maintainers do similarly, and it is of no benefit to check the same software multiple times; it just wastes time and network bandwidth.
>>
>> That makes sense, but I sometimes do things like `port livecheck
>> installed` or `port livecheck rdepof:someport` to check for any ports
>> that might need updating, especially nomaintainer ones. That wouldn't
>> work if subports don't have livechecks.
>>
>> I'm not sure that's an important case to support, but I thought I'd
>> mention it.
>
> That's a point...
>
> Maybe livecheck itself could be made smarter. There are two problems I want to solve. One is wasting time and network bandwidth downloading the same information multiple times. The other is displaying redundant information to the user.
>
> Wasted time and bandwidth could be mitigated by having livecheck cache the URLs it downloads, until all livechecks are done. That would help if you run "port livecheck <somesetofports>" and multiple ports or subports in that set use the same livecheck URL. It would even help ports that aren't currently implemented as subports.
>
> Redundant livecheck runs could also perhaps be addressed like this: MacPorts could keep track of each livecheck object/command it runs, and not run the same command twice. For example if I run "port livecheck php5 php5-mysql" MacPorts would run the livecheck for php5, then record in a list all the properties of the livecheck object/command -- livecheck.name, livecheck.version, livecheck.type, livecheck.url, livecheck.regex, etc. Or, for speed, a hash of all of those combined. Then when it got to looking at php5-mysql, it could check the list of prior livechecks, realize that all the values for php5-mysql are the same as those for php5, and not run the livecheck again.
How about cacheing the Portfile "path" along with the livecheck result and when "path" exists in the cache return the result from the cache rather then performing another livecheck.
Or lookup the Portfile "paths" ahead of time and perform livecheck for the "name" of the Portfile.
Do we want all the subports to be returned from "$ port echo maintainer:ryandesign"?
Regards,
Bradley Giesbrecht (pixilla)
More information about the macports-dev
mailing list