file: patch to fix misclassification of some zip files#402115
file: patch to fix misclassification of some zip files#402115doronbehar merged 1 commit intoNixOS:masterfrom
Conversation
|
Hmm I wonder if non critical patches like this should be included in Nixpkgs. Is this needed for a specific package in Nixpkgs that depends directly upon self: super: {
file-patched = super.file.overrideAttrs(old: {
patches = old.patches or [] ++ [
(super.fetchpatch {
url = "...";
hash = "...";
})
];
});
}And naturally use |
This is required for
I'm hoping to patch it precisely because releases don't come often. The work arounds I've found for |
|
Here's an overlay you can start using right now: self: super: {
yazi = super.yazi.override {
yazi-unwrapped = super.yazi-unwrapped.override {
file = super.file.overrideAttrs(old: {
patches = old.patches or [] ++ [
(super.fetchpatch {
url = "...";
hash = "...";
})
];
});
};
};
}Untested, but should work. TBH Now that I read that upstream comment (sxyazi/yazi#2536 (comment)) mentioning Arch Linux has included this patch, I consider maybe we should merge this PR never the less. Also, trying to weight this myself, the bug report seems pretty severe, although it is classified as a 'minor' bug. Maybe @txkyel you could nudge upstream to release a new version? By writing a comment in that issue. |
|
On a 2nd thought, I see that upstream has fixed that issue a long time ago, and hasn't released a new version, so I doubt whether such a comment will push him to actually make a release. Let's merge this in the meantime. |
|
Uhm, I think this should've gone into |
|
Sorry, I should have looked more into what the tags meant. Is there a way
for us to roll this back to fix this?
…On Sun, Apr 27, 2025, 11:18 Tom van Dijk ***@***.***> wrote:
*dtomvan* left a comment (NixOS/nixpkgs#402115)
<#402115 (comment)>
Uhm, I think this should've gone into staging... this rebuilds almost 75K
packages
<https://github.com/NixOS/nixpkgs/actions/runs/14684645174/attempts/1#summary-41211825108>
—
Reply to this email directly, view it on GitHub
<#402115 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANMLBXDBI2L2H2SOZYA3CVT23TYN5AVCNFSM6AAAAAB35XVB76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMZTGUYDQNBZGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I'm so sorry! A fix is coming ASAP. GitHub's servers are barely
responding for me now, so I hope this message will reach you...
…On Sun, Apr 27, 2025 at 08:18:54AM -0700, Tom van Dijk wrote:
dtomvan left a comment (NixOS/nixpkgs#402115)
Uhm, I think this should've gone into `staging`... [this rebuilds almost 75K packages](https://github.com/NixOS/nixpkgs/actions/runs/14684645174/attempts/1#summary-41211825108)
--
Reply to this email directly or view it on GitHub:
#402115 (comment)
You are receiving this because you modified the open/close state.
Message ID: ***@***.***>
|
|
A correct PR: BTW, the following Bash script excerpt was written by a LLM for me, and it helps me avoid creating PRs targeting the wrong branches. It works by inferring the nixpkgs branch from which the commits of the 'feature branch' descended: feature_branch="$(git rev-parse --abbrev-ref HEAD)"
# Arbitrarily large number
_best_distance=999999999
# Check a list of possible parent branches
for parent in \
$(git br | grep release | sort | head -1) \
$(git br | grep staging | sort | head -1) \
$(git br | grep staging-next | sort | head -1) \
staging-next \
staging \
master; do
if git show-ref --verify --quiet "refs/heads/$parent"; then
ancestor=$(git merge-base "$feature_branch" "$parent")
distance=$(git rev-list --count "$ancestor..$feature_branch")
if [ "$distance" -lt "$_best_distance" ]; then
_best_distance=$distance
best_parent=$parent
fi
fi
done
if [ -n "$best_parent" ] && [ "$_best_distance" -lt 1000 ]; then
echo "Best guess for parent branch: $best_parent"
else
# TODO: Maybe don't exit if --base was used in "$@"?
echo "No suitable parent branch found."
exit 2
fiI use it with: To make sure I use the right base. |
|
@doronbehar thank you for addressing it quickly. Everybody makes mistakes, but I'm afraid all calls to |
Apply upstream patch to fix misclassification of some zip archives as data.
Upstream commit for fix: file/file@60b2032.
Upstream bug report: https://bugs.astron.com/view.php?id=571.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.