summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-09-07 16:24:24 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-09-07 16:24:24 (EDT)
commitd0368aca09e21b00c3a04157bddebdf3bf3bd9d2 (patch)
treebfa8bfdd6bb049b4a3d1104a29cd95885a94b688 /src
parent09ba922f5b7f35f975409b5c56bc0cbb1d123941 (diff)
ob-applypatches: Only run if sources were found.
The following can happen, for example, when using a "source" target to download upstream sources: $ opkbuild -bCT source [...] ob-unpacksource: No native or upstream sources found ob-applypatches: Applying patch "01_fix-ob-applypatches-to-work-with-busybox.patch"... /usr/local/bin/ob-applypatches: 53: cd: can't cd to src patch: **** Can't open patch file ../../patches/01_fix-ob-applypatches-to-work-with-busybox.patch : No such file or directory ob-applypatches: Error: Can't apply patch "01_fix-ob-applypatches-to-work-with-busybox.patch" [...]
Diffstat (limited to 'src')
-rw-r--r--src/ob-applypatches.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh
index c5039d5..a53d390 100644
--- a/src/ob-applypatches.sh
+++ b/src/ob-applypatches.sh
@@ -39,7 +39,7 @@ apply_patches()
{
applied='false'
- if [ -d '../patches' ]; then
+ if [ -d '../patches' ] && [ -d 'src' ]; then
# Iterate over patches ordered alphabetically by name.
# POSIX.1-2008 says that the results of a pathname expansion shall be
# "sorted according to the collating sequence in effect in the current