[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to remove the relation between a file and a .deb package



In <[🔎] 4B698BE6.10201@avelon-cetex.com>, M. Frey wrote:
>I'm using my own Debian .deb-packages for managing software updates on a
>small numbers of embedded computers. So this question is about creating
>my own .deb Packages. I hope you can help me, even if I'm not an
>official debian package maintainer.
>
>I got the Package A with the version 1.0 and 2.0. From version 2.0 on
>it's not necessary to keep track of the file fileB.txt. But I want to
>keep fileB.txt on the target system anyway.
>
>Package A Ver. 1.0:
>  - fileA.txt
>  - fileB.txt
>
>Package A Ver. 2.0:
>  - fileA.txt
>
>If I install the new package A. DPKG will of course remove fileB.txt.
>
>How can I prevent dpkg to remove fileB.txt?

You can't.  It is owned by the installed package version and that won't 
change.

>Of course, I could manipulate the dpkg file list, somewhere in the dpkg
>cache (file system). But how can I achieve the same effect within a
>package -> without manual manipulation on the target system?

Yeah, that's a horrible idea.

You should use a preinst or prerm to backup fileB.txt (files created by the 
{pre,post}{inst,rm} scripts are considered owned by the package) to a 
different file name during the time when dpkg would remove it and put it back 
after the new package is installed.

>Is there any key word in the control file? Or is there a special file,
>which lists "dependencies to delete"?

No; No.

>What happens if the same file is contained in two packages and one of
>them gets removed?

dpkg will notice the packages conflict and not allow them to be installed at 
the same time.  (Assuming no Replaces dependency.)
-- 
Boyd Stephen Smith Jr.                   ,= ,-_-. =.
bss@iguanasuicide.net                   ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy         `-'(. .)`-'
http://iguanasuicide.net/                    \_/

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: