[packages/rpm] disable fetch sources in python api, just to get parsed spec
glen
glen at pld-linux.org
Wed Nov 4 23:06:00 CET 2015
commit d397adc8e576680239e4201a21015921c8566bf1
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Nov 5 00:05:22 2015 +0200
disable fetch sources in python api, just to get parsed spec
http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/024529.html
py-disable-fetch.patch | 34 ++++++++++++++++++++++++++++++++++
rpm.spec | 4 +++-
2 files changed, 37 insertions(+), 1 deletion(-)
---
diff --git a/rpm.spec b/rpm.spec
index 3abd632..2abef4b 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -51,7 +51,7 @@ Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 5.4.15
-Release: 25
+Release: 26
License: LGPL v2.1
Group: Base
# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
@@ -177,6 +177,7 @@ Patch87: %{name}-file-output-for-ELF.patch
Patch88: %{name}-rpmtdnext.patch
Patch89: disable-header-verification.patch
Patch90: %{name}-cppcompat.patch
+Patch91: py-disable-fetch.patch
# Patches imported from Mandriva
@@ -962,6 +963,7 @@ cd -
%patch88 -p1
%patch89 -p1
%patch90 -p1
+%patch91 -p1
%patch1000 -p1
%patch1001 -p1
diff --git a/py-disable-fetch.patch b/py-disable-fetch.patch
new file mode 100644
index 0000000..6035867
--- /dev/null
+++ b/py-disable-fetch.patch
@@ -0,0 +1,34 @@
+disable fetching sources.
+annoying if you just want to get .spec structure!
+
+it could be parameter to s.parseSpec(), but as prevous code hardcoded, i'll
+just "hardcode" different value here.
+
+http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/024529.html
+
+one could play with '__urlgetfile' macro, and just tell it 'OK':
+%__urlgetfile OK
+
+but then ugly "Fetching" messages are still displayed, which maybe even more confusing.
+
+http://comments.gmane.org/gmane.comp.package-management.rpm.user/159
+
+--- rpm-5.4.15/python/rpmts-py.c~ 2014-07-28 00:52:21.000000000 +0300
++++ rpm-5.4.15/python/rpmts-py.c 2015-11-04 22:00:33.989058412 +0200
+@@ -1333,13 +1333,15 @@
+ char * passPhrase = "";
+ char *cookie = NULL;
+ int anyarch = 1;
+- int verify = 1;
++ int verify;
+ int force = 1;
+ char * kwlist[] = {"specfile", NULL};
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s:Parse", kwlist, &specfile))
+ return NULL;
+
++ verify = rpmExpandNumeric("%{?_py_parsespec_verify}%{?!_py_parsespec_verify:0}");
++
+ if (parseSpec(s->ts, specfile,"/", recursing, passPhrase,
+ cookie, anyarch, force, verify)!=0) {
+ PyErr_SetString(pyrpmError, "can't parse specfile\n");
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/d397adc8e576680239e4201a21015921c8566bf1
More information about the pld-cvs-commit
mailing list