All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] sanity: Make the required utilities more platform specific.
@ 2013-01-10  8:50 Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 2/5] quilt: Remove non-gnu.patch, and added configure flags for darwin Martin Ertsaas
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-10  8:50 UTC (permalink / raw)
  To: openembedded-core

This might make us able to build on mac os X.

Signed-off-by: Martin Ertsaas <martiert@gmail.com>
---
 meta/classes/sanity.bbclass |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 0ffa52d..03651be 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -2,7 +2,9 @@
 # Sanity check the users setup for common misconfigurations
 #
 
-SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio"
+SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk wget cpio"
+SANITY_REQUIRED_UTILITIES_Linux ?= "${SANITY_REQUIRED_UTILITIES} chrpath"
+SANITY_REQUIRED_UTILITIES_Darwin ?= "${SANITY_REQUIRED_UTILITIES} install_name_tool"
 
 python check_bblayers_conf() {
     bblayers_fn = os.path.join(d.getVar('TOPDIR', True), 'conf/bblayers.conf')
@@ -340,6 +342,10 @@ def check_sanity_validmachine(sanity_data):
 
     return messages
 
+def get_required_utilities(sanity_data):
+    import platform
+    sanity_var = 'SANITY_REQUIRED_UTILITIES_%s' %platform.system()
+    return sanity_data.getVar(sanity_var, True)
 
 def check_sanity(sanity_data):
     import subprocess
@@ -444,7 +450,7 @@ def check_sanity(sanity_data):
     if not check_app_exists('${BUILD_PREFIX}g++', sanity_data):
         missing = missing + "C++ Compiler (%sg++)," % sanity_data.getVar("BUILD_PREFIX", True)
 
-    required_utilities = sanity_data.getVar('SANITY_REQUIRED_UTILITIES', True)
+    required_utilities = get_required_utilities(sanity_data)
 
     if "qemu-native" in assume_provided:
         if not check_app_exists("qemu-arm", sanity_data):
-- 
1.7.10.2 (Apple Git-33)




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] quilt: Remove non-gnu.patch, and added configure flags for darwin.
  2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
@ 2013-01-10  8:50 ` Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 3/5] quilt: Don't use BUILD_ROOT on darwin Martin Ertsaas
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-10  8:50 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/quilt/quilt-0.60.inc      |    4 +
 meta/recipes-devtools/quilt/quilt-native.inc    |    1 -
 meta/recipes-devtools/quilt/quilt/non-gnu.patch |  225 -----------------------
 3 files changed, 4 insertions(+), 226 deletions(-)
 delete mode 100644 meta/recipes-devtools/quilt/quilt/non-gnu.patch

diff --git a/meta/recipes-devtools/quilt/quilt-0.60.inc b/meta/recipes-devtools/quilt/quilt-0.60.inc
index 1e240a0..e0a2e51 100644
--- a/meta/recipes-devtools/quilt/quilt-0.60.inc
+++ b/meta/recipes-devtools/quilt/quilt-0.60.inc
@@ -12,6 +12,10 @@ SRC_URI[sha256sum] = "3d72a292e432beb9a73f9d0acfe3a77c9b4d7e42209919bb244e9958c7
 
 inherit autotools
 
+EXTRA_OECONF_darwin += "--without-date \
+                        --without-getopt \
+                        "
+
 PACKAGES += "guards guards-doc"
 FILES_${PN} = "${sysconfdir} ${datadir}/quilt \
                ${bindir}/quilt ${libdir}/quilt"
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
index 9345d88..5c4b0a2 100644
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -1,4 +1,3 @@
-SRC_URI_append_build-darwin = "?   file://non-gnu.patch "
 RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native"
 
 INHIBIT_AUTOTOOLS_DEPS = "1"
diff --git a/meta/recipes-devtools/quilt/quilt/non-gnu.patch b/meta/recipes-devtools/quilt/quilt/non-gnu.patch
deleted file mode 100644
index 520bf52..0000000
--- a/meta/recipes-devtools/quilt/quilt/non-gnu.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-Upstream-Status: Pending
-
-Patch is from the Fink projetc (http://fink.sf.net)
-
-diff -r 7b51c215fc54 Makefile.in
---- a/Makefile.in	Sat Mar  4 17:16:21 2006 -0800
-+++ b/Makefile.in	Sat Mar  4 17:59:09 2006 -0800
-@@ -256,7 +256,7 @@ bin/guards.1 : bin/guards
- 		-e 's:@VERSION''@:$(VERSION):g'				\
- 		-e 's:@RELEASE''@:$(RELEASE):g'				\
- 		-e 's:@LOCALEDIR''@:$(localedir):g'			\
--		-e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE)-$(VERSION):g'	\
-+		-e 's:@DOCSUBDIR''@:$(docdir)/$(PACKAGE):g'	\
- 		$< > $@
- 	@$(if $(filter-out $<,$(NON_EXEC_IN)),chmod +x $@)
- 
-@@ -320,11 +320,11 @@ endif
- 	$(INSTALL) -d $(BUILD_ROOT)$(libdir)/$(PACKAGE)
- 	$(INSTALL) -m 755 $(LIB:%=lib/%) $(BUILD_ROOT)$(libdir)/$(PACKAGE)/
- 
--	$(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
-+	$(INSTALL) -d $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
- 	$(INSTALL) -m 644 doc/README					\
--		   $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
-+		   $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
- 	$(INSTALL) -m 644 doc/quilt.pdf doc/README.MAIL			\
--		   $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
-+		   $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
- 
- 	$(INSTALL) -d $(BUILD_ROOT)$(mandir)/man1
- 	$(INSTALL) -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
-@@ -367,7 +367,7 @@ uninstall ::
- 		   $(notdir $(MAN1)))					\
- 	       $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt		\
- 	       $(BUILD_ROOT)$(etcdir)/quilt.quiltrc			\
--	       $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
-+	       $(BUILD_ROOT)$(docdir)/$(PACKAGE)/
- 
- check: $(TESTS:test/%.test=test/.%.ok)
- check-all: $(TESTS:test/%.test=check-%)
-diff -r 7b51c215fc54 configure
---- a/configure	Sat Mar  4 17:16:21 2006 -0800
-+++ b/configure	Sat Mar  4 17:59:09 2006 -0800
-@@ -3882,29 +3882,6 @@ echo "$as_me: error: Please specify the 
-   fi
- 
- 
--echo "$as_me:$LINENO: checking whether $CP -l works" >&5
--echo $ECHO_N "checking whether $CP -l works... $ECHO_C" >&6
--touch conftest.1
--if $CP -l conftest.1 conftest.2 2>/dev/null; then
--	echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6
--else
--	{ { echo "$as_me:$LINENO: error: no
--
--You appear to have a \`cp' that does not support hard links.
--You can download GNU fileutils from ftp.gnu.org
--" >&5
--echo "$as_me: error: no
--
--You appear to have a \`cp' that does not support hard links.
--You can download GNU fileutils from ftp.gnu.org
--" >&2;}
--   { (exit 1); exit 1; }; }
--fi
--
--
--
--
- 
- # Check whether --with-date or --without-date was given.
- if test "${with_date+set}" = set; then
-@@ -3999,32 +3976,6 @@ echo "$as_me: WARNING: Using internal da
-       INTERNAL_DATE=1
- 
-   fi
--
--
--
--if test -z "$INTERNAL_DATE"; then
--  echo "$as_me:$LINENO: checking whether $DATE --rfc-822 works" >&5
--echo $ECHO_N "checking whether $DATE --rfc-822 works... $ECHO_C" >&6
--  if $DATE --rfc-822 >/dev/null 2>/dev/null; then
--	echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6
--  else
--	{ { echo "$as_me:$LINENO: error: no
--
--If you don't have a version of \`date' that supports --rfc-822, you
--can specify '--without-date' and $PACKAGE_NAME will use its own
--internal date.
--" >&5
--echo "$as_me: error: no
--
--If you don't have a version of \`date' that supports --rfc-822, you
--can specify '--without-date' and $PACKAGE_NAME will use its own
--internal date.
--" >&2;}
--   { (exit 1); exit 1; }; }
--  fi
--fi
--
- 
- 
- 
-diff -r 7b51c215fc54 quilt/diff.in
---- a/quilt/diff.in	Sat Mar  4 17:16:21 2006 -0800
-+++ b/quilt/diff.in	Sat Mar  4 17:59:09 2006 -0800
-@@ -303,7 +303,7 @@ then
- 
- 	if [ ${#files[@]} -gt 0 ] \
- 	   && ! ( cd $QUILT_PC/$last_patch &&
--		  cp -l --parents "${files[@]}" $workdir/ )
-+		  mycpl $workdir/ "${files[@]}" )
- 	then
- 		printf $"Failed to copy files to temporary directory\n" >&2
- 		die 1
-diff -r 7b51c215fc54 quilt/mail.in
---- a/quilt/mail.in	Sat Mar  4 17:16:21 2006 -0800
-+++ b/quilt/mail.in	Sat Mar  4 17:59:09 2006 -0800
-@@ -64,7 +64,7 @@ with a template for the introduction. Pl
- 
- msgid()
- {
--	local timestamp=$(date --utc "+%Y%m%d%H%M%S.%N")
-+	local timestamp=$(date -u "+%Y%m%d%H%M%S.000000000")
- 	echo "$timestamp@${opt_sender#*@}"
- }
- 
-@@ -334,7 +334,7 @@ introduction="$(gen_tempfile)"
- 	cat <<-EOF
- 	Message-Id: <$(msgid)>
- 	User-Agent: quilt/@VERSION@-@RELEASE@
--	Date: $(date --rfc-822)
-+	Date: $(date '+%a, %d %b %Y %H:%M:%S %z')
- 	From: ${opt_from:-$opt_sender}
- 	To: $(IFS=,; echo "${opt_to[*]}")
- 	Cc: $(IFS=,; echo "${opt_cc[*]}")
-@@ -401,7 +401,11 @@ fi
- # increment the timestamp by one second and wait with sending until
- # that time has arrived. This allows MUAs to show the messages in the
- # correct order.
--last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
-+#last_ts=$(date '+%s' -d "$(sed -ne $'s/^Date:[ \t]*//p' $introduction)")
-+# fink has no date available that does -d, so we fudge with the time now.
-+# If the user edits the date field in the message patch 0 could end up
-+# out of order wrt the actual patches. just a minor cosmetic nit.
-+last_ts=$(date '+%s')
- 
- num=1
- for patch in "${patches[@]}"; do
-@@ -412,7 +416,7 @@ for patch in "${patches[@]}"; do
- 	#	sleep 1
- 	#done
- 	((last_ts++))
--	new_date="$(date --rfc-822 -d "1970/01/01 UTC $last_ts seconds")"
-+	new_date="$(date -r $last_ts '+%a, %d %b %Y %H:%M:%S %z')"
- 
- 	modify="$(awk '
- 	sub(/^Recipient-/, "")	{ r = $0
-diff -r 7b51c215fc54 quilt/pop.in
---- a/quilt/pop.in	Sat Mar  4 17:16:21 2006 -0800
-+++ b/quilt/pop.in	Sat Mar  4 17:59:09 2006 -0800
-@@ -93,7 +93,7 @@ check_for_pending_changes()
- 	if [ -d $QUILT_PC/$patch ]
- 	then
- 		if ! rmdir $workdir ||  # note that this is racey...
--		   ! cp -rl $QUILT_PC/$patch $workdir
-+		   ! (for i in "$(find "$QUILT_PC/$patch" -type f)"; do mycpl $workdir $i; done)
- 		then
- 			printf $"Failed to copy files to temporary directory\n" >&2
- 			rm -rf $workdir
-diff -r 7b51c215fc54 quilt/scripts/patchfns.in
---- a/quilt/scripts/patchfns.in	Sat Mar  4 17:16:21 2006 -0800
-+++ b/quilt/scripts/patchfns.in	Sat Mar  4 17:59:09 2006 -0800
-@@ -45,6 +45,28 @@ fi
- fi
- 
- # ========================================================
-+
-+dater()
-+{
-+  ts=$(perl -e '@st = stat($ARGV[0]); print $st[9];' "$1")
-+  fmt=$(date -r $ts "$2")
-+
-+  echo $fmt
-+}
-+
-+mycpl ()
-+{
-+  target=$1
-+  shift;
-+
-+  for src in "$@"
-+  do
-+    srcdir="${src%/*}"
-+    test -n "$srcdir" && mkdir -p "$target/$srcdir"
-+    ln $src "$target/$src"
-+  done
-+}
-+
- 
- #declare -a exit_handlers
- #
-@@ -669,8 +691,7 @@ diff_file()
- 		|| old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
- 	else
- 		[ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
--		|| old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
--					-r "$old_file")
-+		|| old_date=$'\t'$(dater "$old_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
- 	fi
- 	if ! [ -s "$new_file" ]
- 	then
-@@ -682,8 +703,7 @@ diff_file()
- 		|| new_date=$'\t'"1970-01-01 00:00:00.000000000 +0000"
- 	else
- 		[ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \
--		|| new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \
--					-r "$new_file")
-+		|| new_date=$'\t'$(dater "$new_file" +'%Y-%m-%d %H:%M:%S.000000000 %z')
- 	fi
- 
- 	diff $QUILT_DIFF_OPTS $old_file $new_file \
-- 
1.7.10.2 (Apple Git-33)




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] quilt: Don't use BUILD_ROOT on darwin.
  2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 2/5] quilt: Remove non-gnu.patch, and added configure flags for darwin Martin Ertsaas
@ 2013-01-10  8:50 ` Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory Martin Ertsaas
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-10  8:50 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/quilt/quilt-0.60.inc |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/quilt/quilt-0.60.inc b/meta/recipes-devtools/quilt/quilt-0.60.inc
index e0a2e51..5fe201f 100644
--- a/meta/recipes-devtools/quilt/quilt-0.60.inc
+++ b/meta/recipes-devtools/quilt/quilt-0.60.inc
@@ -25,9 +25,12 @@ FILES_guards-doc = "${mandir}/man1/guards.1"
 
 RDEPENDS_${PN} = "bash"
 
+EXTRA_OE_MAKE_ARGS_darwin ?= ""
+EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
+
 # quilt ignores DESTDIR
 do_install () {
-	oe_runmake 'BUILD_ROOT=${D}' install
+	oe_runmake ${EXTRA_OE_MAKE_ARGS} install
 	# cleanup unpackaged files
 	rm -rf ${D}/${datadir}/emacs
 }
-- 
1.7.10.2 (Apple Git-33)




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory.
  2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 2/5] quilt: Remove non-gnu.patch, and added configure flags for darwin Martin Ertsaas
  2013-01-10  8:50 ` [PATCH 3/5] quilt: Don't use BUILD_ROOT on darwin Martin Ertsaas
@ 2013-01-10  8:50 ` Martin Ertsaas
  2013-01-10 14:15   ` Chris Larson
  2013-01-10  8:50 ` [PATCH 5/5] sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported Martin Ertsaas
  2013-01-15  8:14 ` [PATCH 1/5] sanity: Make the required utilities more platform specific Richard Purdie
  4 siblings, 1 reply; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-10  8:50 UTC (permalink / raw)
  To: openembedded-core

On mac, os.unlink can not be done to remove directories, and so we have to
explicitly use shutil.rmtree instead to support mac.
---
 meta/lib/oe/path.py |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
index 7197b23..1da39b7 100644
--- a/meta/lib/oe/path.py
+++ b/meta/lib/oe/path.py
@@ -86,14 +86,7 @@ def copytree(src, dst):
 
 def remove(path, recurse=True):
     """Equivalent to rm -f or rm -rf"""
-    for name in glob.glob(path):
-        try:
-            os.unlink(name)
-        except OSError, exc:
-            if recurse and exc.errno == errno.EISDIR:
-                shutil.rmtree(name)
-            elif exc.errno != errno.ENOENT:
-                raise
+    bb.utils.remove(path, recurse)
 
 def symlink(source, destination, force=False):
     """Create a symbolic link"""
-- 
1.7.10.2 (Apple Git-33)




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported.
  2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
                   ` (2 preceding siblings ...)
  2013-01-10  8:50 ` [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory Martin Ertsaas
@ 2013-01-10  8:50 ` Martin Ertsaas
  2013-01-15  8:14 ` [PATCH 1/5] sanity: Make the required utilities more platform specific Richard Purdie
  4 siblings, 0 replies; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-10  8:50 UTC (permalink / raw)
  To: openembedded-core

---
 meta/classes/sstate.bbclass |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 68fd996..e92fbae 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -368,7 +368,7 @@ python sstate_cleanall() {
 }
 
 def sstate_hardcode_path(d):
-    import subprocess
+    import subprocess, platform
 
     # Need to remove hardcoded paths and fix these when we install the
     # staging packages.
@@ -390,7 +390,7 @@ def sstate_hardcode_path(d):
     else:
         sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
         sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
-    
+
     fixmefn =  sstate_builddir + "fixmepath"
 
     sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)
@@ -399,9 +399,13 @@ def sstate_hardcode_path(d):
     # fixmepath file needs relative paths, drop sstate_builddir prefix
     sstate_filelist_relative_cmd = "sed -i -e 's:^%s::g' %s" % (sstate_builddir, fixmefn)
 
+    xargs_no_empty_run_cmd = '--no-run-if-empty'
+    if platform.system() == 'Darwin':
+        xargs_no_empty_run_cmd = ''
+
     # Limit the fixpaths and sed operations based on the initial grep search
     # This has the side effect of making sure the vfs cache is hot
-    sstate_hardcode_cmd = "%s | xargs %s | %s | xargs --no-run-if-empty %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, sstate_sed_cmd)
+    sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
 
     print "Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd)
     subprocess.call(sstate_hardcode_cmd, shell=True)
-- 
1.7.10.2 (Apple Git-33)




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory.
  2013-01-10  8:50 ` [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory Martin Ertsaas
@ 2013-01-10 14:15   ` Chris Larson
  2013-01-11  6:27     ` Martin Ertsaas
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Larson @ 2013-01-10 14:15 UTC (permalink / raw)
  To: Martin Ertsaas; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

On Thu, Jan 10, 2013 at 1:50 AM, Martin Ertsaas <martiert@gmail.com> wrote:

> On mac, os.unlink can not be done to remove directories, and so we have to
> explicitly use shutil.rmtree instead to support mac.
>

As pointed out for the bitbake patch, the functions can already handle this
case if you pass recurse=True, and mac isn't at all special in this context.
-- 
Christopher Larson

[-- Attachment #2: Type: text/html, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory.
  2013-01-10 14:15   ` Chris Larson
@ 2013-01-11  6:27     ` Martin Ertsaas
  2013-01-11 14:55       ` Chris Larson
  0 siblings, 1 reply; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-11  6:27 UTC (permalink / raw)
  To: Chris Larson; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

On 01/10/13 15:15, Chris Larson wrote:
>
> On Thu, Jan 10, 2013 at 1:50 AM, Martin Ertsaas <martiert@gmail.com
> <mailto:martiert@gmail.com>> wrote:
>
>     On mac, os.unlink can not be done to remove directories, and so we
>     have to
>     explicitly use shutil.rmtree instead to support mac.
>
>
> As pointed out for the bitbake patch, the functions can already handle
> this case if you pass recurse=True, and mac isn't at all special in
> this context.
> -- 
> Christopher Larson
True. In this case though, I feel the patch is still valid though, and
that I should instead change the commit message. What I want from this
patch, as I see it again now, is to not duplicate the same code in both
bitbake and oe-core, when the oe-core function 'remove' can just be
calling bb.utils.remove. So personally I still want this patch, I just
wish to change the commit message to something sane. Agreed?

- Martin

[-- Attachment #2: Type: text/html, Size: 1946 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory.
  2013-01-11  6:27     ` Martin Ertsaas
@ 2013-01-11 14:55       ` Chris Larson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Larson @ 2013-01-11 14:55 UTC (permalink / raw)
  To: Martin Ertsaas; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

On Thu, Jan 10, 2013 at 11:27 PM, Martin Ertsaas <martiert@gmail.com> wrote:

>  On 01/10/13 15:15, Chris Larson wrote:
>
>
> On Thu, Jan 10, 2013 at 1:50 AM, Martin Ertsaas <martiert@gmail.com>wrote:
>
>> On mac, os.unlink can not be done to remove directories, and so we have to
>> explicitly use shutil.rmtree instead to support mac.
>>
>
>  As pointed out for the bitbake patch, the functions can already handle
> this case if you pass recurse=True, and mac isn't at all special in this
> context.
>  --
> Christopher Larson
>
> True. In this case though, I feel the patch is still valid though, and
> that I should instead change the commit message. What I want from this
> patch, as I see it again now, is to not duplicate the same code in both
> bitbake and oe-core, when the oe-core function 'remove' can just be calling
> bb.utils.remove. So personally I still want this patch, I just wish to
> change the commit message to something sane. Agreed?
>

Agreed.
-- 
Christopher Larson

[-- Attachment #2: Type: text/html, Size: 2141 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] sanity: Make the required utilities more platform specific.
  2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
                   ` (3 preceding siblings ...)
  2013-01-10  8:50 ` [PATCH 5/5] sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported Martin Ertsaas
@ 2013-01-15  8:14 ` Richard Purdie
  2013-01-15  9:07   ` Martin Ertsaas
  4 siblings, 1 reply; 10+ messages in thread
From: Richard Purdie @ 2013-01-15  8:14 UTC (permalink / raw)
  To: Martin Ertsaas; +Cc: openembedded-core

On Thu, 2013-01-10 at 09:50 +0100, Martin Ertsaas wrote:
> This might make us able to build on mac os X.
> 
> Signed-off-by: Martin Ertsaas <martiert@gmail.com>
> ---
>  meta/classes/sanity.bbclass |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 0ffa52d..03651be 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -2,7 +2,9 @@
>  # Sanity check the users setup for common misconfigurations
>  #
>  
> -SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk chrpath wget cpio"
> +SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar gzip gawk wget cpio"
> +SANITY_REQUIRED_UTILITIES_Linux ?= "${SANITY_REQUIRED_UTILITIES} chrpath"
> +SANITY_REQUIRED_UTILITIES_Darwin ?= "${SANITY_REQUIRED_UTILITIES} install_name_tool"

You should be able to make this:

SANITY_REQUIRED_UTILITIES_COMMON ?= "patch diffstat makeinfo git bzip2 tar gzip gawk wget cpio"
SANITY_REQUIRED_UTILITIES ?= "${SANITY_REQUIRED_UTILITIES_COMMON} chrpath"
SANITY_REQUIRED_UTILITIES_build-darwin ?= "${SANITY_REQUIRED_UTILITIES_COMMON} install_name_tool"

which will then simplify the other part of the patch (make it
unnecessary).

Before we go and merge a ton of these type of changes I'd also like to
understand how close we are to making this work?

Cheers,

Richard




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] sanity: Make the required utilities more platform specific.
  2013-01-15  8:14 ` [PATCH 1/5] sanity: Make the required utilities more platform specific Richard Purdie
@ 2013-01-15  9:07   ` Martin Ertsaas
  0 siblings, 0 replies; 10+ messages in thread
From: Martin Ertsaas @ 2013-01-15  9:07 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On 01/15/13 09:14, Richard Purdie wrote:
> which will then simplify the other part of the patch (make it
> unnecessary).
That is true, will make it a lot simpler.

What I know is still missing:

1) There are some errors with the paths, seems like stuff is not
correctly transfered to the sysroot, this is next on the agenda.
2) Make a class that does what chrpath does, but for install_name_tool,
going to do this as soon as I get an error on it.
3) Probably some errors after I get past the error I have now.

I agree that we should not merge a ton of these patches.

For my part, I can keep these in my repository until I have stuff
working. When we can compile everything I can do a pull request. If
someone wants to help, they can just pull from me and work against that
repo.

- Martin



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-01-15  9:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-10  8:50 [PATCH 1/5] sanity: Make the required utilities more platform specific Martin Ertsaas
2013-01-10  8:50 ` [PATCH 2/5] quilt: Remove non-gnu.patch, and added configure flags for darwin Martin Ertsaas
2013-01-10  8:50 ` [PATCH 3/5] quilt: Don't use BUILD_ROOT on darwin Martin Ertsaas
2013-01-10  8:50 ` [PATCH 4/5] lib/oe/path.py: Use shutil.rmtree if the path we wish to remove is a directory Martin Ertsaas
2013-01-10 14:15   ` Chris Larson
2013-01-11  6:27     ` Martin Ertsaas
2013-01-11 14:55       ` Chris Larson
2013-01-10  8:50 ` [PATCH 5/5] sstate: Do not add the --no-run-if-empty arguement to xargs when on Darwin, as it is not supported Martin Ertsaas
2013-01-15  8:14 ` [PATCH 1/5] sanity: Make the required utilities more platform specific Richard Purdie
2013-01-15  9:07   ` Martin Ertsaas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.