X-Git-Url: http://git.scottworley.com/pinch/blobdiff_plain/436195f097c503546a7d1d80f4e82964bcdc7392..0ed3a03e957a3159a31338ee445e22cc660846d2:/pinch.py?ds=inline diff --git a/pinch.py b/pinch.py index 2ba47b2..332d130 100644 --- a/pinch.py +++ b/pinch.py @@ -644,7 +644,11 @@ def pinCommand(args: argparse.Namespace) -> None: def updateCommand(args: argparse.Namespace) -> None: v = Verification() exprs: Dict[str, str] = {} - search_paths: List[str] = [] + profile_manifest = os.path.join(args.profile, "manifest.nix") + search_paths: List[str] = [ + "-I", "pinch_profile=" + args.profile, + "-I", "pinch_profile_manifest=" + os.readlink(profile_manifest) + ] if os.path.exists(profile_manifest) else [] config = { section: read_pinned_config_section(section, conf) for section, conf in read_config_files( @@ -674,6 +678,7 @@ def updateCommand(args: argparse.Namespace) -> None: '--file', '', '--install', + '--remove-all', ] + search_paths + ['--from-expression'] + [ exprs[name] % name for name in sorted(exprs.keys())] if args.dry_run: