What does deactivate do?

Ryan Schmidt ryandesign at macports.org
Sun Feb 10 14:31:00 PST 2008


On Feb 10, 2008, at 16:25, skip at pobox.com wrote:

> I deactivated the sqlite3 port on my Mac today because of some  
> problems with
> the Python regression test suite.  It deactivated okay.  I was  
> still able to
> import sqlite3 in /opt/local/bin/python2.5 though:
>
>
>     % /opt/local/bin/python2.5
>     Python 2.5.1 (r251:54863, Feb  2 2008, 08:44:29)
>     [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>     Type "help", "copyright", "credits" or "license" for more  
> information.
>>>> import sqlite3
>>>> sqlite3.version
>     '2.3.2'
>>>> sqlite3.version, sqlite3.sqlite_version
>     ('2.3.2', '3.4.0')
>>>> sqlite3.__file__
>     '/opt/local/lib/python2.5/sqlite3/__init__.pyc'
>>>> import _sqlite3
>>>> _sqlite3.__file__
>     '/opt/local/lib/python2.5/site-packages/_sqlite3.so'
>>>>
>     montanaro-dyndns-org:build% otool -L /opt/local/lib/python2.5/ 
> site-packages/_sqlite3.so
>     /opt/local/lib/python2.5/site-packages/_sqlite3.so:
>             /opt/local/lib/libsqlite3.0.dylib (compatibility  
> version 9.0.0, current version 9.6.0)
>             /usr/lib/libSystem.B.dylib (compatibility version  
> 1.0.0, current version 111.0.0)
>     % ls -l /opt/local/lib/libsqlite3*
>     ls: /opt/local/lib/libsqlite3*: No such file or directory
>
> What's up with that?  How can the _sqlite3.so shared library  
> reference it
> when it doesn't exist?

You've shown us that "_sqlite3.so" links with "libsqlite3.0.dylib",  
and that "libsqlite3.0.dylib" does not exist in /opt/local/lib. This  
means that "_sqlite3.so" probably won't be able to make use of the  
functionality provided by "libsqlite3.0.dylib".

To answer the question in the subject line, "deactivate" deactivates  
a port, by removing the hard links from their locations in /opt/ 
local. For example, the hard link /opt/local/lib/libsqlite3.0.dylib  
was removed. Now libsqlite3.0.dylib only exists in /opt/local/var/ 
macports/software/sqlite3/3.5.6_0/opt/local/lib, so that you can  
easily reactivate the port again if you want. If you do not want,  
then you can uninstall the port, which will actually remove the files  
from the disk.



More information about the macports-users mailing list