Opened 10 years ago
Last modified 9 years ago
#44894 new enhancement
base: improve livecheck.type moddate
Reported by: | pixilla (Bradley Giesbrecht) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 2.3.1 |
Keywords: | haspatch | Cc: | raimue (Rainer Müller) |
Port: |
Description (last modified by pixilla (Bradley Giesbrecht))
Currently livecheck.type moddate uses the Portfiles mtime for comparison to remotes mtime.
It would be useful to allow control of the comparison time. Attached is a patch to portlivecheck.tcl which enhances the livecheck.type moddate option to allow setting the comparison time, defaulting to current behavior.
There is also a new function "getmoddate" added to curl.c and a new livecheck.type option "moddate2" in portlivecheck.tcl which uses getmoddate to provide a more informative ui_msg.
The moddate2 option is added for easy comparison, not to add another option. I am proposing replacing the use of isnewer with getmoddate.
Attachments (2)
Change History (8)
Changed 10 years ago by pixilla (Bradley Giesbrecht)
Attachment: | patch-base-src-port1.0-portlivecheck.tcl.diff added |
---|
Changed 10 years ago by pixilla (Bradley Giesbrecht)
Attachment: | patch-base-src-pextlib1.0-curl.c.diff added |
---|
comment:1 Changed 10 years ago by pixilla (Bradley Giesbrecht)
comment:2 Changed 10 years ago by pixilla (Bradley Giesbrecht)
Description: | modified (diff) |
---|
comment:3 Changed 10 years ago by pixilla (Bradley Giesbrecht)
Description: | modified (diff) |
---|
comment:4 Changed 10 years ago by pixilla (Bradley Giesbrecht)
Example output using the pear-install-phar port and moddate2:
$ port livecheck pear-install-phar pear-install-phar seems to have been updated (port version: Mon Mar 25 00:00:00 PDT 2013, new version: Sun Aug 10 13:41:17 PDT 2014)
comment:5 Changed 10 years ago by mkae (Marko Käning)
Cool stuff! This can be very useful in some cases!!! :-)
comment:6 Changed 9 years ago by raimue (Rainer Müller)
Cc: | raimue@… added |
---|
As far as I see, this would be compatible to the existing moddate, so replacing it would be fine. There is only a small mistake in curl.c, where the declaration of function CurlModDateCmd
does not match the definiton of CurlGetModDateCmd
.
Otherwise, feel free to bring this to trunk/base with a corresponding ChangeLog entry.
New features in the patches can be tested like this:
or the little changed moddate option: