Merge pull request #162511 from Artturin/add-alias-keep-feature

This commit is contained in:
Artturi 2022-03-25 20:28:37 +02:00 committed by GitHub
commit 4152377b66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -57,7 +57,7 @@ def get_date_lists(
except ValueError:
continue
if my_date is None or my_date > cutoffdate:
if my_date is None or my_date > cutoffdate or "preserve, reason:" in line.lower():
continue
if "=" not in line:

View file

@ -38,9 +38,14 @@ in
# A script to convert old aliases to throws and remove old
# throws can be found in './maintainers/scripts/remove-old-aliases.py'.
# Add 'preserve, reason: reason why' after the date if the alias should not be removed.
# Try to keep them to a minimum.
# valid examples of what to preserve:
# distro aliases such as:
# debian-package-name -> nixos-package-name
mapAliases ({
# forceSystem should not be used directly in Nixpkgs.
# Added 2018-07-16
# Added 2018-07-16 preserve, reason: forceSystem should not be used directly in Nixpkgs.
forceSystem = system: _:
(import self.path { localSystem = { inherit system; }; });