From 69b572c91946b144b30e2a48480e2d677f7f1d82 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Fri, 30 Nov 2018 11:52:03 -0500 Subject: [PATCH] fix incorrect use of Type attribute (bz 1654857) --- pyxdg-0.26-getType-fix.patch | 14 ++++++++++++++ pyxdg.spec | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 pyxdg-0.26-getType-fix.patch diff --git a/pyxdg-0.26-getType-fix.patch b/pyxdg-0.26-getType-fix.patch new file mode 100644 index 0000000..b9f963c --- /dev/null +++ b/pyxdg-0.26-getType-fix.patch @@ -0,0 +1,14 @@ +diff -up pyxdg-0.26/xdg/Menu.py.getTypefix pyxdg-0.26/xdg/Menu.py +--- pyxdg-0.26/xdg/Menu.py.getTypefix 2018-11-01 11:37:50.561645188 -0400 ++++ pyxdg-0.26/xdg/Menu.py 2018-11-30 11:33:10.728729275 -0500 +@@ -994,8 +994,8 @@ class XMLMenuBuilder(object): + menuentry = MenuEntry(directory, dir) + if not menu.Directory: + menu.Directory = menuentry +- elif menuentry.Type == MenuEntry.TYPE_SYSTEM: +- if menu.Directory.Type == MenuEntry.TYPE_USER: ++ elif menuentry.getType() == MenuEntry.TYPE_SYSTEM: ++ if menu.Directory.getType() == MenuEntry.TYPE_USER: + menu.Directory.Original = menuentry + if menu.Directory: + break diff --git a/pyxdg.spec b/pyxdg.spec index 542b19f..87983cc 100644 --- a/pyxdg.spec +++ b/pyxdg.spec @@ -2,13 +2,15 @@ Name: pyxdg Version: 0.26 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python library to access freedesktop.org standards Group: Development/Libraries License: LGPLv2 URL: http://freedesktop.org/Software/pyxdg Source0: https://pypi.python.org/packages/source/r/PyXDG/%{name}-%{version}.tar.gz +# https://gitlab.freedesktop.org/xdg/pyxdg/merge_requests/2 Patch0: pyxdg-0.26-fix-OnlyShowIn.patch +Patch1: pyxdg-0.26-getType-fix.patch BuildArch: noarch # These are needed for the nose tests. BuildRequires: hicolor-icon-theme @@ -48,6 +50,7 @@ package contains a Python 3 version of PyXDG. %prep %setup -q %patch0 -p1 -b .fixOnlyShowIn +%patch1 -p1 -b .getType %build %py2_build @@ -87,6 +90,9 @@ nosetests-%{python3_version} || : %endif #with_python3 %changelog +* Fri Nov 30 2018 Tom Callaway - 0.26-3 +- fix incorrect use of Type attribute (bz 1654857) + * Thu Nov 1 2018 Tom Callaway - 0.26-2 - fix OnlyShowIn (bz 1624651)