Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#30593 closed defect (fixed)

When a local port indexfile is not found, any searches in the main repo fail

Reported by: deorth@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.1.1
Component: base Version: 1.9.2
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port:

Description

This may be a dupe ticket, apologies if it is but I couldn't see anything obvious in the trac search and I'm not very good at it. :)

If for some reason a portindex is missing from my local repo, I get this behaviour :

$ sudo port install mtr
Warning: port definitions are more than two weeks old, consider using selfupdate
Warning: Can't open index file for source: file:///Users/ahorn/mydev/ahorn/macports
Error: Port mtr not found

$ port search mtr
Warning: port definitions are more than two weeks old, consider using selfupdate
mtr @0.80 (net)
    'traceroute' and 'ping' in a single tool

So, found in a search operation but not an install operation. Presumably because error status from the attempt to open the index file is dictating whether or not ports thinks it can find/install mtr. Possibly bailing at the first portindex failure ? not sure.

Anyway, rebuilding that portindex file and it then works as expected.

$ cd ~ahorn/mydev/ahorn/macports
$ portindex
...
<snip>
...
Total number of ports parsed:	18 
etc...

Then :

$ sudo port install mtr
Warning: port definitions are more than two weeks old, consider using selfupdate
--->  Fetching mtr
--->  Attempting to fetch mtr-0.80.tar.gz from http://distfiles.macports.org/mtr
--->  Verifying checksum(s) for mtr
etc..

Attachments (1)

macports30593.diff (911 bytes) - added by kurthindenburg (Kurt Hindenburg) 13 years ago.
Patch to fix this issue

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Have you already tested whether MacPorts 2.0.1 still has this issue?

comment:2 Changed 13 years ago by deorth@…

Seems to have the identical issue

Changed 13 years ago by kurthindenburg (Kurt Hindenburg)

Attachment: macports30593.diff added

Patch to fix this issue

comment:3 Changed 13 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurt.hindenburg@… added

Cc Me!

comment:4 Changed 13 years ago by kurthindenburg (Kurt Hindenburg)

The patch appears to fix this issue. If the portindex is not found, it tries using mportsearch. I wasn't sure if a warning about re-generating the portindex file should be added.

comment:5 Changed 13 years ago by jmroot (Joshua Root)

Milestone: MacPorts Future

Attached patch doesn't actually fix the real problem.

comment:6 Changed 13 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

comment:7 Changed 13 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.1.1
Note: See TracTickets for help on using tickets.