summaryrefslogtreecommitdiffstats
path: root/test/symlink.test
Commit message (Collapse)AuthorAgeFilesLines
* test: Consistently use %{P} and %{_P}Jean Delvare2017-05-091-9/+9
| | | | | | | | | | | There is no point in defining P and _P in the Makefile to allow for QUILT_PATCHES_PREFIX to be set or unset if we do not use these variables consistently in the test suite. Replace hardcoded "patches/" with %{P} or %{_P} throughout the test suite wherever relevant so that unsetting QUILT_PATCHES_PREFIX in test.quiltrc actually works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Let cat_to_new_file handle the file backupJean Delvare2015-03-191-0/+37
| | | | | | | | | | | | | Let function cat_to_new_file optionally backup the destination file before overwriting it. This has two advantages: * This avoids duplicating code on the caller's side. Functions header and refresh both need to perform a backup. * This guarantees the consistency of the backup logic. At the moment, the refresh command would handle the backup of a symlinked file just fine while the header command would misbehave in that case. Now that the header command handles symlinked patches properly, also test it so that we don't break it accidentally later.
* symlink.test: Make the test more robustJean Delvare2015-02-251-0/+1
| | | | | | | "mv" may or may not overwrite a read-only file by default, depending on whether or not it is considered to be interactive. Removing the file explicitly before avoids that uncertainty and makes it easier to play the test case manually.
* refresh: Always preserve modification timeJean Delvare2015-02-251-0/+3
| | | | | | In the general case, when doing a backup copy of a patch on refresh, the modification time of the file is preserved. We should do the same when the patch is a symbolic link.
* refresh: Break links to read-only patch filesJean Delvare2015-02-251-0/+48
| | | | | | | | We just changed the behavior of the refresh command to no longer break symbolic links. While preserving the links is the right thing to do in the general case, this approach fails if the patch file is read-only. In that case we want to replace the link itself with the refreshed patch, as we used to.
* refresh: Do not remove symlinksJason Wessel2015-02-181-0/+53
Change the core behavior of quilt to not remove symlinks to the patch files. Historical notes: This is an 6 year old patch that is still actively used for the Yocto Project and others. http://lists.nongnu.org/archive/html/quilt-dev/2008-01/msg00004.html Revised again here: http://comments.gmane.org/gmane.comp.handhelds.openembedded/34224 [Edited by Jean Delvare: removed a compatibility option, we'll introduce it only if users ask for it. Also cleaned up the test case a bit.] Signed-off-by: Jason Wessel <jason.wessel@windriver.com>