mirror of
https://github.com/ryantm/nixpkgs-update.git
synced 2024-12-17 08:21:44 +03:00
fix issue with building gnome packages where package name and attr name differ; block all perl packages too
see PR nixos/nixpkgs/#37317 for example of perl failure
This commit is contained in:
parent
fb9fc54a76
commit
56e52cd7bd
16
up.sh
16
up.sh
@ -34,12 +34,6 @@ case "$PACKAGE_NAME" in
|
||||
*) true;;
|
||||
esac || error_exit "Package on blacklist."
|
||||
|
||||
# Temporarily blacklist gnome sources while a major coordinated update is being made
|
||||
if nix eval -f . "pkgs.${PACKAGE_NAME}.src.urls" | grep "gnome"
|
||||
then
|
||||
error_exit "Packages from gnome are currently blacklisted."
|
||||
fi
|
||||
|
||||
if git branch --remote | grep "origin/auto-update/${PACKAGE_NAME}"
|
||||
then
|
||||
error_exit "Update branch already on origin."
|
||||
@ -52,6 +46,12 @@ git reset --hard upstream/master
|
||||
# This is extremely slow but will give us better results
|
||||
ATTR_PATH=$(nix-env -qa "$PACKAGE_NAME-$OLD_VERSION" -f . --attr-path | head -n1 | cut -d' ' -f1) || error_exit "nix-env -q failed to find package name with old version"
|
||||
|
||||
# Temporarily blacklist gnome sources for lockstep update
|
||||
if nix eval -f . "pkgs.${ATTR_PATH}.src.urls" | grep "gnome"
|
||||
then
|
||||
error_exit "Packages from gnome are currently blacklisted."
|
||||
fi
|
||||
|
||||
DERIVATION_FILE=$(EDITOR="echo" nix edit "$ATTR_PATH" -f .) || error_exit "Couldn't find derivation file."
|
||||
|
||||
function error_cleanup {
|
||||
@ -82,6 +82,10 @@ if grep -q "bundlerEnv" "$DERIVATION_FILE"
|
||||
then
|
||||
error_exit "Derivation contains bundlerEnv."
|
||||
fi
|
||||
if grep -q "buildPerlPackage" "$DERIVATION_FILE"
|
||||
then
|
||||
error_exit "Derivation contains buildPerlPackage."
|
||||
fi
|
||||
|
||||
# Make sure it hasn't been updated on master
|
||||
grep "$OLD_VERSION" "$DERIVATION_FILE" || error_exit "Old version not present in master derivation file."
|
||||
|
Loading…
Reference in New Issue
Block a user