Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
Hello, I want to upload a fix for bug #884582. The search breaks, if there is a password protected file in the directory. I did a new upstream version in sid, which only contains the fix. The patch is a source debdiff against the current version loook-0.8.4-1 in stable. The changelog entry is against the stable distribution, including Closes statements for the bug that will be fixed by the upload. This is my first request of this kind Mechtide -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (400, 'testing'), (300, 'unstable'), (200, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (charmap=UTF-8)
diff -Nru loook-0.8.4/debian/changelog loook-0.8.4/debian/changelog --- loook-0.8.4/debian/changelog 2016-02-13 17:06:14.000000000 +0100 +++ loook-0.8.4/debian/changelog 2017-12-26 10:55:42.000000000 +0100 @@ -1,3 +1,12 @@ +loook (0.8.4-2) UNRELEASED; urgency=medium + + * Now it is possible to search in directories which also contains + password protected files. + + Fix for bug #884582 (Closes: #884582) + * Change E-Mail address + + -- Mechtilde Stehmann <mechti...@debian.org> Tue, 26 Dec 2017 10:55:42 +0100 + loook (0.8.4-1) unstable; urgency=low * New Upstream release diff -Nru loook-0.8.4/debian/control loook-0.8.4/debian/control --- loook-0.8.4/debian/control 2016-02-13 17:04:49.000000000 +0100 +++ loook-0.8.4/debian/control 2017-12-26 10:54:50.000000000 +0100 @@ -1,7 +1,7 @@ Source: loook Section: utils Priority: optional -Maintainer: Mechtilde Stehmann <o...@mechtilde.de> +Maintainer: Mechtilde Stehmann <mechti...@debian.org> Build-Depends: debhelper (>= 9), gettext Standards-Version: 3.9.7 Homepage: http://mechtilde.de/Loook/ diff -Nru loook-0.8.4/debian/patches/fix884582.patch loook-0.8.4/debian/patches/fix884582.patch --- loook-0.8.4/debian/patches/fix884582.patch 1970-01-01 01:00:00.000000000 +0100 +++ loook-0.8.4/debian/patches/fix884582.patch 2017-12-26 10:50:51.000000000 +0100 @@ -0,0 +1,80 @@ +Description: fix for bug #884582-now it is possible to search in directories which also contains password protected files. +Forwarded: Yes +Author: Mechtilde Stehmann <mechti...@debian.org> +Last-Update: 2017-12-26 +Index: loook-0.8.4/loook.py +=================================================================== +--- loook-0.8.4.orig/loook.py 2016-02-13 17:03:15.000000000 +0100 ++++ loook-0.8.4/loook.py 2017-12-26 10:47:32.831242345 +0100 +@@ -213,7 +213,7 @@ + """Start OOo to view the file. This method lacks + error handling (TODO).""" + items = event.widget.curselection() +- filename = "%s%s" % (self.search_path.get(), event.widget.get(items[0])) ++ filename = os.path.join(self.search_path.get(), event.widget.get(items[0])) + filename = os.path.normpath(filename) + prg = self.ooo_path.get() + if not prg: +@@ -223,10 +223,7 @@ + cmd = "\"%s\" \"%s\" &" % (prg, filename) + self.status.config(text=_("Starting viewer...")) + print(cmd) +- try: +- res = os.system(cmd) +- except UnicodeError: +- res = os.system(cmd) ++ res = os.system(cmd) + if res != 0: + # don't show a dialog, this check might not be system-indepenent: + print(_("Warning: Command returned code != 0: ") + cmd) +@@ -273,6 +270,8 @@ + + def processFile(self, filename, query): + suffix = self.getSuffix(filename) ++ # needed for error messages ++ fsfilename =filename + try: + # Handle OpenOffice.org files: + if suffix in ('sxw', 'stw', # OOo 1.x swriter +@@ -299,7 +298,7 @@ + + if filename.endswith("document.xml"): + content += str(zip.read(filename), 'utf-8') +- ++ + content = self.removeXMLMarkup(content, replace_with_space=0) + docinfo = str(zip.read("meta.xml"), 'utf-8') + docinfo = self.removeXMLMarkup(docinfo, replace_with_space=0) +@@ -307,6 +306,10 @@ + except KeyError as err: + print("Warning: %s not found in '%s'" % (err, filename)) + return None ++ # Patch for encrypted files ++ except UnicodeDecodeError: ++ print("Warning: cannot open '%s'" % (fsfilename)) ++ return None + title = "" + title_match = re.compile("<dc:title>(.*?)</dc:title>", re.DOTALL|re.IGNORECASE).search(docinfo) + if title_match: +@@ -339,6 +342,10 @@ + except KeyError as err: + print("Warning: %s not found in '%s'" % (err, filename)) + return None ++ # Patch for encrypted files ++ except UnicodeDecodeError: ++ print("Warning: cannot open '%s'" % (fsfilename)) ++ return None + title = "" + title_match = re.compile("<dc:title>(.*?)</dc:title>", re.DOTALL|re.IGNORECASE).search(docinfo) + if title_match: +@@ -368,6 +375,10 @@ + except KeyError as err: + print("Warning: %s not found in '%s'" % (err, filename)) + return None ++ # Patch for encrypted files ++ except UnicodeDecodeError: ++ print("Warning: cannot open '%s'" % (fsfilename)) ++ return None + title = "" + title_match = re.compile("<dc:title>(.*?)</dc:title>", re.DOTALL|re.IGNORECASE).search(docinfo) + if title_match: diff -Nru loook-0.8.4/debian/patches/series loook-0.8.4/debian/patches/series --- loook-0.8.4/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ loook-0.8.4/debian/patches/series 2017-12-26 10:46:03.000000000 +0100 @@ -0,0 +1 @@ +fix884582.patch