tags 561305 + patch pending
thanks

Dear maintainer,

I've prepared an NMU for patchage (versioned as 0.4.4-1.2) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.
diff -Nru patchage-0.4.4/debian/changelog patchage-0.4.4/debian/changelog
--- patchage-0.4.4/debian/changelog	2010-04-11 16:44:47.000000000 +0200
+++ patchage-0.4.4/debian/changelog	2010-05-15 13:35:49.000000000 +0200
@@ -1,3 +1,13 @@
+patchage (0.4.4-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * debian/patches/hppa_parallel.patch:
+    - Disable parallel build on hppa (Closes: #561305).
+  * debian/rules:
+    - Patch affected files on-the-fly.
+
+ -- Luca Falavigna <dktrkr...@debian.org>  Sat, 15 May 2010 11:34:44 +0000
+
 patchage (0.4.4-1.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru patchage-0.4.4/debian/patches/hppa_parallel.patch patchage-0.4.4/debian/patches/hppa_parallel.patch
--- patchage-0.4.4/debian/patches/hppa_parallel.patch	1970-01-01 01:00:00.000000000 +0100
+++ patchage-0.4.4/debian/patches/hppa_parallel.patch	2010-05-15 13:31:12.000000000 +0200
@@ -0,0 +1,106 @@
+Description: Disable parallel build on hppa architecture.
+Origin: http://code.google.com/p/waf/source/browse/tags/waf-1.5.0/playground/serial.py
+
+--- wafadmin/Runner.py.orig	2009-11-14 22:09:02.000000000 +0000
++++ wafadmin/Runner.py	2010-05-09 16:16:36.000000000 +0000
+@@ -151,3 +151,100 @@
+ 			self.get_out()
+ 		assert(self.count==0 or self.stop)
+ 
++class Serial(object):
++
++	def __init__(self, bld, j=1):
++		self.manager = bld.task_manager
++		self.outstanding = []
++
++		# progress bar
++		self.total = self.manager.total()
++		self.processed = 0
++		self.error = 0
++
++		self.switchflag = 1 # postpone
++		
++		self.consumers = None
++
++	# warning, this one is recursive ..
++	def get_next(self):
++		if self.outstanding:
++			t = self.outstanding.pop(0)
++			self.processed += 1
++			return t
++
++		# handle case where only one wscript exist
++		# that only install files
++		if not self.manager.groups:
++			return None
++
++		(_, self.outstanding) = self.manager.get_next_set()
++		if not self.outstanding: return None
++
++		return self.get_next()
++
++	def postpone(self, tsk):
++		self.processed -= 1
++		self.switchflag *= -1
++		# this actually shuffle the list
++		if self.switchflag>0: self.outstanding.insert(0, tsk)
++		else:                 self.outstanding.append(tsk)
++
++	def start(self):
++		debug('runner: Serial start called')
++		while 1:
++			# get next Task
++			tsk = self.get_next()
++			if tsk is None: break
++
++			if Logs.verbose: debug('runner: retrieving %r' % tsk)
++
++			st = tsk.runnable_status()
++			if st == ASK_LATER:
++				debug('runner: postponing %r' % tsk)
++				self.postpone(tsk)
++				continue
++
++			#continue
++			if st == SKIP_ME:
++				tsk.hasrun = SKIPPED
++				self.manager.add_finished(tsk)
++				continue
++
++			tsk.position = (self.processed, self.total)
++
++			# display the command that we are about to run
++			tsk.generator.bld.printout(tsk.display())
++
++			# run the command
++			if tsk.__class__.stat: ret = tsk.__class__.stat(tsk)
++			else: ret = tsk.run()
++			self.manager.add_finished(tsk)
++
++			# non-zero means something went wrong
++			if ret:
++				self.error = 1
++				tsk.hasrun = CRASHED
++				tsk.err_code = ret
++				if Options.options.keep: continue
++				else: return -1
++
++			try:
++				tsk.post_run()
++			except OSError:
++				self.error = 1
++				tsk.hasrun = MISSING
++				if Options.options.keep: continue
++				else: return -1
++			else:
++				tsk.hasrun = SUCCESS
++
++		if self.error:
++			return -1
++
++import subprocess
++p = subprocess.Popen(['dpkg', '--print-architecture'], stdout=subprocess.PIPE)
++arch = p.stdout.read().strip()
++p.wait()
++if arch == 'hppa':
++	Parallel = Serial
diff -Nru patchage-0.4.4/debian/rules patchage-0.4.4/debian/rules
--- patchage-0.4.4/debian/rules	2010-04-11 16:39:53.000000000 +0200
+++ patchage-0.4.4/debian/rules	2010-05-15 13:33:34.000000000 +0200
@@ -8,6 +8,7 @@
 	dh $@
 
 override_dh_auto_configure:
+	./waf --version && cd .waf*/wafadmin && patch -p1 < $(CURDIR)/debian/patches/hppa_parallel.patch
 	./waf configure --prefix /usr
 
 override_dh_auto_build:
@@ -25,6 +26,7 @@
 
 override_dh_auto_clean:
 	dh clean --before dh_auto_clean
+	./waf --version && cd .waf*/wafadmin && patch -p1 < $(CURDIR)/debian/patches/hppa_parallel.patch
 	./waf configure distclean --prefix /usr
 	-$(RM) -f autowaf.pyc
 	dh clean --after dh_auto_clean

Reply via email to