LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What RPM Macro Corresponds to "Mark for Complete Removal" in Synaptic? (https://www.linuxquestions.org/questions/linux-software-2/what-rpm-macro-corresponds-to-mark-for-complete-removal-in-synaptic-871038/)

Kaboosh 03-25-2011 06:30 PM

What RPM Macro Corresponds to "Mark for Complete Removal" in Synaptic?
 
I'm packaging some software in PCLinuxOS and I'd like to remove users when the "Mark for Complete Removal" option is selected in Synaptic (as opposed to the basic "Mark for Removal"). What are the semantics of this option in relation to a specfile? Does one run the %postun macro whereas the other doesn't? Does complete removal have it's own macro for a script to run when this is selected? Is a variable set telling you that it's a "complete" uninstall?

frankbell 03-25-2011 07:47 PM

I don't think this answers your question, but Synaptic is a graphical frontend for apt, so it would call the appropriate apt commands.

According to this Wikipedia article, the closest thing to a spec file in a Debian package seems to be the dsc file.

unSpawn 03-26-2011 04:34 AM

Quote:

Originally Posted by Kaboosh (Post 4303602)
I'd like to remove users when the "Mark for Complete Removal" option is selected in Synaptic (as opposed to the basic "Mark for Removal").

I hope you mean system user accounts, right? If so then you should only remove that system user account the package has added in the %pre or %post stage.


Quote:

Originally Posted by Kaboosh (Post 4303602)
What are the semantics of this option in relation to a specfile? Does one run the %postun macro whereas the other doesn't? Does complete removal have it's own macro for a script to run when this is selected? Is a variable set telling you that it's a "complete" uninstall?

If the first argument to %postun is zero then this means remove the package completely (as opposed to remove and upgrade):
Code:

%postun
case "$1" in
0) # Final removal, not upgrade:
  # I. Ensure the service is stopped.
  # II. Kill stubborn processes.
  # III. Run userdel before groupdel.
  doSomething;;
*) # Value is 1: upgrade.
  continue;;
esac


knudfl 03-26-2011 04:34 AM

PCLinuxOS uses "apt for rpm". Is different from the Debian apt.

http://en.wikipedia.org/wiki/APT-RPM

http://www.google.com/webhp#sclient=...cf11f17933379c

frankbell 03-26-2011 06:16 PM

Quote:

Originally Posted by knudfl (Post 4303936)
PCLinuxOS uses "apt for rpm". Is different from the Debian apt.

Thanks.


All times are GMT -5. The time now is 02:34 PM.