Re: How to properly move a file from a .deb to another one ?
Xavier Roche <email@example.com> writes:
> Hi folks,
> This is probably a louzy and obvious question, but I'm trying to fix
> a package error (files moved from a .deb to another one).
> When upgrading two packages (A and B) to the new version, dpkg is
> having some troubles, because some files from the new package A were
> actually in the old package B.
> Hence, to solve this small issue, I added Replaces: and Conflicts:
> lines in A control file, to (1) tell the scripts that some file
> replacement will occur on B files and (2) not to let the two
> packages "new A" and "old B" coexist.
Since dpkg was fixed to remember replaced files and keep them replaced
on subsequent updates I think it is save not to conflict. If "new A"
and "old B" can coexist with the files being replaced then just "A
Replaces: B" should be fine.
Can someone second that?
> Everything is fine.. exept that dpkg is trying (while removing the
> previous B version) to delete non-emprt dirs
> upgrading A..
> removing previous A files
> overwriting some previous B files: OK (Replaces: works)
> upgrading B..
> removing previous B files
> ERROR: can not remove some directories because they are not empty (added by A installing)
> The problem is that the B removal attempts to delete dierctories
> that are now the "property" of A.
> Am I missing something ?
Dpkg will remove a directory when no package has files in that
directory. Dpkg gives a warning if the directory is not empty but
continous. Dpkg screws up from time to time and gives warnings about
deleting non empty dirs. That's just dpkg 50% of the time.
If you see a removal attempt that fails and aborts the upgrading then
it shouldn't be dpkgs doing. Could it be that one of the maintainer
scripts attempts to clean up and calls rmdir?
What is the exact error message you get?
> (FYI, the conflicting packages are webhttrack and httrack-doc, in the main section, from version 3.40.4 (SID) to version 3.41.6 (<http://debian.httrack.com/dists/unstable/main/source/>), fixing BUG 367219)