Opened 20 years ago

Closed 20 years ago

Last modified 19 years ago

#2708 closed defect (fixed)

port info (and others) fails prematurely if one of many indexes not found

Reported by: rshaw@… Owned by: rshaw@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc: jmpp@…
Port:

Description

Hey Robert! After seeing this change in base/ I decided to update my tools and give it a try. However I experienced some "odd" behavior which I would like to report (not too sure yet if it even relates to what you tweaked, but in any case since you're already on the subject ;-). Please be patient because the message may get a bit lengthy in (hopefully easy to read) examples :-)

Locally I have two indexes, one for the home brew ports and the other, the main one, for the

official tree I update from OD through CVS, both properly listed in my sources.conf file. The first ones lives in my home dir under /Users (listed first in sources.conf) and the other one I keep under /usr/ local/OpenDarwin (listed second).

I temporarily moved aside my main /usr/local/OpenDarwin/darwinports/dports/PortIndex file and

cd'ed to a portdir I also have in my personal index, aqua/NmapFE (since I maintain that port). With both entries in sources.conf active (i.e. not commented out), I see the following behavior:

$[juan@PowerBook(ttyp1): NmapFE](836/0,2)-> pwd /usr/local/OpenDarwin/darwinports/dports/aqua/NmapFE

$[juan@PowerBook(ttyp1): NmapFE](837/0,2)-> port -d info DEBUG: Found port in file:///Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE port search failed: Can't open index file for source file:///usr/local/OpenDarwin/darwinports/dports. Have you synced your source indexes?

So DP is finding my first index but still cannot retrieve the info from it, it seems to be having

trouble with two sources being listed in sources.conf and one of them missing the corresponding index. If I comment out the second entry (the one under /usr, the "official" one):

$[juan@PowerBook(ttyp1): NmapFE](838/1,2)-> pwd /usr/local/OpenDarwin/darwinports/dports/aqua/NmapFE

$[juan@PowerBook(ttyp1): NmapFE](839/0,2)-> port -d info DEBUG: Found port in file:///Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE NmapFE 0.85, aqua/NmapFE http://faktory.org/m/software/nmap/

---snip---

Success! DP seems to (rightly so in my opinion) not care where the index is (i.e., its location does

not correspond with the dports/ tree I'm currently in) and display the info if it finds it. The behavior is the same if I switch to my dports/ tree, i.e. the one that corresponds to the only existing index of the two entrie in sources.conf (remember that /usr/local/OpenDarwin/darwinports/dports/PortIndex was temporarily moved out of the way). With the two entries active:

$[juan@PowerBook(ttyp1): NmapFE](846/0,2)-> pwd /Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE

$[juan@PowerBook(ttyp1): NmapFE](847/0,2)-> port -d info DEBUG: Found port in file:///Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE port search failed: Can't open index file for source file:///usr/local/OpenDarwin/darwinports/dports. Have you synced your source indexes?

With only one active (my personal one):

$[juan@PowerBook(ttyp1): NmapFE](848/1,2)-> pwd /Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE

$[juan@PowerBook(ttyp1): NmapFE](849/0,2)-> port -d info DEBUG: Found port in file:///Users/juan/Documents/Computing/DarwinPorts/dports/aqua/NmapFE NmapFE 0.85, aqua/NmapFE http://faktory.org/m/software/nmap/

---snip---

Success again! Maybe there are other combinations through which I could make this fail, but I

guess by now I've illustrated the point. Not too sure if i can call this behavior a glitch, but in my opinion DP should handle an entry(ies) in sources.conf with a missing index if it already found a valid one from which the info can be retrieved (and choke only if it doesn't find any indexes at all).

Am I off base here? Something I'm not getting right? Don't be shy to ask if you wish me to provide

you with some other examples! Regards,...

Juan

Change History (2)

comment:1 Changed 20 years ago by rshaw@…

Status: newassigned

comment:2 Changed 20 years ago by rshaw@…

Resolution: fixed
Status: assignedclosed

Fixed coded and committed. Thanks! -rshaw

Note: See TracTickets for help on using tickets.