]> git.pld-linux.org Git - packages/rpm.git/commitdiff
disable fetch sources in python api, just to get parsed spec
authorElan Ruusamäe <glen@delfi.ee>
Wed, 4 Nov 2015 22:05:22 +0000 (00:05 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 4 Nov 2015 22:05:22 +0000 (00:05 +0200)
http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2015-November/024529.html

py-disable-fetch.patch [new file with mode: 0644]
rpm.spec

diff --git a/py-disable-fetch.patch b/py-disable-fetch.patch
new file mode 100644 (file)
index 0000000..6035867
--- /dev/null
@@ -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");
index 3abd6328546ed6fdd4dd77fe3dc9c88c838ca4d3..2abef4ba2acef692aab988c057f9bbb20c23e45b 100644 (file)
--- 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
This page took 0.044395 seconds and 4 git commands to generate.