Opened 21 years ago

Closed 21 years ago

Last modified 20 years ago

#657 closed enhancement (fixed)

Handle different tar options for unpacking

Reported by: neven@… Owned by: kpfleming@…
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 gerard@…, 21 years ago

qa_contact: alfs-discuss@linuxfromscratch.orgalfs-log@linuxfromscratch.org

comment:2 by gerard@…, 21 years ago

Owner: changed from alfs-discuss@… to alfs-log@…
Version: CVS1.1.7

comment:3 by kpfleming@…, 21 years ago

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

comment:4 by neven@…, 21 years ago

Owner: changed from alfs-log@… to kpfleming@…
Priority: lowestnormal

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 kpfleming@…, 21 years ago

dependson: 671

comment:6 by kpfleming@…, 21 years ago

Resolution: fixed
Status: newclosed

enhancements committed to CVS

comment:7 by neven@…, 21 years ago

Version: 1.1.7CVS

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 kpfleming@…, 21 years ago

Resolution: fixed
Status: closedreopened

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 kpfleming@…, 21 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 kpfleming@…, 21 years ago

Resolution: fixed
Status: reopenedclosed

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 neven@…, 21 years ago

Keywords: VERIFIED added

I've created bug 709, so we can close this one.

comment:12 by kpfleming@…, 21 years ago

Keywords: VERIFIED removed

comment:13 by jwrober@…, 21 years ago

Priority: normalhighest

comment:14 by jwrober@…, 20 years ago

Version: CVSSVN
Note: See TracTickets for help on using tickets.