-
Notifications
You must be signed in to change notification settings - Fork 4
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
u7z fails to parse a particular archive #2707
Comments
|
Confirmed,
Patch attached. |
|
@and, in the future, please submit whitespace only patches as separate commits. If you change the whitespace in the same commit, then it's not immediately clear from the diff whether the additional changes also concern the logic, or it's only whitespace, unless special options are used (ignore whitespace or word diff). This makes reviewing the history much more tedious than otherwise. |
I have just created a 4.8.17 milestone. I suggest to use this for all tickets with fresh patches to be reviewed.
We need to make a 4.8.16 at some point this month, so just assigning all newly processed tickets to 4.8.16 is not helpful, as we need to stop at some point. But if they are left for future releases, then one would need to go through them again and see which ones already have good patches on review. Assigning them to 4.8.17 sounds like a good solution to me. |
|
|
|
Branch: 2707_extfs_u7z |
Please hold on the merge for one day, ok? I'll have a quick look into the testability of this today. |
No worries, it has been waiting for 5 years already, so I have absolutely no problems with waiting a couple of days more. |
There's another problem in the archive @birdie posted: the size field is missing for some files.
Don't worry: you won't have to wait 5 more years to commit this. I've already prepared tests (I'll start a new ticket shortly) so you can commit this outright. |
|
|
Could you please give me an example of sed that has problems with \s ? Did you mean macOS?
I'm not sure that replacing \s with is the best approach, because \s at very least also includes tab, but maybe in this case it doesn't matter and if the input has some other whitespace we have a problem anyways. |
I can imagine 7z archives which lack both compressed _and_ uncompressed sizes simultaneously. Please consider this. |
Replying to zaytsev-work:
Now, speaking of portability:
There was something that bothered me and I now verified it: the | (bar) I used in \($date_re\|$empty_date_re\) isn't portable either. sed is supposed to support "basic regular expressions" and | is of "extended regular expressions". So it's my mistake.
I'll soon re-upload patch #2 (after I get more info from @birdie). |
Replying to birdie:
(I'm asking this because sed is a bit limited, as you see, and I don't want to bloat the recipe needlessly.) |
|
Replying to mooffie:
See listing2.txt - its last file has no sizes at all. |
|
|
Ok, I updated patch 0002 (so I had to update 0003 too). Remember to commit them in order: 0001, 0002, 0003, 0004.
What's new in patch 0002?
Don't worry about tricky bugs: the tests at #3744 were updated. 'u7z.missing-size-and-date.input' tests all the possibilities that patch 0002 needs to handle.
(As for counting 19 spaces in patch 0003: I felt ' *' would be too loose. Whatever. Let's not be fussy about this.) |
So, the answer is, because it's not a valid 7z archive, but rather 7z is used to explore other ~archive files that it supports, like NSIS installer packages in this case. But okay, fair enough.
Alright, I was just saying that it's not an equivalent replacement, but you have a valid point.
Oh joys of test driven development ;-) I've just pushed out the new patches and Travis build was successful. Unless Andrew has anything to say against it, I'll try to merge it tomorrow.
Thank you mooffie for your help! |
Replying to zaytsev:
No, I haven't. Everything is fine. |
|
|
Important
This issue was migrated from Trac:
birdie
(aros@….com)Subject.
Note
Original attachments:
birdie
(aros@….com) onDec 27, 2011 at 13:26 UTC
and
onMar 5, 2016 at 19:10 UTC
mooffie
(@mooffie) onDec 19, 2016 at 1:21 UTC
mooffie
(@mooffie) onDec 19, 2016 at 1:22 UTC
birdie
(aros@….com) onDec 19, 2016 at 16:44 UTC
mooffie
(@mooffie) onDec 20, 2016 at 0:28 UTC
mooffie
(@mooffie) onDec 20, 2016 at 0:29 UTC
The text was updated successfully, but these errors were encountered: