Skip to content
Permalink
Browse files

As a temporary fix, only remove dep links when the last version is un…

…installed.

Bug:            https://trac.macports.org/ticket/4700
Submitted by:
Reviewed by:
Approved by:
Obtained from:

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@14725 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
pguyot committed Oct 20, 2005
1 parent c275a89 commit d4de2000e6d22b81c6deecd576703bffe4ee02b3
Showing with 16 additions and 3 deletions.
  1. +16 −3 src/registry1.0/portuninstall.tcl
@@ -1,6 +1,6 @@
# et:ts=4
# portuninstall.tcl
# $Id: portuninstall.tcl,v 1.12 2005/09/19 20:51:48 jberry Exp $
# $Id: portuninstall.tcl,v 1.13 2005/10/20 16:15:38 pguyot Exp $
#
# Copyright (c) 2002 - 2003 Apple Computer, Inc.
# All rights reserved.
@@ -64,6 +64,14 @@ proc uninstall {portname {v ""} optionslist} {
set variants [lindex [lindex $ilist 0] 3]
}

# determine if it's the only installed port with that name or not.
if {$v == ""} {
set nb_versions_installed 1
} else {
set ilist [registry::installed $portname ""]
set nb_versions_installed [llength $ilist]
}

set ref [registry::open_entry $portname $version $revision $variants]

# If global forcing is on, make it the same as a local force flag.
@@ -122,8 +130,13 @@ proc uninstall {portname {v ""} optionslist} {
}
}

# Remove the port from the deps_map
registry::unregister_dependencies $portname
# Remove the port from the deps_map if only one version was installed.
# This is a temporary fix for a deeper problem that is that the dependency
# map doesn't take the port version into account (but should).
# Fixing it means transitionning to a new dependency map format.
if {$nb_versions_installed == 1} {
registry::unregister_dependencies $portname
}

# Now look for a contents list
set contents [registry::property_retrieve $ref contents]

0 comments on commit d4de200

Please sign in to comment.
You can’t perform that action at this time.