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

Re: The future of non-dependency-based boot



On Wed, 11 Apr 2012, Raphael Hertzog wrote:
> On Wed, 11 Apr 2012, Brian May wrote:
> > On 10 April 2012 16:06, Yves-Alexis Perez <corsac@debian.org> wrote:
> > >> dpkg -l | awk '/^rc/ {print $2}' | xargs --no-run-if-empty dpkg --purge
> > >>
> > > That's a pretty dangerous line. People (sometimes) don't purge packages
> > > for a reason, you might lose data here.
> > 
> > Under some circumstances it can delete configuration files that are in
> > use by active packages.
> > 
> > e.g. package b replaces package a, however uses the same set of
> > configuration files - purge package a and it will delete the
> > configuration
> > files now in use by package b.
> 
> Err, no. At least dpkg shouldn't do that. If you can reproduce it, please
> file a bug.

AFAIK, the problem is not a conffile (dpkg-managed), but config
files/directories and runtime data files/directories that are destroyed
by the postrm script in "package a" when it is purged.

> (Make sure it's not some postrm that is badly behaving)

That is exactly the problem.  And the usual safe way to deal with it is
manually inspect every postrm script, and rm/edit it when necessary
before purguing the package.   It is damn obvious why most of us prefer
to leave "package a" to rot in "removed-but-not-purged" state forever,
or at least until it causes some problem...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh


Reply to: