title: RPM-Build -How to print error message at rpm install at client
body: <p>my requirement is that i want to print some message on screen if rpm install fails in any case at client machine.or display message on screen like rpm install fail due to any of the generated reasons.like other standard rpm gives.</p>
  
  <p>and i am not making any c file or make command in my .spec file . Everything i was doing in spec file itself.plz suggest how to print such type of things in client console using spec file.</p>
  
  <hr>
  
  <p><strong>yes that is not my concern --test i have give just example.my excet requirement is below spec file content are.</strong></p>
  
  <pre><code>#Pre-Uninstall section
  
  %preun
  Processes=`ps -Ao"%p:%a"  --cols 150 |
   egrep "Launcher|rmiregistry" | grep -v grep | cut -d ":" -f1`
           if [ -n "$Processes" ]; then
                  echo 'xyz is running ,first stop it then uninstall.' &gt; /dev/stderr;
                  exit 1;
           else
                   echo 'xyz service is not running' &gt;/dev/stdout;
           fi
  </code></pre>
  
  <p>then i try to uninstall the rpm using command </p>
  
  <pre><code>rpm -ev xyz
  </code></pre>
  
  <p>output :
  both message are printed according to service status.i want if client uninstall with option -v then and then it display message on screen otherwise not. how can i do this?</p>