Bug 27688 - jar tool does not honour files argument when listing
Summary: jar tool does not honour files argument when listing
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: cp-tools (show other bugs)
Version: 0.92
: P3 minor
Target Milestone: 0.92
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-20 10:24 UTC by Paul Jenner
Modified: 2006-05-22 01:22 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-05-22 01:02:09


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Jenner 2006-05-20 10:24:00 UTC
New jar tool does not appear to honour files argument when listing (-t <archive> <files>), only when extracting (-x <archive> <files>).

"gnu.classpath.tools.jar.Main -xvf <archive> <files>" extracts just <files> but "gnu.classpath.tools.jar.Main -tvf <archive> <files>" lists all files in archive, not just those specified.

On a related note, I assume new tools bugs should be logged against cp-tools component or would it be useful to have new "tools" component in bugzilla to differentiate those which are merged into Classpath main?
Comment 1 Tom Tromey 2006-05-22 01:02:09 UTC
Mine.
Comment 2 cvs-commit@developer.classpath.org 2006-05-22 01:22:18 UTC
Subject: Bug 27688

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Tom Tromey <tromey@savannah.gnu.org>	06/05/22 01:21:35

Modified files:
	tools/gnu/classpath/tools/jar: Lister.java Extractor.java 
	.              : ChangeLog 
Added files:
	tools/gnu/classpath/tools/jar: WorkSet.java 

Log message:
	PR classpath/27688:
	* tools/gnu/classpath/tools/jar/Extractor.java (allItems): Now
	a WorkSet.
	(initSet): Removed.
	(shouldExtract): Removed.
	(run): Updated.
	* tools/gnu/classpath/tools/jar/WorkSet.java: New file.
	* tools/gnu/classpath/tools/jar/Lister.java (readUntilEnd): New
	method.
	(listJar): Use it.
	(allItems): New field.
	(run): Initialize it.
	(listJar): Use it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/tools/gnu/classpath/tools/jar/Lister.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/tools/gnu/classpath/tools/jar/Extractor.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/tools/gnu/classpath/tools/jar/WorkSet.java?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.7517&tr2=1.7518&r1=text&r2=text



Comment 3 Tom Tromey 2006-05-22 01:22:49 UTC
Fix checked in.

I think having both tools and cp-tools would be confusing.
I'd rather we just merge in all the cp-tools and then delete the module.
Then we can rename the category 'tools' and it'll all be nice...
What do you think of that?