On Dec 2, 2006, at 5:44 PM, Tony Nelson wrote:
At 8:19 AM -0800 12/2/06, Dario Alcocer wrote:
Jeff Johnson wrote:
No --initdb has been harmless when run against an existing rpmdb,
been
that way (that I know of) since 1998.
Truly, how hard is the test:
cd /var/lib
tar cf rpmdb.tar.gz ./rpm
rpm --initdb
rpm -qa (or --verifydb or --rebuilddb or ... )
Way easier to test than it is to sort through whatever is claimed on
the internet. YMMV.
It's funny how little we as programmers perform actual experiments to
get the answers we want (hmm, maybe many of us don't know about the
scientific method.) Anyway, it must not be obvious to us, becuase
ESR
has it listed in his "Smart Questions" essay:
http://catb.org/esr/faqs/smart-questions.html#before (see item no. 5)
If "rpm --initdb" doesn't destroy my personal RPM database, but the
man
page seems to say that it does, how often should I repeat the command
before I advise others that it is completely safe and won't destroy
their
RPM database? Frankly, even a grumpy answer from the horses mouth
is much
more trustworthy, and way easier than reading all the relevent RPM
source
code, especially when it starts jumping through function pointers.
Re: "... the man pages seems to say that it does ..."
The man page says
...
REBUILD DATABASE OPTIONS
The general form of an rpm rebuild database command is
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root
DIRECTORY]
Use --initdb to create a new database, use --rebuilddb to
rebuild the
database indices from the installed package headers.
...
All depends on what meaning you bring to "create" and/or "new".
So somehow you (or others) are interpreting "create" as "destroy".
That's really really weird and funny if you squint a bit, sigh.
So, thanks, Jeff, for the grumpy answer! I hope it makes it into
the man page.
I'm gonna rip --initdb out of rpm instead.
There's no possibility of mis-interpreting what won't be present.
Of course that won't make any differnce at all, users will think I'm
depriving
them of some feature.
Meanwhile, --verifydb and "rm -f /var/lib/rpm/__db*" are well along
to being
ripped out of rpm as well:
https://lists.dulug.duke.edu/pipermail/rpm-devel/2006-December/
001923.html
Note: I have a very dry sense of humor ...
73 de Jeff
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list