-
Notifications
You must be signed in to change notification settings - Fork 359
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
brp-remove-la-files: Remove symlinks, too #3311
Conversation
A test? You don't need to create a project with .la files in it and spec and all, just write a bunch of files to a directory and run the script on that. I'd place the invocations in a for loop over the file type - otherwise it takes some squinting to see that it's all identical except for l/f passed to -type. |
As we check for file contents delete symlink before looking at regular files. Resolves: rpm-software-management#3304
Loop and test case added. |
what if just
|
That's pretty much how this script started its life as, but it was discovered to remove non-libtool files too, see 432a911 Unfortunately we didn't demand test-cases for that stuff back then. |
I mean can throw loop away:
this is the same as current loop, but better to read. please note that |
Yes, but does it process all links before all regular files? |
I guess no, it probably means (file or link), all the two types are listed together. |
Yup, this is why there is a loop. Otherwise we'd encounter dangling symlinks that won't get deleted. |
As we check for file contents delete symlink before looking at regular files.
Resolves: #3304