I want to compare two rpms having the same name and find out if they
are different in terms of contents. I am building these rpms locally
and it so happens the timings of those two rpms are different and thus
the following commands do produce "diff" results.
rpm -qlvp rpm1 > list1
rpm -qlvp rpm2 > list2
diff list1 list2
shows that they are different, although the contents of both rpms are
same, but built at different times.
All I want to find out if two rpms are different in contents and not
in times when they were built.
Can someone please tell me the right command.
Thanks in advance.
nagrik
Explain clearly what for you means "different in contents" and after
that you will likely have a solution yourself. For example: if you care
only about files and their sizes then filter out only those elements
from an output of "rpm -lv ..." and compare results. Piping through
"awk '{print $5, $NF}'", say - but this is not the only way for that goal,
will do filtering above. If you mean something else then apply a suitable
transform to get what you desire.
Michal