Skip to content

Commit

Permalink
app-arch/createrepo: use backports-lzma instead of pyliblzma
Browse files Browse the repository at this point in the history
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Closes: https://bugs.gentoo.org/show_bug.cgi?id=643310
Signed-off-by: Alon Bar-Lev <[email protected]>
  • Loading branch information
alonbl committed Oct 1, 2018
1 parent 66ca2f7 commit f1b13c1
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
51 changes: 51 additions & 0 deletions app-arch/createrepo/createrepo-0.10.4-r1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python2_7 )
PYTHON_REQ_USE='xml'

inherit python-single-r1 bash-completion-r1

DESCRIPTION="Creates a common rpm-metadata repository"
HOMEPAGE="http://createrepo.baseurl.org/"
SRC_URI="http://createrepo.baseurl.org/download/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND=">=dev-python/urlgrabber-2.9.0[${PYTHON_USEDEP}]
>=app-arch/rpm-4.1.1[python,${PYTHON_USEDEP}]
dev-libs/libxml2[python,${PYTHON_USEDEP}]
>=app-arch/deltarpm-3.6_pre20110223[python,${PYTHON_USEDEP}]
dev-python/backports-lzma[${PYTHON_USEDEP}]
>=sys-apps/yum-3.4.3
${PYTHON_DEPS}"
DEPEND="${PYTHON_DEPS}"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

PATCHES=(
"${FILESDIR}/${PN}-0.10.3-ten-changelog-limit.patch"
"${FILESDIR}/${P}-lzma.patch"
)

pkg_setup() {
python-single-r1_pkg_setup
python_export PYTHON_SITEDIR
}

src_install() {
emake install \
DESTDIR="${ED}" \
PYTHON=true \
compdir="$(get_bashcompdir)" \
PKGDIR="${PYTHON_SITEDIR}/${PN}"
einstalldocs
python_fix_shebang "${ED}"
python_optimize
python_optimize "${ED}/usr/share/createrepo"
}
14 changes: 14 additions & 0 deletions app-arch/createrepo/files/createrepo-0.10.4-lzma.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/createrepo/utils.py b/createrepo/utils.py
index b0d92ec..1220c7c 100644
--- a/createrepo/utils.py
+++ b/createrepo/utils.py
@@ -25,7 +25,8 @@ from gzip import write32u, FNAME
from yum import misc
_available_compression = ['gz', 'bz2']
try:
- import lzma
+ import backports.lzma
+ lzma = backports.lzma
_available_compression.append('xz')
except ImportError:
lzma = None

0 comments on commit f1b13c1

Please sign in to comment.