Changeset 3453 for trunk


Ignore:
Timestamp:
Jun 16, 2007, 4:52:06 PM (18 years ago)
Author:
bird
Message:

Fixed a problem with the tress/ hack. Looks like the I created a reference or something of that kidney...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/sys-apps/portage/pym/portage.py

    r3452 r3453  
    82508250                # clean up any existing portdbapi instances
    82518251                for myroot in trees:
     8252                        # bird: see "/" hack below for details. (todo: learn python, this is ugly)
     8253                        try:
     8254                                trees[myroot]["this-is-a-reference-or-something"]
     8255                                continue
     8256                        except KeyError:
     8257                                myroot
    82528258                        portdb = trees[myroot]["porttree"].dbapi
    82538259                        portdb.close_caches()
    82548260                        portdbapi.portdbapi_instances.remove(portdb)
    82558261                        del trees[myroot]["porttree"], myroot, portdb
     8262                trees = {}      # bird: make sure it's empty or the hack below won't work.
    82568263
    82578264        settings = config(config_root=config_root, target_root=target_root,
     
    82798286                        binarytree, myroot, mysettings["PKGDIR"], settings=mysettings)
    82808287
    8281         # A hack to work around the assumptions that there is always a "/" entry.
    8282         # (bin/emerge uses "/" ...)
     8288        # bird: A hack to work around the assumptions that there is always a
     8289        #       "/" entry. (bin/emerge uses "/" ...)
    82838290        if sys.platform == "os2knix" and settings["ROOT"] != "/":
    82848291                try:
     
    82868293                except KeyError:
    82878294                        trees["/"] = trees[settings["ROOT"]]
     8295                        trees["/"]["this-is-a-reference-or-something"] = 1
    82888296
    82898297        return trees
Note: See TracChangeset for help on using the changeset viewer.