Problem with liveupdate (zlib)

Simon Ruderich simon at ruderich.com
Tue Jul 31 09:50:06 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,

thanks for your reply. First I want to say sorry for my late answer
but I have been busy with school stuff in the last few weeks.

Ryan Schmidt wrote:
> If you read up on livecheck, you will see that it has many different 
> modes of operation -- many places from which it can attempt to get a 
> program's most recent version info -- be that sourceforge, freshmeat,
> the project's homepage, etc. Indeed, what you describe is one
> possible way livecheck can work -- provided the port author 
> configures *how* to extract the current version number from that 
> project's homepage, since everybody writes their web pages in a 
> different way.

Then livecheck is a really very useful feature. Thanks for your quick
introduction in its possibilities.

>> What is with the other "regex didn't match" messages for Portfiles
>>  which have a correct specification of the liveupdate. Is this a 
>> limitation of the regex or am I missing something (again).
> 
> It could mean that the project's homepage is offline. Or it could 
> mean the livecheck specification was not in fact correct in the 
> portfile, either because the port author made a mistake, or because 
> MacPorts changed the way the livecheck information is interpreted, or
> because the project's homepage has changed in some way and a new 
> livecheck needs to be written.

I think it would be better if the message could be a bit more precise;
like "homepage not available". It would also be nice if port could print
(only in debug mode of course) the regex it used to check the page. This
would help with the multiple escape issue. So the maintainer knows
what's going wrong.

Ryan Schmidt wrote:
> 
> On Jul 11, 2007, at 10:41, Simon Ruderich wrote:
> 
>> I'm having some problems with liveupdate.
>> 
>> The first was to find some documentation about it. I only found it
>> in "man portfile" and it wasn't very precise (for example
>> regarding the regex syntax).
> 
> That's the only place I know of where it's documented. I expect that
> the regex syntax is standard PCRE syntax, but things like slashes
> and other special symbols need to be escaped from the TCL
> interpreter.

Then I hope documentation for this is added to the new macports guide.
This would make it much easier for users and developers to find this
nice feature.

> I'm sorry, I didn't see your message and already fixed the zlib 
> liveupdate. I changed it to this:
> 
> livecheck.regex "${name}-(\\\\d+(?:\\\\.\\\\d+)*)\\\\.tar\\\\.bz2"

Thanks for your quick fix.

> I'm having a hard time figuring out, however, why I need *4* slashes 
> every time PCRE syntax would lead me to expect to need only one. One 
> doubled slash will be to escape it from the TCL string, but why it 
> needs to be doubled again, I'm not sure.
> 
> I have a sneaking suspicion that something in the livecheck processor
> changed between MacPorts 1.4.42 and 1.5.0 to cause this, because I 
> had to fix the livecheck of several of my ports recently.

If I read the svn changelogs correctly then this was fixed in the
current trunk. But I'm not entirely sure.

> Landon is the true maintainer of zlib. I only jumped in because I 
> thought Landon had abandoned the port, but it turned out he hadn't.
> 
> I say it's bad form to do both whitespace changes and other changes 
> in one commit. Makes it difficult to see later what functional 
> changes were made, when a straightforward diff shows every line to 
> have changed because of whitespace adjustments. Ideally, each change
> should be committed separately.

Ok, thanks for your advice. Will do this in future.

> Also, whitespace is currently something of a personal preference of 
> the maintainer. In fact, Landon has specifically complained before 
> when the whitespace of the zlib port was changed without his consent.
> See:
> 
> http://trac.macosforge.org/projects/macports/changeset/23414
> 
> We should leave a port's whitespace up to its maintainer.

Ok, will do this too ;-)

> And, your diffs are difficult to read because they are in context 
> format (well, the "whitespace and other minor issues" one is), and 
> because they're pasted into the email, which has probably reformatted
> them some. Please submit unified diffs instead, ideally attached to 
> a ticket in Trac, or if it must be by email, then as an attachment, 
> not inline.

Sorry for this inconvenience. Normally I use unified diffs, just missed
it for this patch.
I don't know why the patch showed up as pasted into the email, because
I'm sure I attached it. Hope this works better in the future.

I don't like the trac system of macports so much because I noticed there
are many fixes, patches and new portfiles in there and nobody checks
them into the svn repository. But if something is mailed to the mailing
list (or to the port maintainer) it's done very quickly. So I think the
mailing list is a better and at the moment faster place for such patches.

Thanks for your help and sorry again for my late reply,
Simon
- --
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x6115F804EFB33229
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFGr2g+YRX4BO+zMikRCuUVAJ9wmFl7b3pF3N7JfrGjdlMFRAYWDQCgwZfq
O2A/lg+cb24rNLOnmetw+mY=
=rpi1
-----END PGP SIGNATURE-----



More information about the macports-dev mailing list