#657 closed enhancement (fixed)
Handle different tar options for unpacking
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | highest | Milestone: | |
| Component: | nALFS - Back End (XML Handlers) | Version: | SVN |
| Severity: | minor | Keywords: | |
| Cc: |
Description
See "nALFS and Busybox" thread, started by Dermot Bradley. Add an option for "unpacking command".
Change History (14)
comment:1 by , 22 years ago
| qa_contact: | alfs-discuss@linuxfromscratch.org → alfs-log@linuxfromscratch.org |
|---|
comment:2 by , 22 years ago
| Owner: | changed from to |
|---|---|
| Version: | CVS → 1.1.7 |
comment:3 by , 22 years ago
comment:4 by , 22 years ago
| Owner: | changed from to |
|---|---|
| Priority: | lowest → normal |
Just check out one of the O_STRING options from src/options.c and use it as an example. .nALFSrc needs updating too.
comment:5 by , 22 years ago
| dependson: | → 671 |
|---|
comment:7 by , 22 years ago
| Version: | 1.1.7 → CVS |
|---|
I suggest some checking of the users' input (options), as playing this much with conversion specifiers (%s) might not be a good idea.
Also, the reason I avoided pipes is because:
unknown_command | tar xv
will return 0.
I don't know if there's a good way to solve that?
But in general, I like it.
comment:8 by , 22 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
I will look at checking the user's command specifications to do a basic sanity check, but obviously there's only so much we can do.
Also, it appears that you are right, using a pipe like that seems to keep an unknown command from generating a proper status code. I will look into alternatives for that one as well.
Otherwise, glad you like it :-)
comment:9 by , 22 years ago
On the subject of the string format specifiers, I can think of two relatively simple solutions:
- go through the user-specified string and prefix all '%' characters that are
not followed by 's' with additional '%', escaping them (also possibly any that occur after the first '%s' combination
- use an alternative string-substitution method (directly coded instead of printf)
Neither of these would be terribly difficult to implement, but I'd hate to set a bad precedent for future nALFS options/etc. that need substitution available.
comment:10 by , 22 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
sanity checking of user-specified strings now in CVS
I don't think there's anything needed at this point to handle the case where the first command of the pipeline is not found; if the user does that, their build will break anyway, so they'll know something was wrong, and the "not found" message will be in their log. Fixing this would require using shell-specific features, as best I can tell.
comment:11 by , 22 years ago
| Keywords: | VERIFIED added |
|---|
I've created bug 709, so we can close this one.
comment:12 by , 22 years ago
| Keywords: | VERIFIED removed |
|---|
comment:13 by , 22 years ago
| Priority: | normal → highest |
|---|
comment:14 by , 21 years ago
| Version: | CVS → SVN |
|---|

Will be factored out into common code, please assign to me.