Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353214

Summary: Modification of command running methods to allow process access.
Product: [Tools] Linux Tools Reporter: Andrew Robinson <arobinso>
Component: RPMAssignee: Alexander Kurtakov <akurtakov>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: linux.rpm-inbox
Version: unspecified   
Target Milestone: 0.9.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
The patch described in the bug.
none
Updated patch.
none
Updated patch. akurtakov: iplog+

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.