[arch-commits] Commit in pyalpm/repos/staging-x86_64 (4 files)
Evangelos Foutras
foutrelis at archlinux.org
Thu Nov 12 13:45:00 UTC 2020
Date: Thursday, November 12, 2020 @ 13:45:00
Author: foutrelis
Revision: 400577
archrelease: copy trunk to staging-x86_64
Added:
pyalpm/repos/staging-x86_64/PKGBUILD
(from rev 400576, pyalpm/trunk/PKGBUILD)
pyalpm/repos/staging-x86_64/memleak.patch
(from rev 400576, pyalpm/trunk/memleak.patch)
Deleted:
pyalpm/repos/staging-x86_64/PKGBUILD
pyalpm/repos/staging-x86_64/memleak.patch
---------------+
PKGBUILD | 78 ++++++++++++++++++++++++-------------------------
memleak.patch | 88 ++++++++++++++++++++++++++++----------------------------
2 files changed, 82 insertions(+), 84 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-11-12 13:44:56 UTC (rev 400576)
+++ PKGBUILD 2020-11-12 13:45:00 UTC (rev 400577)
@@ -1,40 +0,0 @@
-# Maintainer : Rémy Oudompheng <remy at archlinux.org>
-
-pkgname=pyalpm
-pkgver=0.9.1
-pkgrel=3
-pkgdesc="Libalpm bindings for Python 3"
-arch=('x86_64')
-url="https://git.archlinux.org/pyalpm.git/"
-license=('GPL')
-makedepends=('git' 'python-setuptools' 'python-pytest')
-depends=('python>=3.6' 'pacman>=5.0')
-source=("git+https://git.archlinux.org/pyalpm.git#commit=81a1749b87793737961147a6843468b0dc3dd1e7" "memleak.patch"
- pyalpm-gcc10.patch::https://git.archlinux.org/pyalpm.git/patch/?id=eaebfe83ba2b685156d3ed3cf000ee47ca5c5fb4)
-validpgpkeys=('E499C79F53C96A54E572FEE1C06086337C50773E')
-sha512sums=('SKIP'
- 'b7dacb28bc13f5c9fb9c9295d1a3d323b7b7c0893d69b110f3036b73a4930e8463b5a19011b0e5996ff55157768376c2e53ab97c557afe29bbe3b5d0c8a1e027'
- '279b4cd4da9c67dde90132654cea7e0ef097e11c72a3b7bfe8259c9ec02d88e5d832d61ebde9b163e5e935c8ae113bd505e87c00786967745ea9368899a1a66b')
-
-prepare() {
- cd ${srcdir}/${pkgname}
- # Rever memleak patch
- patch -NRp1 -i ${srcdir}/memleak.patch
-
- patch -p1 -i ../pyalpm-gcc10.patch
-}
-
-build() {
- cd ${srcdir}/${pkgname}
- python setup.py build
-}
-
-check() {
- cd ${srcdir}/${pkgname}
- PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.9" pytest
-}
-
-package() {
- cd ${srcdir}/${pkgname}
- python setup.py install --root=${pkgdir}
-}
Copied: pyalpm/repos/staging-x86_64/PKGBUILD (from rev 400576, pyalpm/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-11-12 13:45:00 UTC (rev 400577)
@@ -0,0 +1,38 @@
+# Maintainer : Rémy Oudompheng <remy at archlinux.org>
+
+pkgname=pyalpm
+pkgver=0.9.2
+pkgrel=1
+pkgdesc="Python 3 bindings for libalpm"
+arch=('x86_64')
+url="https://gitlab.archlinux.org/archlinux/pyalpm"
+license=('GPL')
+makedepends=('git' 'python-setuptools' 'python-pytest')
+depends=('python' 'pacman')
+source=("git+https://gitlab.archlinux.org/archlinux/pyalpm.git#tag=$pkgver"
+ "memleak.patch")
+validpgpkeys=('E499C79F53C96A54E572FEE1C06086337C50773E')
+sha512sums=('SKIP'
+ 'b7dacb28bc13f5c9fb9c9295d1a3d323b7b7c0893d69b110f3036b73a4930e8463b5a19011b0e5996ff55157768376c2e53ab97c557afe29bbe3b5d0c8a1e027')
+
+prepare() {
+ cd ${srcdir}/${pkgname}
+ # Revert memleak patch which causes 'random' segfauts since
+ # the handle is still used while it's already cleaned up.
+ patch -NRp1 -i ${srcdir}/memleak.patch
+}
+
+build() {
+ cd ${srcdir}/${pkgname}
+ python setup.py build
+}
+
+check() {
+ cd ${srcdir}/${pkgname}
+ PYTHONPATH="$PWD/build/lib.linux-$CARCH-3.9" pytest
+}
+
+package() {
+ cd ${srcdir}/${pkgname}
+ python setup.py install --root=${pkgdir}
+}
Deleted: memleak.patch
===================================================================
--- memleak.patch 2020-11-12 13:44:56 UTC (rev 400576)
+++ memleak.patch 2020-11-12 13:45:00 UTC (rev 400577)
@@ -1,44 +0,0 @@
-From c02555c5d83e63b1a308e7c165d5615198e6d813 Mon Sep 17 00:00:00 2001
-From: Jelle van der Waa <jelle at vdwaa.nl>
-Date: Wed, 16 Jan 2019 09:30:28 +0100
-Subject: src: dealloc alpm_handle when object goes out of scope
-
-By default alpm_handle is leaked when Handle is out of scope since
-alpm_release is never called. Call alpm_release in tp_dealloc to
-actually free the alloc'd memory.
----
- src/handle.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/handle.c b/src/handle.c
-index 08853f0..5e196df 100644
---- a/src/handle.c
-+++ b/src/handle.c
-@@ -377,6 +377,16 @@ static PyMethodDef pyalpm_handle_methods[] = {
- {NULL, NULL, 0, NULL},
- };
-
-+static void pyalpm_dealloc(PyObject* self) {
-+ alpm_handle_t *handle = ALPM_HANDLE(self);
-+ int ret = alpm_release(handle);
-+ if (ret == -1) {
-+ PyErr_Format(alpm_error, "unable to release alpm handle");
-+ }
-+ handle = NULL;
-+ Py_TYPE(self)->tp_free((PyObject *)self);
-+}
-+
- PyTypeObject AlpmHandleType = {
- PyVarObject_HEAD_INIT(NULL, 0)
- "alpm.Handle", /*tp_name*/
-@@ -387,6 +397,7 @@ PyTypeObject AlpmHandleType = {
- .tp_methods = pyalpm_handle_methods,
- .tp_getset = pyalpm_handle_getset,
- .tp_new = pyalpm_initialize,
-+ .tp_dealloc = (destructor) pyalpm_dealloc,
- };
-
- /** Initializes Handle class in module */
---
-cgit v1.2.1-1-g437b
-
Copied: pyalpm/repos/staging-x86_64/memleak.patch (from rev 400576, pyalpm/trunk/memleak.patch)
===================================================================
--- memleak.patch (rev 0)
+++ memleak.patch 2020-11-12 13:45:00 UTC (rev 400577)
@@ -0,0 +1,44 @@
+From c02555c5d83e63b1a308e7c165d5615198e6d813 Mon Sep 17 00:00:00 2001
+From: Jelle van der Waa <jelle at vdwaa.nl>
+Date: Wed, 16 Jan 2019 09:30:28 +0100
+Subject: src: dealloc alpm_handle when object goes out of scope
+
+By default alpm_handle is leaked when Handle is out of scope since
+alpm_release is never called. Call alpm_release in tp_dealloc to
+actually free the alloc'd memory.
+---
+ src/handle.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/handle.c b/src/handle.c
+index 08853f0..5e196df 100644
+--- a/src/handle.c
++++ b/src/handle.c
+@@ -377,6 +377,16 @@ static PyMethodDef pyalpm_handle_methods[] = {
+ {NULL, NULL, 0, NULL},
+ };
+
++static void pyalpm_dealloc(PyObject* self) {
++ alpm_handle_t *handle = ALPM_HANDLE(self);
++ int ret = alpm_release(handle);
++ if (ret == -1) {
++ PyErr_Format(alpm_error, "unable to release alpm handle");
++ }
++ handle = NULL;
++ Py_TYPE(self)->tp_free((PyObject *)self);
++}
++
+ PyTypeObject AlpmHandleType = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "alpm.Handle", /*tp_name*/
+@@ -387,6 +397,7 @@ PyTypeObject AlpmHandleType = {
+ .tp_methods = pyalpm_handle_methods,
+ .tp_getset = pyalpm_handle_getset,
+ .tp_new = pyalpm_initialize,
++ .tp_dealloc = (destructor) pyalpm_dealloc,
+ };
+
+ /** Initializes Handle class in module */
+--
+cgit v1.2.1-1-g437b
+
More information about the arch-commits
mailing list