Bug 1006

Summary: make possible to generate the list even if the traced process doesn\'t want to finish
Product: Sisyphus Reporter: imz <vanyaz>
Component: rpm-utilsAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: at, glebfm, ldv, placeholder
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
0001006-rpm-utils-0.4.3-quit.patch
none
0001006-rpm-utils-0.4.3-quit-faster.patch none

Description imz 2002-06-16 18:20:50 MSD
I wanted to get the list of packages mozilla uses when it is run, but for some reason mozilla didn\'t want to finish when it was traced. So I modified the scripts a little to allow the user to use SIGQUIT (C-\\) to quit packagereq and to generate the list based on the information available by that moment.

Also I made it work faster by using a single call to rpm in packagereq.

The patch is attached, perhaps some changes are reasonable.

---

---
rpm-utils-0.4.3

Comment 1 imz 2002-06-16 19:39:18 MSD
The newly attached patch makes it work even more faster (substantially faster -- a user like me can feel it): the list of packges is sorted (sort -u) before processing it in the loop in packagereq.
Comment 2 imz 2002-06-16 19:39:18 MSD
The newly attached patch makes it work even more faster (substantially faster -- a user like me can feel it): the list of packges is sorted (sort -u) before processing it in the loop in packagereq.
Comment 3 Dmitry V. Levin 2002-07-15 17:35:40 MSD
Implemented in rpm-utils-0.5.0-alt1
Comment 4 Dmitry V. Levin 2002-07-15 17:35:40 MSD
Implemented in rpm-utils-0.5.0-alt1
Comment 5 imz 2002-07-20 07:09:47 MSD
Now it fast!

One hunk has not been applied. Without this, I\'m not able to quit \'packagereq mozilla\' with generation of the list of used packages.

--- /usr/bin/packagereq.orig	Sun Jun 16 17:44:14 2002
+++ /usr/bin/packagereq	Sun Jun 16 19:21:37 2002
@@ -111,7 +111,8 @@
 	exit $RETVAL
 }
 
-trap \'Exit \' SIGHUP SIGINT SIGQUIT SIGTERM EXIT
+trap \'Exit \' SIGHUP SIGINT SIGTERM EXIT
+trap \'\' SIGQUIT 
 
 \&quot;$FILEREQ\&quot; \&quot;$REQFILE\&quot; \&quot;$@\&quot;
 
Comment 6 imz 2002-07-20 07:09:47 MSD
Now it fast!

One hunk has not been applied. Without this, I\'m not able to quit \'packagereq mozilla\' with generation of the list of used packages.

--- /usr/bin/packagereq.orig	Sun Jun 16 17:44:14 2002
+++ /usr/bin/packagereq	Sun Jun 16 19:21:37 2002
@@ -111,7 +111,8 @@
 	exit $RETVAL
 }
 
-trap \'Exit \' SIGHUP SIGINT SIGQUIT SIGTERM EXIT
+trap \'Exit \' SIGHUP SIGINT SIGTERM EXIT
+trap \'\' SIGQUIT 
 
 \&quot;$FILEREQ\&quot; \&quot;$REQFILE\&quot; \&quot;$@\&quot;
 
Comment 7 Dmitry V. Levin 2002-08-14 15:36:04 MSD
Applied in 0.5.2-alt1
Comment 8 Dmitry V. Levin 2002-08-14 15:36:04 MSD
Applied in 0.5.2-alt1