[OpenWrt-Devel] [PATCH] silence error when package has no patches

Alan Post alanpost at sunflowerriver.org
Sat Oct 9 06:45:37 CEST 2010


My name is Alan Post.  I'm a developer for the NanoNote, which uses
OpenWrt.

I've ported a package that does not need any patches, so I excluded
the patches directory.  This resulted in an error from ls during
make:

  ls: cannot access ./patches: No such file or directory

Here is the url to my commit at qi-hardware:

  http://projects.qi-hardware.com/index.php/p/openwrt-xburst/source/commit/d340b5b5332e0c07b53c46040a11b28fc982bafc/

And here is the patch inlined:

<++> nopatches.diff
diff --git a/include/quilt.mk b/include/quilt.mk
index 598c6f8..6c4839b 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -39,7 +39,7 @@ define PatchDir/Quilt
 endef
 
 define PatchDir/Default
-	@if [ -d "$(2)" -a "$$$$(ls $(2) 2>/dev/null | wc -l)" -gt 0 ]; then \
+	@if [ -d "$(2)" -a "$$$$(ls $(2) | wc -l)" -gt 0 ]; then \
 		if [ -s "$(2)/series" ]; then \
 			$(call filter_series,$(2)/series) | xargs -n1 \
 				$(PATCH) "$(1)" "$(2)"; \
<-->

-Alan
-- 
.i ko djuno fi le do sevzi


More information about the openwrt-devel mailing list