summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b11f21b)
* The channels present should be deterministic -- exactly those
specified in the pins file. The history of which other channels have
been installed should not affect this.
* Before this change, when a channel changes names only slightly, the
old channel could block installation of the new channel.
+### Changed
+- Don't leave old channels laying around
'--file',
'<nix/unpack-channel.nix>',
'--install',
'--file',
'<nix/unpack-channel.nix>',
'--install',
] + search_paths + ['--from-expression'] + [
exprs[name] % name for name in sorted(exprs.keys())]
if args.dry_run:
] + search_paths + ['--from-expression'] + [
exprs[name] % name for name in sorted(exprs.keys())]
if args.dry_run:
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "bar"; src = builtins.storePath "\2"; \}'\'' '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
actual_env_command=`python3 ./pinch.py update --dry-run --profile /path/to/profile "$conf"`
actual_env_command=`python3 ./pinch.py update --dry-run --profile /path/to/profile "$conf"`
-expected_env_command_RE='^nix-env --profile /path/to/profile --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /path/to/profile --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\1.tar.xz) --from-expression '\''f: f \{ name = "\1"; channelName = "foo"; src = builtins.storePath "\2"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
actual_env_command=`python3 ./pinch.py update --dry-run "$conf"`
-expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install -I pinch_tarball_for_link=('"$NIX_STORE_DIR"'/.{32}-link.tar.gz) -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "link"; channelName = "bar"; src = builtins.storePath "\1"; \}'\'' '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
+expected_env_command_RE='^nix-env --profile /nix/var/nix/profiles/per-user/[^/]+/channels --show-trace --file '\''<nix/unpack-channel.nix>'\'' --install --remove-all -I pinch_tarball_for_link=('"$NIX_STORE_DIR"'/.{32}-link.tar.gz) -I pinch_tarball_for_(repo-[0-9]{10}-[0-9a-f]{11})=('"$NIX_STORE_DIR"'/.{32}-\2.tar.xz) --from-expression '\''f: f \{ name = "link"; channelName = "bar"; src = builtins.storePath "\1"; \}'\'' '\''f: f \{ name = "\2"; channelName = "foo"; src = builtins.storePath "\3"; \}'\''$'
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS
if echo "$actual_env_command" | egrep "$expected_env_command_RE" > /dev/null;then
echo PASS