Subject: why does pkg installation use R_NOOVERWRITE when adding to pkg
To: None <firstname.lastname@example.org>
From: Jeremy C. Reed <email@example.com>
Date: 07/22/2004 12:04:50
files/lib/pkgdb.c defines pkgdb_store() which does:
return (*pkgdbp->put) (pkgdbp, &keyd, &vald, R_NOOVERWRITE);
This R_NOOVERWRITE means that if a file is already registered in the
database, then it will not be changed.
Also, when installing a package and if not "Overwriting" then do the
Why does it use R_NOOVERWRITE?
Why does it not do the pkgdb_store if overwriting an already existing
I'd prefer we just let it overwrite the data in the database by not using
R_NOOVERWRITE and also allowing the pkgdb_store to be done even if file
already existed (overwriting).
By the way, pkg_admin's addkey option (only when built with PKGDB_DEBUG)
also uses pkgdb_store and does check for the "key already present" return
Do we really need R_NOOVERWRITE? Can this be removed?
By the way, I think I read that we may be getting rid of all db support
from pkg tools. Is this true?
I am using the db to check if a file belongs to old package during an
upgrade, so it can be removed (because not in new version just upgraded
too). If you have any suggestions for doing without using pkgdb_retrieve,
please let me know.
One idea would be to just build a list of files from old CONTENTS_FNAME
data. And then compare with the new CONTENTS_FNAME data.
Any ideas would be appreciated.
(I use this so I can upgrade packages that are needed and in use without
Jeremy C. Reed
technical support & remote administration