Re: files getting overwritten

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

 



In reality the file isn't overwritten, there isn't "conflict": the md5sum is the same, the perm also ecc. And this, in rpm, is OK.
In fact if you remove a package only, the file testfile is not  removed as well: the other package own it.

OTHO,  if you change in a spec file only the perm for example
(or the file content ) there is a true conflict and it is possible to install only one rpm: rpm refuse to install the other.

In conclusion, the behavior of the RPM is corrected avoiding the real
conflicts

Best Regards

2008/5/7 Richard Shade <rshade@xxxxxxxxxxxxxx>:


On Wed, May 7, 2008 at 3:17 PM, Zac Elston <Zac.Elston@xxxxxxxxxxxxx> wrote:
Greetings.

I'm attempting to demonstrate how RPMs will save the developer's butt by not allowing a file to be overwritten and during my demo, PackageB overwrites PackageA's file

[root@webd-m01 ~]# rpm -q --whatprovides /usr/local/testfile
psi-test-1-dev
psi-retest-2-dev

what did I do wrong?
I am considering from this context that PackageA=psi-test-1-dev, and PackageB=psi-retest-2-dev. If so I think you also need %config(noreplace) /usr/local/psi/testfile in PackageB instead of just leaving it under files.


--specfile snippets

Summary:        file overwrite test
Name:           psi-test
Version:        1
Release:        dev
install -D testfile $RPM_BUILD_ROOT/usr/local/psi/testfile
%files
%defattr(644,apache,apache)
%config(noreplace) /usr/local/psi/testfile

Summary:        file overwrite test
Name:           psi-retest
Version:        2
Release:        dev
install -D testfile $RPM_BUILD_ROOT/usr/local/psi/testfile
%files
%defattr(644,apache,apache)
/usr/local/psi/testfile



-zac

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list



--
Thanks,

Richard Shade
RightScale
http://www.rightscale.com/

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux