Summary: | app-arch/par2cmdline v0.4: wildcard expansion fix | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bardur Arantsson <bugs-gentoo.org> |
Component: | New packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | deric.venra.xbox, flash3001 |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=479712 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
par2cmdline-0.4-wildcard-fix.patch
par2cmdline-0.4-r1.ebuild par2cmdline-0.4-wildcard-fix-2.patch shell expanded wildcard patch for par2cmdline Updated the original patch |
Description
Bardur Arantsson
2004-05-23 05:50:26 UTC
Created attachment 31883 [details, diff]
par2cmdline-0.4-wildcard-fix.patch
Created attachment 31884 [details]
par2cmdline-0.4-r1.ebuild
Bardur: could you please email the upstream author about your patch? I'm not certain what the correct behavior should be. My gut feeling is that it should throw an error or warning rather than siliently work around it. Well, the was a similar bug in the Win32 version which is detailed here: http://sourceforge.net/tracker/index.php?func=detail&aid=892377&group_id=30568&atid=399698 See also this bug report (which is mine): https://sourceforge.net/tracker/index.php?func=detail&aid=958902&group_id=30568&atid=399698 In the last comment on the Win32-related bug (which was filed against 0.3), the developer suggests that he will change the behavior such that it will ignore directories specified on the command line. I haven't checked to see if he has actually changed this yet (and if so, whether it is _silently_ ignored or not). The trouble with the current behavior is that there is no workaround. This makes it impossible to add more files than can fit on a command-line. With 'find' and 'xargs' it is possible to add a number of files up to the command line length limit, but IIRC xargs cannot be told to die if it needs to use more than 1 command line; so in this case you get even more dangerous silent errors because some *files* will just be missing from the .par2 'archive'. Another annoying problem is that it is impossible to use wildcards like '*' in directories which contain subdirectories. Btw, I don't think silently ignoring specials/directories is as dangerous as you might think, since the par2 executable explicitly shows each file added to the 'archive'. There is also the fact that adding anything but regular files to archives doesn't make sense, and since the wildcards were never recursive to begin with I felt that silently ignoring directories/specials would be fine. But in any case, I've added code which emits warnings whenever a directory/special is omitted and uploaded the new patch. Created attachment 31931 [details, diff]
par2cmdline-0.4-wildcard-fix-2.patch
fixed in cvs, thanks Created attachment 84110 [details, diff]
shell expanded wildcard patch for par2cmdline
This is Still a bug... I just figured out what's missing my self, and this is my shot at the patch...
the par2cmdline-0.4-r1.ebuild is the one I'm currently using...
This patch fixes the case of the wildcards being expanded by the shell, instead of par2. The previous patches seem to work inside of par2 if you manage to pass it * instead of \* or '*'. (Which is the best I could do when trying to pass par2 all it's arguments inside of a single argument to a shellscript.)
Created attachment 354700 [details, diff]
Updated the original patch
Original patch only works when creating par2 files, have corrected this for all par2 functions(repair,verify,create).
As a side note i see that Bardur's patch has been dropped from 0.4-r2 which will surface again if par2 command is given a none expanded wildcard(*) to validate files/dirs. Can this be re-added? |