title: %preun is passed with value 0 to $1 during upgrade
body: <p>I have a rpm package which is already installed in the system. I want to replace the old package with the new package with a different package name. The "rpm -Uvh [package name]" should be enough to replace the old package with the new one.</p>
  
  <p>After doing some research in the net I found that "Obsoletes" is used to obsolete an old package and replace it with a new package with a different name. 
  I have used "Obsoletes" in my rpm spec file but When I am trying to upgrade from the old package the %preun of the old package gets called with $1 = 0 which I expected to be $1 = 1.</p>
  
  <p>Please correct me if I am going wrong anywhere. Is there are any better solution for this problem?</p>
  
  <p>Thanks </p>