Hi all, I have a package that contains a subdirectory which is changed to a symlink in the next release. When I upgrade, I get the following error: Error: Transaction check error: file /usr/share/symlinktest/dir/subdir from install of symlinktest-1-2.fc25.x86_64 conflicts with file from package symlinktest-1-1.fc25.x86_64 The first version (1-1) of the spec file contains: mkdir -p \ %{buildroot}/%{_datadir}/%{name}/dir/subdir ln -s \ %{_datadir}/%{name}/testfile %{buildroot}/%{_datadir}/%{name}/dir/subdir which is changed in 1-2 to: mkdir -p \ %{buildroot}/%{_datadir}/%{name}/dir/ ln -s \ %{_datadir}/%{name}/testfile %{buildroot}/%{_datadir}/%{name}/dir/subdir As you can see, in the second case, the subdir is not created anymore, and thus %{_datadir}/%{name}/dir becomes a symlink to %{_datadir}/%{name}/testfile. In other words, instead of having the symlink in dir/subdir, dir/subdir is now a symlink itself. I'm not sure what to make out of this. How can a file conflict with a file of the same package (but previous version)? Is this a dnf issue? Removing the old version and then installing the new version works fine. I've attached both versions of the spec file. You can also find them on pagure: https://pagure.io/symlinktest Any hints are welcome. Thanks, Till
Name: symlinktest Version: 1 Release: 1%{?dist} Summary: Test to move symplinks License: WTFPL URL: https://fedoraproject.org %description Test what happens if you move a symlink between versions. %prep %build echo "test" > testfile %install mkdir -p %{buildroot}/%{_datadir}/%{name} install -m 0644 -p testfile %{buildroot}/%{_datadir}/%{name} mkdir -p %{buildroot}/%{_datadir}/%{name}/dir/subdir ln -s %{_datadir}/%{name}/testfile %{buildroot}/%{_datadir}/%{name}/dir/subdir %files %{_datadir}/* %changelog * Mon Dec 19 2016 Till Hofmann <till.hofmann@xxxxxxxxx> - Initial package
Name: symlinktest Version: 1 Release: 2%{?dist} Summary: Test to move symplinks License: WTFPL URL: https://fedoraproject.org %description Test what happens if you move a symlink between versions. %prep %build echo "test" > testfile %install mkdir -p %{buildroot}/%{_datadir}/%{name} install -m 0644 -p testfile %{buildroot}/%{_datadir}/%{name} mkdir -p %{buildroot}/%{_datadir}/%{name}/dir/ ln -s %{_datadir}/%{name}/testfile %{buildroot}/%{_datadir}/%{name}/dir/subdir %files %{_datadir}/* %changelog * Mon Dec 19 2016 Till Hofmann <till.hofmann@xxxxxxxxx> - 1-2 - move symlink one dir up * Mon Dec 19 2016 Till Hofmann <till.hofmann@xxxxxxxxx> - Initial package
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx