[Nix-dev] What about causing hard failures when trying to install superseded packages?
Eelco Dolstra
e.dolstra at tudelft.nl
Mon Nov 9 13:37:30 CET 2009
Hi,
Marc Weber wrote:
> Lluís Batlle and I both missed that qemu_kvm replaces kvm* packages for
> quite a while.
>
> So what about causing hard failures when trying to install old packages
> unless you explicitly enable them?
>
>
> deprecatePackage = name : msg: pkg: if ! getConfig ["ignoreDeprecation" name] false && ! getConfig ["ignoreDeprecation" "all"] false
> then throw msg
> else pkg;
>
> deprecatePackage "kvm-88" "use XY instead" { ..
> };
Another possibility: add a meta.replaces attribute that tells nix-env that a
package is an upgrade to a package with another name. For instance, for
qemu-kvm, we would have:
meta.replaces = [ "kvm" ];
IIRC Michael Raskin objected to this on the grounds that somebody might write
meta.replaces = [ "*" ], but that seems a case of Just Don't Do That :-)
--
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/
More information about the nix-dev
mailing list