rpm --justdb

hi,

can you please let me know if rpm --justdb actually just makes rpm think it has installed something when in fact it installs nothing and executes nothing inside the rpm?

thanks

This link should be useful.

why do people have to try and act like such smart a**es?

I did google, and I did go to that page.

And on that page it said

So from this it is apparent that it is updating the database and not putting anything on the filesystem. But it is not clear if it is running any preinstall scripts or anything. I think it is not. Hence my question asking someone to please confirm.

Honestly, if you don't want to answer a question, you don't have to, no one is asking you too, but don;'t go around telling people to RTFM when they have read it but are still not clear.

Not at all what you asked before.

The --justdb option would be fairly pointless if preinstall scripts could modify the filesystem too.

im not going to get into a tit for tat argument.

What I asked before was
"can you please let me know if rpm --justdb actually just makes rpm think it has installed something when in fact it installs nothing and executes nothing inside the rpm?"

I had obviously already read the link and knew it was not installing anything on the file system, but registering it with the db. But, I did not know if even to register it on the db, there was some criteria that had to be met from inside the rpm.
Hence the question.

The short answer is - in theory the --justdb option is not intended to run any pre or post scripts and care is taken in the reference version of RPM to ensure that only database-related actions occur. For example:

if (justdb) transFlags |= RPMTRANS_FLAG_JUSTDB;
	if (!incldocs) {
	    if (excldocs)
		transFlags |= RPMTRANS_FLAG_NODOCS;
	    else if (rpmExpandNumeric("%{_excludedocs}"))
		transFlags |= RPMTRANS_FLAG_NODOCS;
	}

The only specific criteria relating to justdb that I am aware of is

   if (justdb && bigMode != MODE_INSTALL && bigMode != MODE_ERASE)
	argerror(_("--justdb may only be specified during package "
		   "installation and erasure"));

To confirm that that is actually true for the particular RPM installer you are using, you would have to examine it's source code. In particular, examine all instances of RPMTRANS_FLAG_JUSTDB or whatever flag is defined to represent the --justdb option in that particular codebase.

Are you seeing some behavior that leads you to suspect that an install or uninstall script is being invoked?

1 Like

ok, thanks for that