#!/usr/bin/python # For each given packageprefix, remove the files in the tree that it would # collide with. This is useful if you're replacing a large port incrementally # with smaller ones, or if you need to remove a port that's accidentally # installed straight into the tree rather than the packageprefix. from garstowlib.config import * from garstowlib.packages import * from garstowlib.utils import * import os, sys, stat, re, fnmatch if __name__ == "__main__": if len(sys.argv) < 3: die("Usage: force-deconflict packagedir package [allow-removal-from-package ...]") packagedir = sys.argv[1] package = sys.argv[2] allow = sys.argv[3:] if packagedir.endswith("/"): packagedir = packagedir[:-1] if not packagedir.startswith(get_packages_dir()): die(packagedir + " is not a package dir") remove_stow_conflicts(packagedir, package, allow)