Subject: Re: Volunteers wanted for NetBSD-FreshPorts interface
To: Dan Langille <dan@langille.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 12/28/2000 03:50:35
On Thu, 28 Dec 2000, Dan Langille wrote:
> http://freshports.org/docs/cvs_commits.dtd
> http://freshports.org/docs/commits.xml

Just making a few uneducated comments - I'm not very familiar with XML and
esp. DTD language:

 <MESSAGE
	Message-Id="200012241055.eBOAt0w89958@freefall.freebsd.org" Date="Sun, 24
	Dec 2000 02:54:59 -0800 (PST)" To="cvs-committers@FreeBSD.ORG,
	cvs-all@FreeBSD.ORG" Sender="owner-cvs-all@FreeBSD.ORG" Subject="cvs
	commit: src/gnu/usr.bin/tar prepend_args.c prepend_args.h
         Makefile tar.1 tar.c" /> 
 <FILES> 
	<FILE Path="src/gnu/usr.bin/tar/Makefile" Changes="+3
	-1" Revision="1.11.6.1" Action="Modify" /> 

Wouldn't it be clearer to not stuff all that data as parameters into the
MESSAGE and FILE tags, but rather give them sub-items(or what's that
called?):

	<MESSAGE>
		<MESSAGE-ID>200012241055.eBOAt0w89958@freefall.freebsd.org</MESSAGE-ID>
		<DATE>Sun, 24 Dec 2000 02:54:59 -0800 (PST)</DATE>
		<TO>cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG</TO>
		<SENDER>owner-cvs-all@FreeBSD.ORG</SENDER>
		<SUBJECT>cvs commit: src/gnu/usr.bin/tar prepend_args.c prepend_args.h Makefile tar.1 tar.c</SUBJECT>
	</MESSAGE>
	<FILES>
		<FILE>
			<PATH>src/gnu/usr.bin/tar/Makefile</PATH>
			<CHANGES>+3 -1</CHANGES>
			<REVISION>1.11.6.1</REVISION>
			<ACTION>Modify</ACTION>
		</FILE>
		<FILE>
			...

I think you get the idea.


> > I'd say it's
> > rather difficult to gather that information, 
> 
> Sorry, I got lost here.  Which information is difficult to gather?  If it's in 
> the source-changes mail, it can be parsed.  That's what FreshPorts 
> does now.  That's what is being done to get the new XML data format.  
> That coding should be done within the next 24 hours.

Hum, sounds like some fiddling, but as long as I'm not the one who has to
do it... ;-)


> > esp. as a commit may not
> > actually do any functional change (e.g. I just committed a text change to
> > a pkg/DESCR file), or a pkg upgrade may consist of several seperate
> > commits. Where is the line?
> 
> Where is what line?  Sorry, I'm lost.

The line to differentiate between two pkg updates. But as you seem to use
this for something else than I thought initially - ignore me. ;)


> > I guess most people are interrested if a pkg is
> > updated what the changes are, and that's it. They'll update their source
> > then, and install the pkg. Or what is the exact idea behind this very
> > fine-grained update information?
> 
> FreshPorts needs to know if any of the following have changed: 
> Makefile, pkg-descr, pkg-comment.  They contain information which 
> FreshPorts provides via the website.  If those files change, they need to 
> bed extracted from the online repository and used to update the 
> FreshPorts database.

OK. Please note that NetBSD still uses the "old" FreeBSD layout
(pkg/DESCR, patches/patch-*, ...). 


> BTW: once a commit is done, are the files immediately avaiable via 
> CVSweb?

No. I don't know how often cvsweb is updated, sorry. 
Anoncvs is update every 6 hours or so. And I think for what you wand
(push-based updating), anoncvs would be best. At least the "cvs
rdiff" commands in the NetBSD commit mails can be used 1:1 to retrieve
patches. ;-)


There's an archive of NetBSD commit messages at
http://mail-index.netbsd.org/source-changes, the pkgsrc commits all have a
subject of "CVS commit: pkgsrc". If you or whoever works on the mail2xml
script wants to take a stab at parsing that, that would be cool. I figure
it's probably rather easy to adopt an existing script, esp. when you're
familiar with it.  Ascii versions of these mails can be fetched from the
(outdated :/) archive at
ftp://ftp.netbsd.org/pub/NetBSD/mailing-lists/source-changes/.

One difference between the message formats just came to me - NetBSD does
not have a lines changed "-lines +lines" entry anywhere in that mail. 

Let me know if I can be of any help... 


 - Hubert

-- 
Hubert Feyrer <hubert@feyrer.de>