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

Re: how to query for %config(noreplace) attribute?



Jeff Johnson wrote:
Hal Wine wrote:

How do I query the rpm db or a package to determine if the 'noreplace' option was used for a given config file? I do not see a tag for it in the --querytags list, nor do I see any hint in any debug output.

The bit that implements %config(noreplace) maps to (from lib/rpmlib.h):
rpmlib.h: RPMFILE_NOREPLACE = (1 << 4), /*!< from %%config(noreplace) */


So the CLI query to extract the file flags for, say, the xinetd package
   $ rpm -q --qf '[%{filenames}: %{fileflags}\n]' xinetd

It's up to you (and your script) to determine which flags have bit 0x10 enabled.

Awesome! NOW I understand the use of --qf -- somehow that had escaped me.


And, of course, the "-p package" works with it as well.

Thanks again, Jeff!

--Hal




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