Opened 15 years ago
Closed 15 years ago
#20874 closed defect (fixed)
interactive mode falsely reports PortIndex incompatible or corrupt
Reported by: | senz@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.9.0 |
Component: | base | Version: | 1.8.0 |
Keywords: | Cc: | harry.weppner@…, jleedev@…, edward@… | |
Port: |
Description
Just after update of macports base (<...> means repetition of last line):
MacPorts 1.8.0 Entering interactive mode... ("help" for help, "quit" to quit) [Users/] > selfupdate ---> Updating the ports tree ---> Updating MacPorts base sources using rsync MacPorts base version 1.8.0 installed, MacPorts base version 1.8.0 downloaded. ---> MacPorts base is already the latest version The ports tree has been updated. To upgrade your installed ports, you should run port upgrade outdated [Users/] > outdated Warning: bash-completion has no version field Warning: It looks like your PortIndex file may be corrupt. Warning: bsdsfv has no version field Warning: clamav has no version field Warning: It looks like your PortIndex file may be corrupt. <...> Warning: e2fsprogs has no version field Warning: It looks like your PortIndex file may be corrupt. Warning: gcc_select has no version field Warning: It looks like your PortIndex file may be corrupt. <..> The following installed ports are outdated: libsigcxx2 2.2.4_0 < 2.2.4.1_0 Warning: It looks like your PortIndex file may be corrupt. <...> Warning: pinentry has no version field Warning: py25-bz2 has no version field Warning: py25-hashlib has no version field Warning: py25-zlib has no version field Warning: It looks like your PortIndex file may be corrupt. <...>
Attachments (1)
Change History (13)
comment:1 Changed 15 years ago by jmroot (Joshua Root)
comment:3 follow-up: 4 Changed 15 years ago by tobypeterson
Depends on what your sources.conf file is pointing to. If it's a svn checkout, run svn up and eliminate any conflicts. If it's just a local directory you made yourself, run 'portindex'
comment:4 Changed 15 years ago by senz@…
Replying to toby@…:
Depends on what your sources.conf file is pointing to. If it's a svn checkout, run svn up and eliminate any conflicts. If it's just a local directory you made yourself, run 'portindex'
I have a default sources.conf:
rsync://rsync.macports.org/release/ports/ [default]
comment:5 follow-up: 6 Changed 15 years ago by blb@…
If that's the only one, then selfupdate should update it. I note you were in interactive mode, maybe try using 'sudo port selfupdate' outside of interactive mode first, in case that is the issue (interactive mode is not very well tested).
comment:6 Changed 15 years ago by senz@…
Replying to blb@…:
If that's the only one, then selfupdate should update it. I note you were in interactive mode, maybe try using 'sudo port selfupdate' outside of interactive mode first, in case that is the issue (interactive mode is not very well tested).
Thank you. You were right, that was interactive's mode strange behavior. I think this is still considerable as a bug.
comment:7 Changed 15 years ago by nerdling (Jeremy Lavergne)
Summary: | PortIndex incompatible or corrupt → interactive mode falsely reports PortIndex incompatible or corrupt |
---|
comment:10 Changed 15 years ago by edward@…
I might have discovered the source of this problem, and would like a second set of eyes to verify my diving down the correct rabbit hole.
The problem lies not with PortIndex being corrupt, but with the internal cache of PortIndex.quick becoming stale. When macport1.0 layer of MacPorts is initialized, among other things it calls _mports_load_quickindex, which eagerly loads each source's PortIndex.quick into a global array.
When we run mportsync, it is possible that PortIndex for a source will get updated, in which case the data we cached from PortIndex.quick at launch time is likely no longer valid. The problem is that we never refresh this cached version from PortIndex.quick, so we are seeking to arbitrary places in PortIndex; when we seek to the middle of a index entry (which we are bound to do repeatedly) parsing will fail resulting in the litany of exceptions see above.
I will be attaching a patch shortly to this ticket which resolves this issue on my end. I have not tested it against multiple sources, and would not mind someone doing so. Other thoughts and comments are also welcome.
comment:12 Changed 15 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.9.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Since everyone would be having this problem if the index generated by the server was bad, I'd assume you have a local source whose index you need to regenerate.