Opened 18 years ago

Closed 18 years ago

#6085 closed defect (worksforme)

port 1.200 doesn't like unterminated lines

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 1.0
Keywords: Cc: markd@…
Port:

Description

I have not investigated carefully, but port 1.200 (all recent CVS versions I've tried since mid-October) doesn't seem to like receipt files whose last line is not newline-terminated. Specifically this occurred with the receipt files for gnome-vfs 2.12.1.1_0 and 2.12.2_0 (the dports revision numbers are probably pretty meaningless as the maintainer regularly commits without bumping them). I have not checked any other receipt files, so maybe that's the normal format. If that is abnormal, I do not know how they got corrupt. I've been having problems with GNOME-related installs (because GNOME sucks, not really DarwinPorts problems).

In any case, by editing those two receipt files and adding terminating newlines, the following error was resolved.

Quoting from Bug #5986:

No such luck. It seems that (a) the install corrupted the registry, so I can no longer do _any_ operations (such as installed and upgrade) that require checking the installed version,

papa% port -d installed gnome-vfs DEBUG: list must have an even number of elements

while executing

"array set receipt_$ref $receipt_contents"

(procedure "receipt_flat::open_entry" line 85) invoked from within

"${darwinports::registry.format}::open_entry $name $version $revision $variants"

(procedure "open_entry" line 4) invoked from within

"open_entry $iname $iversion $irevision $ivariants"

(procedure "registry::installed" line 13) invoked from within

"registry::installed $portname $composite_version" Error: /opt/local/bin/port: port installed failed: list must have an even number of elements

Material related to other bug omitted ?

I got port to recognize gnome-vfs by editing the receipt files and adding a trailing newline. However, it was unable to uninstall either 2.12.2_0+darwin_7 or 2.11.1.1_0, although it could deactivate them. This left me wedged again, as now it thought that both were installed, and it would not activate either nor would it upgrade or install 2.12.2_0, getting this error:

Error: Target com.apple.install returned: Registry error: gnome-vfs 2.12.2_0+darwin_7 already registered as installed. Please uninstall it first. Error: Status 1 encountered during processing.

OK, we don't respond to kindness, let's try nuclear weapons. I'm just going to remove everything under /opt/local/var/db that looks like it belongs to gnome-vfs.

[[ Things seemed to be OK having removed all of gnome-vfs that I could find and reinstalling with "port install gnome-vfs" as an ordinary user.]]

Attachments (1)

receipt.bz2 (5.8 KB) - added by yaseppochi (Stephen J. Turnbull) 18 years ago.
receipt file believed similar to the "bad" ones described in the report, except this one has trailing newline.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 18 years ago by blb@…

Did you happen to hang on to any of the bad receipt files so that you could attach one here (would be / opt/local/var/db/dports/receipts/gnome-vfs/<version>/receipt.bz2)?

Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

Attachment: receipt.bz2 added

receipt file believed similar to the "bad" ones described in the report, except this one has trailing newline.

comment:2 Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

(In reply to comment #1)

Did you happen to hang on to any of the bad receipt files so that you could

attach one here (would be /

opt/local/var/db/dports/receipts/gnome-vfs/<version>/receipt.bz2)?

No. I forgot to preserve them when I blew away the gnome-vfs stuff.

However, I've looked at the one I presently have, and it's syntacticly identical to the bad ones, except for the terminating newline, according to Emacs's Tcl mode. The content is the same except for version- and variant-related information, both of the bad ones had "active 0" where this one has "active 1", and I have no way to check the "content" member. This is by memory, which is of course fallible, but pretty good.

File attached.

comment:3 Changed 18 years ago by markd@…

Cc: markd@… added

If there isn't a way to duplicate this error, are there any objections to closing this bug?

comment:4 Changed 18 years ago by yaseppochi (Stephen J. Turnbull)

(In reply to comment #4)

If there isn't a way to duplicate this error, are there any objections to closing this bug?

No, although there is no evidence that anybody has tried to duplicate it by removing the trailing newline.

comment:5 Changed 18 years ago by markd@…

Resolution: worksforme
Status: newclosed

I understand. But it doesn't look like anyhone has time and/or interest to try to force it. So it just seems like nothing is going to happen on this until it happens again, and it may be awhile or never with all the changes between then and now. If anyone duplicates it by design or accident this can be reopened.

Note: See TracTickets for help on using tickets.