diff options
Diffstat (limited to 't')
-rw-r--r-- | t/data/SPECS/file-conflicts/p-1.spec | 27 | ||||
-rw-r--r-- | t/data/SPECS/file-conflicts/p-2.spec | 36 |
2 files changed, 63 insertions, 0 deletions
diff --git a/t/data/SPECS/file-conflicts/p-1.spec b/t/data/SPECS/file-conflicts/p-1.spec new file mode 100644 index 00000000..cddbe3d2 --- /dev/null +++ b/t/data/SPECS/file-conflicts/p-1.spec @@ -0,0 +1,27 @@ +Summary: x +Name: p +Version: 1 +Release: 1 +License: x +Group: x +Url: x +BuildArch: noarch + +%description +x + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/etc/foo +install -d $RPM_BUILD_ROOT/var/foo +echo bar > $RPM_BUILD_ROOT/etc/foo/bar +echo boo > $RPM_BUILD_ROOT/var/foo/boo + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +/etc/foo +/var/foo + + diff --git a/t/data/SPECS/file-conflicts/p-2.spec b/t/data/SPECS/file-conflicts/p-2.spec new file mode 100644 index 00000000..a44aaaca --- /dev/null +++ b/t/data/SPECS/file-conflicts/p-2.spec @@ -0,0 +1,36 @@ +Summary: x +Name: p +Version: 2 +Release: 1 +License: x +Group: x +Url: x +BuildArch: noarch + +%description +x + +%install +rm -rf $RPM_BUILD_ROOT +install -d $RPM_BUILD_ROOT/etc/foo +install -d $RPM_BUILD_ROOT/var +echo bar > $RPM_BUILD_ROOT/etc/foo/bar +echo boo > $RPM_BUILD_ROOT/etc/foo/boo +ln -s ../etc/foo $RPM_BUILD_ROOT/var/foo + +%clean +rm -rf $RPM_BUILD_ROOT + +%pretrans +if [ ! -L /var/foo ]; then + echo "handling by hand /var/foo migration" + mv /var/foo/* /etc/foo/ + rmdir /var/foo + ln -s ../etc/foo /var/foo +fi + +%files +/etc/foo +/var/foo + + |