[ino] Added patch to support Fedora specific location for avrdude.conf file, fixes #985904

Alberto Ruiz aruiz at fedoraproject.org
Thu Aug 29 12:49:48 UTC 2013


commit 794443e8bafd5658beaf92798f51ac743611b515
Author: Alberto Ruiz <aruiz at redhat.com>
Date:   Thu Aug 29 14:49:28 2013 +0200

    Added patch to support Fedora specific location for avrdude.conf file, fixes #985904

 avrdudeconf.patch |   16 ++++++++++++++++
 ino.spec          |    8 +++++++-
 2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/avrdudeconf.patch b/avrdudeconf.patch
new file mode 100644
index 0000000..6279ebd
--- /dev/null
+++ b/avrdudeconf.patch
@@ -0,0 +1,16 @@
+diff --git a/ino/commands/upload.py b/ino/commands/upload.py
+index e081219..a6b69c5 100644
+--- a/ino/commands/upload.py
++++ b/ino/commands/upload.py
+@@ -39,7 +39,10 @@ class Upload(Command):
+         self.e.find_tool('stty', ['stty'])
+         if platform.system() == 'Linux':
+             self.e.find_arduino_tool('avrdude', ['hardware', 'tools'])
+-            self.e.find_arduino_file('avrdude.conf', ['hardware', 'tools'])
++            if os.path.exists('/etc/avrdude/avrdude.conf'):
++              self.e['avrdude.conf'] = '/etc/avrdude/avrdude.conf'
++            else:
++              self.e.find_arduino_file('avrdude.conf', ['hardware', 'tools'])
+         else:
+             self.e.find_arduino_tool('avrdude', ['hardware', 'tools', 'avr', 'bin'])
+             self.e.find_arduino_file('avrdude.conf', ['hardware', 'tools', 'avr', 'etc'])
diff --git a/ino.spec b/ino.spec
index 27a684c..635bbc8 100644
--- a/ino.spec
+++ b/ino.spec
@@ -1,11 +1,12 @@
 Name:           ino
 Version:        0.3.5
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Command line toolkit for working with Arduino hardware
 # See README.rst
 License:        MIT
 URL:            http://inotool.org/
 Source0:        http://pypi.python.org/packages/source/i/%{name}/%{name}-%{version}.tar.gz
+Patch0:         avrdudeconf.patch
 BuildArch:      noarch
 BuildRequires:  python2-devel
 BuildRequires:  python-setuptools
@@ -33,6 +34,8 @@ automatically and you'll never see them if you don't want to.
 %setup -q
 sed -i 's|/usr/bin/env python|/usr/bin/python|' ino/runner.py
 
+%patch0 -p1
+
 %build
 CFLAGS="$RPM_OPT_FLAGS" python setup.py build
 
@@ -47,6 +50,9 @@ rm -f %{buildroot}%{python_sitelib}/%{name}/templates/*/lib/.holder
 %{python_sitelib}/%{name}*
 
 %changelog
+* Thu Aug 29 2013 Alberto Ruiz <aruiz at redhat.org> - 0.3.5-5
+- Added patch to support Fedora specific location for avrdude.conf file, fixes #985904
+
 * Thu Aug 29 2013 Alberto Ruiz <aruiz at redhat.com> - 0.3.5-4
 - Fixed spec file to keep lib subdirs in the templates, fixes #995489
 


More information about the scm-commits mailing list