[haikuports-commits] [haikuports/haikuporter] 75e58f: Repository: Reverse logic of stale port removal.

  • From: GitHub <noreply@xxxxxxxxxx>
  • To: haikuports-commits@xxxxxxxxxxxxx
  • Date: Sat, 02 Dec 2017 02:03:46 -0800

  Branch: refs/heads/master
  Home:   https://github.com/haikuports/haikuporter
  Commit: 75e58ffe8e62ef259d5b82cc1fcdb2daf6890869
      
https://github.com/haikuports/haikuporter/commit/75e58ffe8e62ef259d5b82cc1fcdb2daf6890869
  Author: Michael Lotz <mmlr@xxxxxxxx>
  Date:   2017-12-02 (Sat, 02 Dec 2017)

  Changed paths:
    M HaikuPorter/Repository.py

  Log Message:
  -----------
  Repository: Reverse logic of stale port removal.

Only ports with broken recipes had their .DependencyInfo and port
for package mapping removed. This missed various cases of how a port
could otherwise become unavailable, for example by getting deactivated
or by having a newer version becoming active.

Instead of building a list of ports to remove, build a list of active
ports and remove what isn't on it. This results in the same repository
state as a fresh population would result in.

This fixes the case where .DependencyInfos of deactivated ports would
linger on, breaking dependency resolution in non-obvious ways.


  Commit: f978923fcc52ef3db6c2f9cc98627d95dbc26b4b
      
https://github.com/haikuports/haikuporter/commit/f978923fcc52ef3db6c2f9cc98627d95dbc26b4b
  Author: Michael Lotz <mmlr@xxxxxxxx>
  Date:   2017-12-02 (Sat, 02 Dec 2017)

  Changed paths:
    M HaikuPorter/Repository.py

  Log Message:
  -----------
  Repository: Remove superfluous higherVersionIsActive logic.

The goal is to update the repository only with the active versions. As
the version list is sorted from highest to lowest, the first port that
fully runs through is the active one and anything else can be skipped.

The only reason to set higherVersionIsActive and continue the loop was
to remove the dependency infos of the next lower version. This assumed
that old versions would stay in the tree as opposed to being removed
completely. It also only cared for the dependency info and missed the
removal from the port for package mappings.

Since there already is a stale port removal mechanism that takes all
needed steps into account, this duplicate logic can simply be dropped.


  Commit: 77228a8ef846170382935e01ca4e08ebf5719f96
      
https://github.com/haikuports/haikuporter/commit/77228a8ef846170382935e01ca4e08ebf5719f96
  Author: Michael Lotz <mmlr@xxxxxxxx>
  Date:   2017-12-02 (Sat, 02 Dec 2017)

  Changed paths:
    M HaikuPorter/Repository.py

  Log Message:
  -----------
  Repository: Drop/add port for package mappings of updated ports.

Previously the mappings were simply added. This made it possible for
removed sub-packages to remain in the mappings, since stale removal
only works on a per port basis and the port remained active.

Drop the mappings for updated ports by initially not adding updated
ports to the activePorts list when running stale mappings removal. Then
add the fresh mappings.

This also critically moves the removal of stale dependency infos past
the removal of stale port for package mappings. This is needed because
the former uses the latter to determine if dependency infos should
be kept. With the inverse order used before, dependency infos for
removed packages would only be removed in the next repository update.


  Commit: d97f09489da3f19b03422e89a3bf5c320745721a
      
https://github.com/haikuports/haikuporter/commit/d97f09489da3f19b03422e89a3bf5c320745721a
  Author: Michael Lotz <mmlr@xxxxxxxx>
  Date:   2017-12-02 (Sat, 02 Dec 2017)

  Changed paths:
    M HaikuPorter/Repository.py

  Log Message:
  -----------
  Repository: Cleanup: Early continue instead of duplicate check.


Compare: 
https://github.com/haikuports/haikuporter/compare/83a1a7a57294...d97f09489da3

Other related posts:

  • » [haikuports-commits] [haikuports/haikuporter] 75e58f: Repository: Reverse logic of stale port removal. - GitHub