New port needs commit

Juan Manuel Palacios jmpp at macports.org
Sun Jan 13 18:35:47 PST 2008


On Jan 13, 2008, at 4:02 PM, Luis O'Shea wrote:

>>> After the commit, I uninstalled asymptote, removed the reference  
>>> to my local port hierarchy from sources.conf, and did a selfupdate.
>>
>>
>> 	Why did you do that? What did the entry that you removed look  
>> like, and what lead you to the conclusion that you needed to remove  
>> it in the first place?
>
> My goal was to verify that the new asymptote Portfile functioned  
> correctly.  While I was developing the Portfile my sources.conf  
> looked like
>
> file:///Users/luis/macports/ports
> rsync://rsync.macports.org/release/ports/


	I see.

>
>
> I assume that while the "file:///..." line precedes the  
> "rsync:///...", port will pickup my copy of the Portfile rather than  
> the newly committed one.  So I removed the first line and did a  
> selfupdate.


	My mistake, I replied under the assumption you were working with a  
stock MacPorts setup, which is just the rsync URL in sources.conf.  
Nevertheless, it's still not necessary to remove (or comment out, for  
that matter) your first entry pointing to your local/development ports  
tree to test whether or not your submission made it to our rsync  
server, since "search", "info" and similar actions parse all  
PortIndexes found; say you have nmap in both your local and in the  
selfupdate'd tree, then (assuming both trees are in sources.conf, of  
course) "port search nmap" should give you two results for that  
particular port and port(1)'s -d flag reveals where each one belongs.

>
>
> Two questions:
> - What is the best description of the ports referenced by  
> "file:///..."?  I called it "my local port hierarchy", but I now  
> think this might be confusing.  (It might mean my *copy* of "rsync:// 
> rsync.macports...".)


	It could be whatever. It could be a read-only subversion checkout of  
the ports tree, as an alternative to rsync; it could be your local  
development tree; it could be both or maybe even something completely  
different ;-).

	The way I see it, the only two things that differentiate a "file:.//"  
entry from the "rsync://" one is that:

1) access to the latter is limited to rsync only, while access to the  
former can vary;
2) we, The MacPorts Project, maintain the latter by refreshing it  
periodically (every 30 minutes) and even regen'ing its index every 12  
hours, while the former is entirely up to you... with one sole  
exception: if the path for a file:// URL points to an svn checkout of  
subversion's /trunk/dports, then "port sync" also takes care of  
updating it.

>
> - After developing a new Portfile, what is the best way to pick up  
> the newly committed Portfile?  Should I leave sources.conf as is,  
> delete my Portfile (the one under "file:///...") and re-portindex?


	Depends on what you mean by "pick up". If by that you mean distribute  
to other users, then yes, they have to wait until the new index is  
passed to the rsync server that feeds the sync & selfupdate  
operations. If on the other hand you mean local usage, then all you  
have to do is cd into your dports dir and regen the index manually. In  
short, as you can surely see, "seeing" the port basically pivots on  
the index, so refreshing that is what you have to keep in mind.

>
>
> See below for the source of my thick-headedness.
>
>>
>>> However port seemed to not find the new asymptote port:
>>>
>>> % port info asymptote
>>> Error: Port asymptote not found
>>>
>>> But ${prefix}/var/macports/sources/rsync.macports.org/release/ 
>>> ports/graphics/asymptote/Portfile does exist.  I tried deleting $ 
>>> {prefix}/var/macports/sources/rsync.macports.org/release/ports/ 
>>> PortIndex and doing another selfupdate, but that did not help.
>>
>>
>> 	Entries in sources.conf point MacPorts to a valid PortIndex file,  
>> from which ports and their info are gathered; if there are no  
>> entries in sources.conf, no PortIndex will be found (regardless of  
>> the file(s) actually existing on the local filesystem). In the case  
>> of a stock MacPorts intallation, the rsync://rsync.macports.org/ 
>> release/ports/ URL is the only entry in the souces.conf file, and  
>> it gets mapped locally to ${prefix}/var/macports/sources/ 
>> rsync.macports.org/release/ports/PortIndex as you infer.  
>> Nevertheless, again, if you remove the entry from sources.conf the  
>> corresponding index will not be found by MacPorts.
>>
>> 	I'm curious as to what lead you to believe you needed to remove  
>> the entry, in case it's something in our documentation that's  
>> misleading you. In any case, the only thing you need to update your  
>> local ports tree and get fresh search results is put the entry back  
>> and issue a "selfupdate" regularly, plain and simple.
>
> Duh!  PortIndex is under version control -- I thought it was  
> generated locally after a sync.


	Yes, every 12 hours on the box of one of our kind committers, Daniel;  
from there it is committed to svn and then, on the next half hour,  
pushed to the rsync server, from where both "sync" and "selfupdate"  
will pull it in. Have a look at the /trunk/base/portmgr/jobs dir in  
subversion for more info if you're interested.

>
>
> Thanks!
>
> Luis


	Regards,...


-jmpp



More information about the macports-dev mailing list