<?xml version="1.0" encoding="UTF-8"?>
<doc>
	<back to="packages"/>
	<title>collision-protect</title>
	<section>
	
		<description>
			<para>
				This hook will prevent paludis from overwriting files already one the file system, by checking if each file to be installed already exists.
			</para>
		</description>
		<author>dleverton</author>
		<dependencies>
			<item>
				<para>
					none
				</para>
			</item>
		</dependencies>
		<title>Installation</title>
		<section>
			<title>without paludis-hooks installed</title>
			<subsection>
				<para>
					Just install the package.
				</para>
				<code>paludis -i app-paludis/paludis-hooks-collision-protect</code>
			</subsection>
			<title>if you have paludis-hooks installed</title>
			<subsection>
				<para>
					Enable the <strong>collision-protect</strong> extended use flag in the <file>/etc/paludis/use.conf</file> file, by adding <strong>collision-protect</strong> to the line.
				</para>

				<code>* PALUDIS_HOOKS: collision-protect .......</code>
				
				<para>
					Then run:
				</para>

				<code>paludis -i paludis-hooks --dl-reinstall if-use-changed</code>

			</subsection>
		</section>
		<title>Enabling/Disabling the hook</title>
		<section>
			<para>
				To enable the hook you can use <strong>eselect</strong> with the command 
			</para>
			
			<code>eselect paludis-hook enable collision-protect</code>			
			
			<para>
				To disable the hook you can use <strong>eselect</strong> just like the example above shows, but by changing <strong>enable</strong> to <strong>disable</strong> like this 
			</para>

			<code>eselect paludis-hook disable collision-protect</code>			<para>
				See here <link href="eselect-paludis-hooks.xml" text="for help on eselect" /> with paludis support.
			</para>		
		</section>
		<sources title="scripts">
			<item href="files/collision-protect.bash">hook script</item>
		</sources>
	
	</section>
</doc>
