Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353214 - Modification of command running methods to allow process access.
Summary: Modification of command running methods to allow process access.
Status: RESOLVED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: RPM (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 0.9.0   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-27 10:34 EDT by Andrew Robinson CLA
Modified: 2011-09-23 10:08 EDT (History)
1 user (show)

See Also:


Attachments
The patch described in the bug. (3.15 KB, patch)
2011-07-27 10:34 EDT, Andrew Robinson CLA
no flags Details | Diff
Updated patch. (21.72 KB, patch)
2011-08-11 11:19 EDT, Andrew Robinson CLA
no flags Details | Diff
Updated patch. (21.05 KB, patch)
2011-08-12 16:03 EDT, Andrew Robinson CLA
akurtakov: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Robinson CLA 2011-07-27 10:34:16 EDT
Created attachment 200452 [details]
The patch described in the bug.

As it stands now, when a command is run with the runCommandToInputStream method from the RPM Utilities, the process that calls the method cannot interface with the run command. This patch adds an object that extends BufferedInputStream that allows cancellation of the run command and retrieval of the command's return code.
Comment 1 Alexander Kurtakov CLA 2011-07-29 10:10:36 EDT
Patch looks good. Please add the copyright header and give us an example patch of using this in specfile editor and I'll apply it.
Comment 2 Andrew Robinson CLA 2011-08-11 11:19:41 EDT
Created attachment 201325 [details]
Updated patch.

Added header to BufferedProcessInputStream.java.

Modified runCommand to also allow process cancellation and access to the process's return code.

Implemented examples of new functionality of the utilities in retrievePackageList method and RPMExportOperation.
Comment 3 Andrew Robinson CLA 2011-08-12 16:03:06 EDT
Created attachment 201431 [details]
Updated patch.

Format fix.
Comment 4 Alexander Kurtakov CLA 2011-09-23 10:08:07 EDT
Works perfect. Applied in master 681e714..da10352  master -> master with cosmetic changes.