[packages/pyp2rpm] default savepath to current dir

glen glen at pld-linux.org
Sun Mar 17 02:21:47 CET 2013


commit aa1c3d8d89ad449f1bb0dd8b2a9efa887b1a44b0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Mar 17 03:12:04 2013 +0200

    default savepath  to current dir
    
    ~/rpmbuild/SOURCES is wrong, and querying rpm is too heavy, besides
    usually you just expect it to save to current dir

 default-savepath.patch | 11 +++++++++++
 pyp2rpm.spec           |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/pyp2rpm.spec b/pyp2rpm.spec
index 81444ff..d7bf7dc 100644
--- a/pyp2rpm.spec
+++ b/pyp2rpm.spec
@@ -15,6 +15,7 @@ Source0:	http://pypi.python.org/packages/source/p/pyp2rpm/%{name}-%{version}.tar
 # git checkout v1.0.1 && tar czf pyp2rpm-1.0.1-tests.tgz tests/
 Source1:	%{name}-%{version}-tests.tgz
 # Source1-md5:	d6ffe3cd0acb10af01c99a77e6bd51f3
+Patch0:		default-savepath.patch
 URL:		https://pypi.python.org/pypi/pyp2rpm
 BuildRequires:	python-flexmock >= 0.9.3
 BuildRequires:	python-pytest
@@ -36,6 +37,7 @@ information though).
 
 %prep
 %setup -q
+%patch0 -p1
 # Remove bundled egg-info
 rm -r %{name}.egg-info
 
diff --git a/default-savepath.patch b/default-savepath.patch
new file mode 100644
index 0000000..d57a35f
--- /dev/null
+++ b/default-savepath.patch
@@ -0,0 +1,11 @@
+--- pyp2rpm-1.0.1/pyp2rpm/settings.py~	2012-11-26 15:22:18.000000000 +0200
++++ pyp2rpm-1.0.1/pyp2rpm/settings.py	2013-03-17 03:10:31.762499704 +0200
+@@ -5,7 +5,7 @@
+ DEFAULT_METADATA_SOURCE = 'pypi'
+ DEFAULT_TEMPLATE = 'fedora'
+ DEFAULT_DISTRO = 'fedora'
+-DEFAULT_PKG_SAVE_PATH = os.path.expanduser('~/rpmbuild/SOURCES/')
++DEFAULT_PKG_SAVE_PATH = os.path.expanduser('.')
+ KNOWN_DISTROS = ['fedora', 'mageia']
+ ARCHIVE_SUFFIXES = ['.tar', '.tgz', '.tar.gz', '.tar.bz2', '.gz', '.bz2', '.zip', '.egg']
+ EXTENSION_SUFFIXES = ['.c', '.cpp']
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pyp2rpm.git/commitdiff/86badbede143960b5b5318bb6d47cd7ef1be482d



More information about the pld-cvs-commit mailing list