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

Re: Question about dpkg -r



--- Goswin von Brederlow
<brederlo@informatik.uni-tuebingen.de> wrote:

> Hope Duryea <hope_duryea@yahoo.com> writes:

> > Are you saying debian packages can only be used on
> > systems where the entire system is comprised
> > solely of things installed as debian packages?
> > I was hoping I could use debian packages for
> > additional material to be installed on an existing
> > (non-debian) system.
> 
> No, he is saying (or meaning or whatever) that if
> you mix directories
> controlled by dpkg with stuff you manage manually
> then odd things will happen.
> 
> You installed some package with files in /usr and
> now you removed the last package having files there.
> dpkg will naturally try to clean up. With /usr being
> a link your manual files under /usr/./ won't
> prevent that cleanup (and imho should not).

Personally, I don't find it all that natural for dpkg
to remove something it didn't itself create at some
point. In my opinion, it should only clean up things
it was itself responsible for creating.
  
> If you need to install stuff outside the packagin
> system I suggest you
> use directories outside of dpkgs control for that,
> like /usr/local/. Subdirs in /usr/local are
> specifically made outside of the dpkg database to
> prevent removals.

Putting this stuff into /usr/local isn't an option --
but I'm a bit confused about what you mean. How is
/usr/local, if I create it myself, any different from
my creating /usr myself?
 
> [And I still don't get how you manage to create a
> debian system with
> no package claiming /usr any more. No libc6
> installed?]

I don't have a "debian system". I have a system that I
had hoped I could install additional files into, using
debian packages to do that.
 
> >> If you absolutely must do this, create a dummy
> >> package to contain /usr.
> >
> > Can you say what you mean by a "dummy package"?
> 
> Create a Debian package that contains just
> /usr/share/doc/dummy/changelog saying that it is a
> dummy package to keep /usr alive.

Yeah, I decided that was probably what was meant, so
yesterday I created a package that puts a file into
each of the symlinks I have under / (there are quite a
few) -- and to prevent anyone from removing that
package as the last package they have, I added a prerm
script for it that simply exits 1, so I now have a
workaround to prevent the system from getting broken
by dpkg.

> Dpkg does not care about who created a dir or
> symlink but only about
> how many packages are providing it.

And that's where I think it goes wrong -- I think it
should care. If dpkg didn't create it, I can't think
of any reason why it should take it upon itself to
remove it.

But in any case, I do have a workaround now, so thank
you all for your responses.

Hope

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Reply to: