[MacPorts] #30311: After selfupdate to ports 2.0.0 I can no longer uninstall (unused) ports
MacPorts
noreply at macports.org
Tue Jul 26 11:07:50 PDT 2011
#30311: After selfupdate to ports 2.0.0 I can no longer uninstall (unused) ports
---------------------------+------------------------------------------------
Reporter: soehn@… | Owner: macports-tickets@…
Type: defect | Status: reopened
Priority: Normal | Milestone:
Component: base | Version: 2.0.0
Resolution: | Keywords:
Port: |
---------------------------+------------------------------------------------
Comment(by soehn@…):
Replying to [comment:11 cristiano.fontana@…]:
> I have the very same problem, but not with just a port. With all the
ports that I tried to uninstall.
> {{{
> DEBUG: Changing to port directory:
/opt/local/var/macports/registry/portfiles/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml
> DEBUG: OS darwin/10.8.0 (Mac OS X 10.6) arch i386
> DEBUG: org.macports.load registered provides 'load', a pre-existing
procedure. Target override will not be provided
> DEBUG: org.macports.unload registered provides 'unload', a pre-existing
procedure. Target override will not be provided
> DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-
existing procedure. Target override will not be provided
> DEBUG: universal_variant is false, so not adding the default universal
variant
> DEBUG: Executing variant roofit provides roofit
> DEBUG: Executing variant opengl provides opengl
> DEBUG: Executing variant ssl provides ssl
> DEBUG: Executing variant builtin_ftgl provides builtin_ftgl
> DEBUG: Executing variant xml provides xml
> DEBUG: Starting logging for root
> DEBUG: Executing org.macports.main (root)
> DEBUG: uninstall phase started at Tue Jul 26 18:25:56 CEST 2011
> DEBUG: Executing org.macports.uninstall (root)
> ---> Uninstalling root @5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml
> Error: Target org.macports.uninstall returned: error deleting
"/opt/local/var/macports/software/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml":
directory not empty
> DEBUG: Backtrace: error deleting
"/opt/local/var/macports/software/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml":
directory not empty
> while executing
> "file delete $imagefile"
> (procedure "registry_uninstall::uninstall" line 161)
> invoked from within
> "registry_uninstall $subport $version $revision $portvariants [array get
user_options]"
> (procedure "portuninstall::uninstall_main" line 3)
> invoked from within
> "$procedure $targetname"
> Warning: the following items did not execute (for root):
org.macports.uninstall
> Log for root is at:
/opt/local/var/macports/logs/_opt_local_var_macports_registry_portfiles_root_5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml/root/main.log
> DEBUG: error deleting
"/opt/local/var/macports/software/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml":
directory not empty
> while executing
> "file delete $imagefile"
> (procedure "registry_uninstall::uninstall" line 161)
> Warning: Failed to execute portfile from registry for root
@5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml
> ---> Uninstalling root @5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml
> DEBUG: error deleting
"/opt/local/var/macports/software/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml":
directory not empty
> while executing
> "file delete $imagefile"
> (procedure "uninstall" line 161)
> invoked from within
> "uninstall $portname $version $revision $variants $optionslist"
> (procedure "registry_uninstall::uninstall_composite" line 5)
> invoked from within
> "registry_uninstall::uninstall_composite $portname $composite_version
[array get options]"
> Error: port uninstall failed: error deleting
"/opt/local/var/macports/software/root/5.26.00b_7+builtin_ftgl+opengl+roofit+ssl+xml":
directory not empty
>
> }}}
The problem is with all ports for me, too.
Did you notice an error message when doing the selfupdate to 2.0.0?
The problem I am facing is, the selfupdate should have turned all
directories in /opt/var/macports/software/PORTNAME/ into archives, but it
didn't. The reason is that sometimes in the past some ports have been
uninstalled, but not deleted from the registry (they are marked as
installed, but not active there). When trying to archive these, the
selfupdate-script stops with an error. I found out so far, that after
archiving the folders should be deleted. This happens obviously after all
archives have been created.
So in my case, there are still folders like "2.3.0_1" with content in
them. When you try to uninstall a port, the script tries to remove these
folders, even though they should not be there. But it does try this with
the -r option. So the folders with content cannot be deleted.
I am now trying to add the directories as described above for the qca-port
example. Always add a dummyfile, so tar will get some food.
To get rid of all the dummies after selfupdate is successfully completed,
simply run:
{{{
port -u uninstall
}}}
should work. At least I hope so. Just added
/opt/local/var/macports/software/zlib/1.2.3_4 and are running the
selfupdate again. Will report soon.
--
Ticket URL: <https://trac.macports.org/ticket/30311#comment:12>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list