diff --git a/Uranium-issue265.patch b/Uranium-issue265.patch new file mode 100644 index 0000000..70e7ff1 --- /dev/null +++ b/Uranium-issue265.patch @@ -0,0 +1,25 @@ +From e122aae1a2dfa510c6708db99998756bbdddeced Mon Sep 17 00:00:00 2001 +From: Jaime van Kessel +Date: Wed, 28 Jun 2017 16:43:28 +0200 +Subject: [PATCH] Fixed the incorrect number removal check for unique name + +--- + UM/Settings/ContainerRegistry.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/UM/Settings/ContainerRegistry.py b/UM/Settings/ContainerRegistry.py +index dc4a25bcc..084ec04ae 100644 +--- a/UM/Settings/ContainerRegistry.py ++++ b/UM/Settings/ContainerRegistry.py +@@ -351,8 +351,9 @@ def uniqueName(self, original: str) -> str: + + if not name: #Wait, that deleted everything! + name = "Profile" +- elif not self.findContainers(id = name, ignore_case = True) and not self.findContainers(name = name): +- return name ++ elif not self.findContainers(id = original.strip(), ignore_case = True) and not self.findContainers(name = original.strip()): ++ # Check if the stripped version of the name is unique (note that this can still have the number in it) ++ return original.strip() + + unique_name = name + i = 1 diff --git a/python-uranium.spec b/python-uranium.spec index 03bccd6..e4ad5c7 100644 --- a/python-uranium.spec +++ b/python-uranium.spec @@ -1,11 +1,14 @@ Name: python-uranium Version: 2.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Python framework for building desktop applications License: AGPLv3+ URL: https://github.com/Ultimaker/Uranium Source0: %{url}/archive/%{version}.tar.gz#/Uranium-%{version}.tar.gz +# https://github.com/Ultimaker/Uranium/issues/265 +Patch0: Uranium-issue265.patch + BuildRequires: python3-devel BuildRequires: /usr/bin/doxygen BuildRequires: /usr/bin/msgmerge @@ -76,9 +79,8 @@ pip3 freeze # The failing tests are reported at: # https://github.com/Ultimaker/Uranium/issues/225 -# https://github.com/Ultimaker/Uranium/issues/265 # Skipping -%{__python3} -m pytest -v -k "not getMimeTypeForFile and not test_uniqueName" +%{__python3} -m pytest -v -k "not getMimeTypeForFile" %install @@ -114,6 +116,9 @@ popd %changelog +* Wed Jun 28 2017 Miro Hrončok - 2.6.1-2 +- Fix the test_uniqueName test failure + * Wed Jun 28 2017 Miro Hrončok - 2.6.1-1 - Update to 2.6.1 - Skip test_uniqueName test (reported)