O Mon, Oct 02, 2023 at 03:19:12AM -0700, Breno Leitao wrote:
> On Mon, Sep 18, 2023 at 06:07:54PM +0100, William de Abreu Pinho wrote:
> > I am completely new to maintenance and this is my first attempt to submit a 
> > patch.
> > 
> > Please find attached the proposed changes, I hope these will suffice.
> 
> Thanks for the fix. As we had discussed in person, please attach the
> .debdiff and I will ship a new package with this fix.
> 
> Thanks for your contribution to Debian.

Sure, here is the debdiff for the new version.

Thanks,
William
diff -u cappuccino-0.5.1/debian/changelog cappuccino-0.5.1/debian/changelog
--- cappuccino-0.5.1/debian/changelog
+++ cappuccino-0.5.1/debian/changelog
@@ -1,3 +1,9 @@
+cappuccino (0.5.1-11) unstable; urgency=medium
+
+  * Fix polygen not found when running cappuccino as root. Closes: #1008564 
+
+ -- William de Abreu Pinho <william.dap.deb...@gmail.com>  Mon, 18 Sep 2023 13:43:33 +0100
+
 cappuccino (0.5.1-10.1) unstable; urgency=medium
 
   * Non-maintainer upload.
only in patch2:
unchanged:
--- cappuccino-0.5.1.orig/debian/patches/polygen_not_found.patch
+++ cappuccino-0.5.1/debian/patches/polygen_not_found.patch
@@ -0,0 +1,31 @@
+Fix polygen not found when running cappuccino as root.
+--- a/cappuccino
++++ b/cappuccino
+@@ -20,14 +20,16 @@
+ except OSError:
+ 	PLUGIN_DIR = "/usr/share/cappuccino/"
+ 
++POLYGEN_PATHNAME = "/usr/games/polygen"
++
+ # text to see if polygen is available
+-if not os.access("/usr/games/polygen",os.X_OK):
++if not os.access(POLYGEN_PATHNAME,os.X_OK):
+ 	print ("Error: polygen must be installed")
+ 	print ("See http://www.polygen.org";)
+ 	sys.exit(1)
+ 
+ # to be discussed
+-pipe_command = 'polygen %s' % os.path.join(PLUGIN_DIR, 'cappuccino.grm')
++pipe_command = '%s %s' % (POLYGEN_PATHNAME, os.path.join(PLUGIN_DIR, 'cappuccino.grm'))
+ 
+ class CappuccinoSplash(Gtk.Window):
+ 	def __init__(self):
+@@ -94,7 +96,7 @@
+ 		GObject.source_remove(self.timeouter)
+ 
+ 	def get_log_data(self):
+-		p = os.popen("polygen -X 50 %s" % os.path.join(PLUGIN_DIR,"compileline.grm"))
++		p = os.popen("%s -X 50 %s" % (POLYGEN_PATHNAME, os.path.join(PLUGIN_DIR,"compileline.grm")))
+ 		self.log = p.readlines()
+ 		p.close()
+ 

Reply via email to