From d0368aca09e21b00c3a04157bddebdf3bf3bd9d2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 07 Sep 2013 16:24:24 -0400 Subject: 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" [...] --- (limited to 'src/ob-applypatches.sh') 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 -- cgit v0.9.1