Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make extended attribute writing more robust against filesystem limits. #11115

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

eric321
Copy link
Contributor

@eric321 eric321 commented Sep 28, 2024

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Some filesystems limit the size of extended attributes (e.g., 4kB on ext4). The description can easily get close to or exceed this. By writing it last, we avoid missing out on the other ones.

Also catch each write_xattr() failure individually, so we can report which attributes were not written.

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

Copy link
Member

@Grub4K Grub4K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to change it to a list, dicts are ordered

@bashonly bashonly added the enhancement New feature or request label Sep 28, 2024
Some filesystems limit the size of extended attributes (e.g., 4kB on ext4).
The description can easily get close to or exceed this. By writing it last,
we avoid missing out on the other ones.

Also catch each write_xattr() failure individually, so we can report which
attributes were not written.
@eric321
Copy link
Contributor Author

eric321 commented Sep 28, 2024

done

@Grub4K
Copy link
Member

Grub4K commented Sep 28, 2024

Try to avoid force pushing, prs will be squashed on merge, so take as many commits as you want

yt_dlp/postprocessor/xattrpp.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/xattrpp.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/xattrpp.py Outdated Show resolved Hide resolved
yt_dlp/postprocessor/xattrpp.py Outdated Show resolved Hide resolved
@bashonly bashonly self-assigned this Sep 28, 2024
eric321 and others added 4 commits September 28, 2024 21:11
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
@bashonly bashonly merged commit 3a19334 into yt-dlp:master Oct 7, 2024
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants