summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* backup-files: Avoid negationsJean Delvare2012-02-011-13/+13
| | | | | | | | In if/else constructs, always start with the positive case, to avoid a negation. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Optimize noopJean Delvare2012-02-011-3/+10
| | | | | | | | | Optimize the noop operation. The only use case in quilt is to ensure that files have a link count of 1, so we can check that OPT_NOLINKS is set once and for all, instead of checking again with every file. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Drop curly bracesJean Delvare2012-02-011-10/+10
| | | | | | | | | Don't use the ${VAR} construct when we don't have to, it's slightly slower than simple variable names. Likewise, don't use quotes when we don't have to. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Batch mass restoreJean Delvare2012-02-014-1/+153
| | | | | | | | | | | | | When restoring all files, batch the first steps (directory creation and target file removal) and last steps (optional touch and backup file removal). This makes the typical restore case (quilt pop) much, much faster. Note: a similar optimization would be possible for the removal function (-x), but quilt doesn't use this function at the moment. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Use internal implementation of dirnameJean Delvare2012-02-014-40/+53
| | | | | | | | Use quilt's internal implementation of dirname. This is more efficient than calling an external binary, and avoids a dependency. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Make input methods mutually exclusiveJean Delvare2012-02-011-22/+19
| | | | | | | | | Make the various file list selection methods mutually exclusive. This is the actual usage scheme by quilt, and handling them separately makes the code both clearer and more efficient. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Drop variable filelistJean Delvare2012-02-011-9/+5
| | | | | | | | No need to copy all file names to a dedicated array, we can use $@ directly instead. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Optimize backupJean Delvare2012-02-011-10/+5
| | | | | | | | | | | | | | Optimize backup: * Due to the way quilt uses backup-files, the backup file will never exist, so there is no point checking for this. * Don't attempt to create directories which already exist. * Use > instead of touch to create new files, it's faster. * Stop supporting option -t on backup, it's undocumented and quilt doesn't use it. * Drop unneeded quotes around constant. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Optimize restoreJean Delvare2012-02-011-14/+8
| | | | | | | | | | | Optimize restore: * Don't call mkdir if we know the directory already exists. * Don't try to optimize the -L case, quilt doesn't use it anyway and the current optimization is broken. * Move common code at the end of the function. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Split code to sparate functionsJean Delvare2012-02-011-63/+78
| | | | | | | | The different actions don't have much code in common, so it would be more efficient to let different functions handle them. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Simplify find loopJean Delvare2012-02-012-13/+7
| | | | | | | Let find report errors by itself. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Prefix must be a directoryJean Delvare2012-02-011-20/+7
| | | | | | | | Enforce the fact that the prefix must be a directory. This is what quilt does, and enforcing it allows some code clean-ups. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Speed up ensure_nolinksJean Delvare2012-02-011-6/+3
| | | | | | | | | | | Calling dirname and basename is costly, and here we really don't have to. We can simply use a different temporary file name. Additionally, if stat succeeds, it will always return a valid number, so we can relax the tests. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Inline copy_file and link_or_copy_fileJean Delvare2012-02-011-18/+4
| | | | | | | | | Expand functions copy_file and link_or_copy_file at calling locations, the code is so simple that it hardly deserves dedicated functions. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Drop variable prognameJean Delvare2012-02-011-5/+3
| | | | | | | | The program name $0 is a global variable, there is no point in passing it to functions as a parameter. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Skip test for file presenceJean Delvare2012-02-011-4/+0
| | | | | | | | | Don't test for the presence of files to process. Nothing wrong will happen if we don't have any file to process, and backup-files is for quilt's internal use only, so there is no need to be paranoid. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* backup-files: Drop suffix optionJean Delvare2012-02-011-16/+4
| | | | | | | | Quilt doesn't make use of the suffix (-z) option of backup-files, so there is no point in implementing it Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* Clean up legacy C codeJean Delvare2012-02-016-3080/+11
| | | | | | | Finally get rid of the old C implementation of backup-files, together with all the related checks in configure and variables in Makefile. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* BSD compatibility: rmdirJean Delvare2012-02-012-24/+10
| | | | | | | | | | Use rmdir -p instead of open-coding it. The more complex code was maybe needed to properly handle symbolic links, but we know that there won't be symbolic links in the backup directory, so the extra complexity isn't needed. Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* BSD compatibility: cpJean Delvare2012-02-011-2/+2
| | | | | | | | | Avoid using uncommon cp options which hurt portability. I fail to see why we would need them anyway, as we are never working with symbolic links by construction (quilt doesn't support them.) Signed-off-by: Jean Delvare <jdelvare@suse.de> Reviewed-by: Raphael Hertzog <hertzog@debian.org>
* BSD compatibility: statJean Delvare2012-02-014-3/+156
| | | | | | | | The stat command on BSD takes different parameters from the GNU one. Let configure find out which variant is available, and use the right parameters. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Make backup-files a shell scriptMartin Quinson2012-02-0112-58/+334
| | | | | | | | Make backup-files a shell script instead of a binary, so we can make quilt arch: all [Steve Langasek, thanks so much] (Closes: Debian #363659) Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Add a dedicated test case for backup-filesJean Delvare2012-02-012-0/+207
| | | | Signed-off-by: Jean Delvare <jdelvare@suse.de>
* import: Fix import of patches from a subdirectory (bug #35244)Jean Delvare2012-01-314-7/+33
|
* Set version to 0.51.v0.51Jean Delvare2012-01-283-10/+15
|
* Remove parse-patch which is no longer usedJean Delvare2012-01-288-259/+11
| | | | | | | | Based on a preliminary patch by Yasushi SHOJI. None of quilt code uses parse-patch anymore. The last one, it seems, was contrib/import.diff, which was removed at 2f9728a9. So, just remove it.
* test suite: in the "ls -l" output, ignore additional characters after the ↵Andreas Gruenbacher2012-01-231-5/+5
| | | | | | | file permissions Access control lists will add a "+", and SELinux will add a "."; we don't care in the test suite.
* quilt mail: CC people in more common patch headersAndreas Gruenbacher2012-01-231-2/+6
| | | | | In addition to Signed-off-by and Acked-by, also CC people in Suggested-by, Reviewed-by, Requested-by, Reported-by, and Tested-by headers.
* inspect: Complain if wrapper script can't be executedJean Delvare2012-01-232-0/+12
| | | | | | | There is no guarantee that the wrapper script can be executed. For example users can mount their temporary directories with noexec for security reasons. Instead of failing with no explanation, complain when this situation is detected.
* inspect: Leave stderr free for actual error reportingJean Delvare2012-01-232-13/+14
|
* oops, forgot to document my lastest change, sorry for the noiseMartin Quinson2012-01-231-0/+6
|
* Silence the completion of the push scriptMartin Quinson2012-01-231-1/+1
| | | | | | | | | | When using bash TAB completion in "quilt push <TAB>", if no patch is applied, it shows the standard error of the command "quilt applied" ("No patches applied"), used in the source file bash_completion to get the list of applied patches. This is similar to commit 6af132b5061f6773f9591ebde625c92a395ebc91, but for the push script that were forgotten previously.
* Store the quilt command reference once generatedJean Delvare2012-01-103-8/+16
| | | | This avoids generating it twice, once for README and once for quilt.1.
* Silent the generation of the quilt manual page, for consistencyJean Delvare2012-01-102-1/+3
|
* No need to delete doc/quilt.1 twice on "make clean"Jean Delvare2012-01-102-4/+12
|
* ensure that bash is used as a shell, even if it's not the default oneMartin Quinson2012-01-092-0/+11
|
* Revert "Fix auto-generation of quilt.1 to work with dash"Martin Quinson2012-01-091-5/+5
| | | | | | | | | | | This reverts commit 5f17e6f29c22282a4bf2819ac7ee08c942e6e103. We rely on bash for the rest of quilt, so it is no real issue to rely on it for the makefile. If we try to remove it, we have to deal with the portability another way. For example, BSD and Mac OSX versions of sed are not able to deal with \n by themselves... The correct fix will be to force the SHELL to be bash in the makefile.
* document lastest changesMartin Quinson2012-01-021-0/+9
|
* add a check that QUILT_PATCHES != QUILT_PC.Martin Quinson2012-01-021-0/+6
| | | | | | | | Rational: If QUILT_PATCHES and QUILT_PC are set to the same directory, the awk script in filenames_in_patch (in scripts/patchfns) will break with a '<patchname> is a directory' error. Patch provided by anonymous in #30956 on savannah
* Fix auto-generation of quilt.1 to work with dashMartin Quinson2012-01-011-5/+5
| | | | | | | | | | | | | | | | | | | The echo command of dash interprets \f as a special characer and thus generates a bad manual page. bash's echo leaves them unchanged (it needs -e to replace those special characters). Using printf instead is a portable solution that work with both shells. . The code also uses a bashism ($'') but it's not really needed with GNU sed at least (it understands \t and \n) so drop it and avoid some painful double escaping. . This patch was written by Raphael Hertzog for the Debian package, and updated by Martin Quinson so that it applies on lastest upstream sources. Author: Raphael Hertzog <hertzog@debian.org> Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/quilt/+bug/402237 Bug-Debian: http://bugs.debian.org/563517
* Makefile.in: Really skip setting execute bit on scripts/patchfnsJean Delvare2011-12-162-1/+6
|
* configure*, Makefile.in: Use the standard docdir definitionJean Delvare2011-12-164-17/+15
| | | | | That way, it can be easily changed from the command line, which was not the case before.
* Let git not ignore quilt/scriptsJean Delvare2011-12-151-0/+1
|
* Don't let TMPDIR take over /var/tmpJean Delvare2011-12-152-1/+6
| | | | | | | | | | | | | | | | | TMPDIR is set to /tmp by default on some systems [1], in this case letting it take over /var/tmp voids the point of using /var/tmp for data size reasons in the first place [2]. I'd rather hardcode /var/tmp. But in case someone really wants to control this, we can check if VARTMPDIR is set and use that if it is set. [1] I tried to track down how it was happening and I am far from certain that this is on purpose. I've seen it happen only on local graphical login, not on text console login nor remote login. This suggests a leak from some piece of the graphical desktop stack. And I've seen it on both KDE and Gnome, but not Xfce. Go figure. [2] This is the reason given in commit d4074d26276b9a2d452563dbf57ed497afa7b710 for using /var/tmp.
* inspect: File name "-" means "read from stdin" for tarJean Delvare2011-12-152-0/+8
|
* inspect: Consistently use ${TMPDIR:-...} when testing if TMPDIR is setJean Delvare2011-12-082-1/+7
|
* configure*: Honor $TMPDIR if setJean Delvare2011-12-083-2/+7
|
* quilt mail: Fix delivery address checkingAndreas Gruenbacher2011-12-071-2/+3
| | | | | Make sure to remove trailing whitespace (including the newline) when extracting recipient addresses from headers.
* Man page: substitute documentation directory name in path to PDF documentationJean Delvare2011-12-063-1/+11
|
* Set version to 0.50.v0.50Jean Delvare2011-12-053-10/+15
|