Opened 12 years ago

Closed 12 years ago

#37448 closed defect (fixed)

py-dateutil: __init__.cpython-32.pyc already exists and does not belong to a registered port

Reported by: mkae (Marko Käning) Owned by: dh@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: skymoo (Adam Mercer)
Port: py-dateutil

Description

Error: org.macports.activate for port py32-dateutil returned: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/dateutil/__pycache__/__init__.cpython-32.pyc already exists and does not belong to a registered port.  Unable to activate port py32-dateutil. Use 'port -f activate py32-dateutil' to force the activation.
DEBUG: Error code: registry::image-error
DEBUG: Backtrace: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/dateutil/__pycache__/__init__.cpython-32.pyc already exists and does not belong to a registered port.  Unable to activate port py32-dateutil. Use 'port -f activate py32-dateutil' to force the activation.
    invoked from within
"throw registry::image-error "Image error: $file already exists and does not belong to a registered port.  Unable to activate port [$port name]. Use 'p..."
    ("foreach" body line 47)
    invoked from within
"foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be able to install links, we test if we can lst..."
    invoked from within
"registry::write {
            foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be able to instal..."
    invoked from within
"try {
        registry::write {
            foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be ..."
    (procedure "_activate_contents" line 21)
    invoked from within
"_activate_contents $requested"
    (procedure "portimage::activate" line 57)
    invoked from within
"registry_activate $subport $version $revision $portvariants [array get user_options]"
    (procedure "portactivate::activate_main" line 4)
    invoked from within
"$procedure $targetname"
Error: Failed to install py32-dateutil
DEBUG: Image error: /opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/dateutil/__pycache__/__init__.cpython-32.pyc already exists and does not belong to a registered port.  Unable to activate port py32-dateutil. Use 'port -f activate py32-dateutil' to force the activation.
    invoked from within
"throw registry::image-error "Image error: $file already exists and does not belong to a registered port.  Unable to activate port [$port name]. Use 'p..."
    ("foreach" body line 47)
    invoked from within
"foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be able to install links, we test if we can lst..."
    invoked from within
"registry::write {
            foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be able to instal..."
    invoked from within
"try {
        registry::write {
            foreach file $imagefiles {
                set srcfile "${extracted_dir}${file}"

                # To be ..."
    (procedure "_activate_contents" line 21)
    invoked from within
"_activate_contents $requested"
    (procedure "portimage::activate" line 57)

https://build.macports.org/builders/buildports-lion-x86_64/builds/6796 https://build.macports.org/builders/buildports-mtln-x86_64/builds/624 https://build.macports.org/builders/buildports-snowleopard-x86_64/builds/13308

Change History (4)

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

Summary: py-dateutil fails on all 3 buildbotspy-dateutil: __init__.cpython-32.pyc already exists and does not belong to a registered port

comment:2 Changed 12 years ago by skymoo (Adam Mercer)

Probably something like:

subport py32-numpy {
    pre-activate {
        set regref [registry_open $subport $version $revision $portvariants ""]
        foreach f [registry_prop_retr $regref imagefiles] {
            if {[file extension $f] == ".pyc" && [file exists $f] && [registry_file_registered $f] == "0"} {
                file delete -force $f
            }
        }
    }
}

That is used in py-numpy is required...

comment:4 Changed 12 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.