Bug 164432 - rpm creates *.rpmnew files even when no changes were made
rpm creates *.rpmnew files even when no changes were made
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-07-27 16:54 EDT by Jakub Jelinek
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-26 22:29:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jakub Jelinek 2005-07-27 16:54:51 EDT
On x86-64, do:

cat > test1.spec <<\EOF
Summary: The foo(tm) package
Name: test
Version: 1.0
Release: 1
Group: System Environment/Libraries
License: GPL
Buildroot: /var/tmp/%{name}-root
mkdir -p $RPM_BUILD_ROOT{/usr/%{_lib},/usr/lib/foo}
echo 'int i;' | gcc $RPM_OPT_FLAGS -shared -O2 -fpic -o $RPM_BUILD_ROOT/usr/%{_lib}/libfoo.so -xc -
echo config test > $RPM_BUILD_ROOT/usr/lib/foo/config
%dir /usr/lib/foo
%config(noreplace) /usr/lib/foo/config
sed 's/Version: 1.0/Version: 1.1/' test1.spec > test2.spec
rpmbuild -ba -v test1.spec
rpmbuild -ba -v test2.spec
i386 rpmbuild -ba -v --target i386 test1.spec
i386 rpmbuild -ba -v --target i386 test2.spec
rpm -Uvh /usr/src/redhat/RPMS/{i386,x86_64}/test-1.0-1.*.rpm
rpm -Uvh /usr/src/redhat/RPMS/{i386,x86_64}/test-1.1-1.*.rpm

The last command will show messages about creating /usr/lib/foo/config.rpmnew,
which will be identical to /usr/lib/foo/config
Comment 1 Tomas Mraz 2005-08-05 08:57:39 EDT
They differ in mtime - see also bug 128622

I also think that the .rpmnew files shouldn't be created if the original file
differs from the original rpm only in mtime.
Comment 2 Jeff Johnson 2005-08-26 22:29:57 EDT
The existing behavior -- exactly the same as forevermore -- checks mtime.

Too bad that better could be done, I don't have the stomach for the battle to change
how %config files are handled.

Note You need to log in before you can comment on or make changes to this bug.