0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From cba901945c5a6da9586550498f8e3787c57c3098 Mon Sep 17 00:00:00 2001
  2. From: Athanasios Oikonomou <athoik@gmail.com>
  3. Date: Fri, 17 Feb 2017 21:04:04 +0200
  4. Subject: [PATCH] fix lsb_release to work with busybox head and find
  5. Upstream-Status: Inappropriate [oe-core specific]
  6. Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
  7. diff --git a/lsb_release b/lsb_release
  8. index e7d6024..233b8c1 100755
  9. --- a/lsb_release
  10. +++ b/lsb_release
  11. @@ -209,7 +209,7 @@ EASE ($DISTRIB_CODENAME)"
  12. || [ -n "$(echo $DISTRIB_DESCRIPTION | \
  13. sed -e "s/.*$DESCSTR_DELI.*//")" ]
  14. then
  15. - TMP_DISTRIB_DESC=$(head -1 $FILENAME 2>/dev/null)
  16. + TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null)
  17. [ -z "$DISTRIB_DESCRIPTION" ] \
  18. && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC
  19. else
  20. @@ -249,10 +249,10 @@ GetDistribInfo() {
  21. then
  22. CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \
  23. -name \*$INFO_DISTRIB_SUFFIX \
  24. - -and ! -name $INFO_LSB_FILE \
  25. - -and -type f \
  26. + -type f \
  27. 2>/dev/null \
  28. - | head -1 ) # keep one of the files found (if many)
  29. + | grep -v $INFO_LSB_FILE \
  30. + | head -n 1 ) # keep one of the files found (if many)
  31. fi
  32. InitDistribInfo $CHECKFIRST
  33. fi
  34. --
  35. 2.1.4