Opened 13 years ago

Closed 8 years ago

Last modified 8 years ago

#31250 closed defect (worksforme)

Failing to install package due to sqlite insert error

Reported by: anastasiosm@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.0.3
Keywords: Cc: bcpeterson@…, macports.org@…
Port:

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello,

after upgrading my ports from 1.9.x to 2.03 I am unable to install any package, see example below

#port install ascii
--->  Installing ascii @3.8_0
Error: Target org.macports.install returned: sqlite error: no such table: registry.ports (1) while executing query: INSERT INTO registry.ports (name, version, revision, variants, epoch) VALUES (?, ?, ?, ?, ?)
Log for ascii is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_ascii/ascii/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Contents of /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_ascii/ascii/main.log:

version:1
:debug:main Executing org.macports.main (ascii)
:debug:main Skipping completed org.macports.archivefetch (ascii)
:debug:main Skipping completed org.macports.fetch (ascii)
:debug:main Skipping completed org.macports.checksum (ascii)
:debug:main Skipping completed org.macports.extract (ascii)
:debug:main Skipping completed org.macports.patch (ascii)
:debug:main Skipping completed org.macports.configure (ascii)
:debug:main Skipping completed org.macports.build (ascii)
:debug:main Skipping completed org.macports.destroot (ascii)
:debug:install install phase started at Wed Sep 14 01:57:06 EEST 2011
:notice:install --->  Installing ascii @3.8_0
:debug:install Executing org.macports.install (ascii)
:error:install Target org.macports.install returned: sqlite error: no such table: registry.ports (1) while executing query: INSERT INTO registry.ports (name, version, revision, variants, epoch) VALUES (?, ?, ?, ?, ?)
:debug:install Backtrace: sqlite error: no such table: registry.ports (1) while executing query: INSERT INTO registry.ports (name, version, revision, variants, epoch) VALUES (?, ?, ?, ?, ?)
    while executing
"registry::entry create $subport $version $revision $portvariants $epoch"
    invoked from within
"registry::write {

        set regref [registry::entry create $subport $version $revision $portvariants $epoch]

        if {[info exists user_options..."
    (procedure "portinstall::install_main" line 35)
    invoked from within
"$procedure $targetname"
:info:install Warning: the following items did not execute (for ascii): org.macports.activate org.macports.install
:notice:install Log for ascii is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_ascii/ascii/main.log

if you need more info please let me know. thanks in advance

Change History (7)

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

Component: portsbase
Description: modified (diff)
Port: port removed

Please remember to use WikiFormatting.

comment:2 Changed 13 years ago by bcpeterson@…

Cc: bcpeterson@… added

Cc Me!

comment:3 Changed 13 years ago by macports.org@…

Hi there, +1:

$ sudo port -d selfupdate
DEBUG: MacPorts sources location: /opt/local/var/macports/sources/rsync.macports.org/release/base
--->  Updating MacPorts base sources using rsync
receiving file list ... done
[snip]
sent 36 bytes  received 6813 bytes  805.76 bytes/sec
total size is 2966591  speedup is 433.14
MacPorts base version 2.0.3 installed,

Total number of ports parsed:   3 
Ports successfully parsed:      3 
Ports failed:                   0 
Up-to-date ports skipped:       12345

--->  MacPorts base is already the latest version
DEBUG: Setting MacPorts sources ownership to root

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
$ sudo port upgrade outdated
Error: /opt/local/bin/port: port installed failed: sqlite error: no such table: ports (1) while executing query: SELECT id FROM ports WHERE (state='imaged' OR state='installed')

MacOS 10.5.8 just when I decided to rm -rf /sw/ and totally switch from fink to ports because of all the inconsistencies in my install... :-(

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

Cc: macports.org@… added

I don't know why this is happening. Something wrong with your registry. Maybe it can be repaired but I don't know how. A certain fix would be to completely uninstall MacPorts, then reinstall, but of course that's rather inconvenient.

comment:5 in reply to:  4 Changed 13 years ago by macports.org@…

Well, an rm -rf /opt/local allowed me to reinstall macports (because the reinstall without that didn't work). Now it's compiling for hours on...

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

It would probably be helpful to see a dump of the registry.db.

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

Resolution: worksforme
Status: newclosed

We can't reproduce the problem and so we can't so anything without more information.

Version 0, edited 8 years ago by jmroot (Joshua Root) (next)
Note: See TracTickets for help on using tickets.