diff -Nru alacarte-3.11.91/debian/changelog alacarte-3.11.91/debian/changelog --- alacarte-3.11.91/debian/changelog 2014-06-03 12:29:03.000000000 +0000 +++ alacarte-3.11.91/debian/changelog 2014-10-26 16:01:53.000000000 +0000 @@ -1,3 +1,15 @@ +alacarte (3.11.91-2) unstable; urgency=medium + + [ Pedro Beja ] + * Add debian/patches/40-itemeditor-command-validation.patch + - Fix bad command validation, thanks to OmegaPhil + (Closes: #736166, #752671) + + [ Dmitry Shachnev ] + * Add a patch to fix TabError when importing MainWindow module. + + -- Dmitry Shachnev Sun, 26 Oct 2014 18:58:48 +0300 + alacarte (3.11.91-1) unstable; urgency=medium * Team upload. diff -Nru alacarte-3.11.91/debian/control alacarte-3.11.91/debian/control --- alacarte-3.11.91/debian/control 2014-06-03 12:29:49.000000000 +0000 +++ alacarte-3.11.91/debian/control 2014-10-26 16:04:06.000000000 +0000 @@ -2,12 +2,11 @@ # # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. - Source: alacarte Section: utils Priority: optional Maintainer: Debian GNOME Maintainers -Uploaders: Andreas Henriksson , Emilio Pozuelo Monfort , Josselin Mouette , Laurent Bigonville , Michael Biebl +Uploaders: Andreas Henriksson , Dmitry Shachnev , Iain Lane , Josselin Mouette , Laurent Bigonville , Michael Biebl Build-Depends: cdbs (>= 0.4.90~), autotools-dev, debhelper (>= 8), diff -Nru alacarte-3.11.91/debian/patches/40-itemeditor-command-validation.patch alacarte-3.11.91/debian/patches/40-itemeditor-command-validation.patch --- alacarte-3.11.91/debian/patches/40-itemeditor-command-validation.patch 1970-01-01 00:00:00.000000000 +0000 +++ alacarte-3.11.91/debian/patches/40-itemeditor-command-validation.patch 2014-10-26 16:01:53.000000000 +0000 @@ -0,0 +1,30 @@ +Description: fix bad command validation +Origin: upstream + https://git.gnome.org/browse/alacarte/commit/?id=665b4715000e4f6b + https://git.gnome.org/browse/alacarte/commit/?id=ca7d05cc060e0a31 +Last-Update: 2014-10-26 + +--- a/Alacarte/ItemEditor.py ++++ b/Alacarte/ItemEditor.py +@@ -179,10 +179,20 @@ + self.builder.get_object('name-entry').connect('changed', self.resync_validity) + self.builder.get_object('exec-entry').connect('changed', self.resync_validity) + ++ def exec_line_is_valid(self, exec_text): ++ try: ++ success, parsed = GLib.shell_parse_argv(exec_text) ++ ++ # Make sure program (first part of the command) is in the path ++ command = parsed[0] ++ return (GLib.find_program_in_path(command) is not None) ++ except GLib.GError: ++ return False ++ + def resync_validity(self, *args): + name_text = self.builder.get_object('name-entry').get_text() + exec_text = self.builder.get_object('exec-entry').get_text() +- valid = (name_text != "" and GLib.find_program_in_path(exec_text) is not None) ++ valid = (name_text != "" and self.exec_line_is_valid(exec_text)) + self.builder.get_object('ok').set_sensitive(valid) + + def load(self): diff -Nru alacarte-3.11.91/debian/patches/fix_indentation.patch alacarte-3.11.91/debian/patches/fix_indentation.patch --- alacarte-3.11.91/debian/patches/fix_indentation.patch 1970-01-01 00:00:00.000000000 +0000 +++ alacarte-3.11.91/debian/patches/fix_indentation.patch 2014-10-26 16:01:53.000000000 +0000 @@ -0,0 +1,15 @@ +Description: fix TabError when trying to import MainWindow +Origin: upstream, https://git.gnome.org/browse/alacarte/commit/?id=02582212ecdf0da1 +Last-Update: 2014-10-26 + +--- a/Alacarte/MainWindow.py ++++ b/Alacarte/MainWindow.py +@@ -240,7 +240,7 @@ + menu_tree.get_selection().select_path((0,)) + else: + parent = menus[iter][2] +- file_name = util.getUniqueFileId('alacarte-made', '.directory') ++ file_name = util.getUniqueFileId('alacarte-made', '.directory') + file_path = os.path.join(util.getUserDirectoryPath(), file_name) + + editor = DirectoryEditor(self.main_window, file_path) diff -Nru alacarte-3.11.91/debian/patches/series alacarte-3.11.91/debian/patches/series --- alacarte-3.11.91/debian/patches/series 2013-10-03 20:03:24.000000000 +0000 +++ alacarte-3.11.91/debian/patches/series 2014-10-26 16:01:53.000000000 +0000 @@ -1,2 +1,4 @@ 03-bind_textdomain_codeset.patch 30-python_private_dir.patch +40-itemeditor-command-validation.patch +fix_indentation.patch