From b85134b0e3262691943471cb4ae152785849cbc1 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Apr 2018 18:24:48 +0100 Subject: app-portage/sisyphus : revision bump --- .../sisyphus/files/sisyphus-drop-datetime.patch | 26 --------- app-portage/sisyphus/files/sisyphus-fixes.patch | 56 ++++++++++++++++++ app-portage/sisyphus/files/sisyphus-update.patch | 28 --------- .../sisyphus/files/sisyphus-use-dateutil.patch | 28 --------- app-portage/sisyphus/sisyphus-1.1804-r3.ebuild | 67 ---------------------- app-portage/sisyphus/sisyphus-1.1804-r4.ebuild | 65 +++++++++++++++++++++ 6 files changed, 121 insertions(+), 149 deletions(-) delete mode 100644 app-portage/sisyphus/files/sisyphus-drop-datetime.patch create mode 100644 app-portage/sisyphus/files/sisyphus-fixes.patch delete mode 100644 app-portage/sisyphus/files/sisyphus-update.patch delete mode 100644 app-portage/sisyphus/files/sisyphus-use-dateutil.patch delete mode 100644 app-portage/sisyphus/sisyphus-1.1804-r3.ebuild create mode 100644 app-portage/sisyphus/sisyphus-1.1804-r4.ebuild diff --git a/app-portage/sisyphus/files/sisyphus-drop-datetime.patch b/app-portage/sisyphus/files/sisyphus-drop-datetime.patch deleted file mode 100644 index 1d9e150b..00000000 --- a/app-portage/sisyphus/files/sisyphus-drop-datetime.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py -index 59bf310..069d563 100755 ---- a/src/backend/libsisyphus.py -+++ b/src/backend/libsisyphus.py -@@ -10,7 +10,6 @@ - import urllib3 - import io - --from datetime import datetime - from dateutil import parser - - redcore_portage_config_path = '/opt/redcore-build' -@@ -101,11 +100,11 @@ def syncAll(): - - reqRmtPkgTs = http.request('HEAD',rmtCsvUrl) - rmtPkgTs = int(parser.parse(reqRmtPkgTs.headers['last-modified']).strftime("%s")) -- lclPkgTs = int(datetime.utcnow().strftime("%s")) -+ lclPkgTs = int(os.path.getctime(rmtPkgCsv)) - - reqRmtDscTs = http.request('HEAD',rmtDscUrl) - rmtDscTs = int(parser.parse(reqRmtDscTs.headers['last-modified']).strftime("%s")) -- lclDscTs = int(datetime.utcnow().strftime("%s")) -+ lclDscTs = int(os.path.getctime(rmtDscCsv)) - - if rmtPkgTs > lclPkgTs or rmtDscTs > lclDscTs: - fetchRemoteDatabaseCSV() diff --git a/app-portage/sisyphus/files/sisyphus-fixes.patch b/app-portage/sisyphus/files/sisyphus-fixes.patch new file mode 100644 index 00000000..276f97ce --- /dev/null +++ b/app-portage/sisyphus/files/sisyphus-fixes.patch @@ -0,0 +1,56 @@ +diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py +index 36a2dce..a71db21 100755 +--- a/src/backend/libsisyphus.py ++++ b/src/backend/libsisyphus.py +@@ -9,7 +9,8 @@ + import sys + import urllib3 + import io +-from datetime import datetime ++ ++from dateutil import parser + + redcore_portage_config_path = '/opt/redcore-build' + +@@ -98,12 +99,12 @@ def syncAll(): + http = urllib3.PoolManager() + + reqRmtPkgTs = http.request('HEAD',rmtCsvUrl) +- rmtPkgTs = int(datetime.strptime(reqRmtPkgTs.headers['last-modified'], '%a, %d %b %Y %H:%M:%S %Z').strftime("%s")) +- lclPkgTs = int(datetime.utcnow().strftime("%s")) ++ rmtPkgTs = int(parser.parse(reqRmtPkgTs.headers['last-modified']).strftime("%s")) ++ lclPkgTs = int(os.path.getctime(rmtPkgCsv)) + + reqRmtDscTs = http.request('HEAD',rmtDscUrl) +- rmtDscTs = int(datetime.strptime(reqRmtDscTs.headers['last-modified'], '%a, %d %b %Y %H:%M:%S %Z').strftime("%s")) +- lclDscTs = int(datetime.utcnow().strftime("%s")) ++ rmtDscTs = int(parser.parse(reqRmtDscTs.headers['last-modified']).strftime("%s")) ++ lclDscTs = int(os.path.getctime(rmtDscCsv)) + + if rmtPkgTs > lclPkgTs or rmtDscTs > lclDscTs: + fetchRemoteDatabaseCSV() +@@ -167,6 +168,11 @@ def startSearch(pkgList): + def startUpdate(): + syncAll() + ++@animation.wait('syncing portage tree && portage config files') ++def startSync(): ++ syncGitRepos() ++ syncPortageCfg() ++ + def sysInfo(): + subprocess.check_call(['emerge', '--info']) + +diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py +index 965e3f1..9d347ab 100755 +--- a/src/frontend/cli/sisyphus-cli.py ++++ b/src/frontend/cli/sisyphus-cli.py +@@ -18,7 +18,7 @@ + elif "remove-orphans" in sys.argv[1:]: + removeOrphans() + elif "update" in sys.argv[1:]: +- startUpdate() ++ startSync() + elif "upgrade" in sys.argv[1:]: + startUpgrade() + elif "search" in sys.argv[1:]: diff --git a/app-portage/sisyphus/files/sisyphus-update.patch b/app-portage/sisyphus/files/sisyphus-update.patch deleted file mode 100644 index f70fb862..00000000 --- a/app-portage/sisyphus/files/sisyphus-update.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py -index 069d563..e83258a 100755 ---- a/src/backend/libsisyphus.py -+++ b/src/backend/libsisyphus.py -@@ -168,6 +168,10 @@ def startSearch(pkgList): - def startUpdate(): - syncAll() - -+def startSync(): -+ syncGitRepos() -+ syncPortageCfg() -+ - def sysInfo(): - subprocess.check_call(['emerge', '--info']) - -diff --git a/src/frontend/cli/sisyphus-cli.py b/src/frontend/cli/sisyphus-cli.py -index 965e3f1..9d347ab 100755 ---- a/src/frontend/cli/sisyphus-cli.py -+++ b/src/frontend/cli/sisyphus-cli.py -@@ -18,7 +18,7 @@ - elif "remove-orphans" in sys.argv[1:]: - removeOrphans() - elif "update" in sys.argv[1:]: -- startUpdate() -+ startSync() - elif "upgrade" in sys.argv[1:]: - startUpgrade() - elif "search" in sys.argv[1:]: diff --git a/app-portage/sisyphus/files/sisyphus-use-dateutil.patch b/app-portage/sisyphus/files/sisyphus-use-dateutil.patch deleted file mode 100644 index 29165a78..00000000 --- a/app-portage/sisyphus/files/sisyphus-use-dateutil.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py -index 36a2dce..59bf310 100755 ---- a/src/backend/libsisyphus.py -+++ b/src/backend/libsisyphus.py -@@ -9,7 +9,9 @@ - import sys - import urllib3 - import io -+ - from datetime import datetime -+from dateutil import parser - - redcore_portage_config_path = '/opt/redcore-build' - -@@ -98,11 +100,11 @@ def syncAll(): - http = urllib3.PoolManager() - - reqRmtPkgTs = http.request('HEAD',rmtCsvUrl) -- rmtPkgTs = int(datetime.strptime(reqRmtPkgTs.headers['last-modified'], '%a, %d %b %Y %H:%M:%S %Z').strftime("%s")) -+ rmtPkgTs = int(parser.parse(reqRmtPkgTs.headers['last-modified']).strftime("%s")) - lclPkgTs = int(datetime.utcnow().strftime("%s")) - - reqRmtDscTs = http.request('HEAD',rmtDscUrl) -- rmtDscTs = int(datetime.strptime(reqRmtDscTs.headers['last-modified'], '%a, %d %b %Y %H:%M:%S %Z').strftime("%s")) -+ rmtDscTs = int(parser.parse(reqRmtDscTs.headers['last-modified']).strftime("%s")) - lclDscTs = int(datetime.utcnow().strftime("%s")) - - if rmtPkgTs > lclPkgTs or rmtDscTs > lclDscTs: diff --git a/app-portage/sisyphus/sisyphus-1.1804-r3.ebuild b/app-portage/sisyphus/sisyphus-1.1804-r3.ebuild deleted file mode 100644 index c781f2d9..00000000 --- a/app-portage/sisyphus/sisyphus-1.1804-r3.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 2016-2017 Redcore Linux Project -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{4,5,6} ) - -inherit eutils python-r1 - -DESCRIPTION="A simple portage python wrapper which works like other package managers(apt-get/yum/dnf)" -HOMEPAGE="http://redcorelinux.org" -SRC_URI="https://github.com/redcorelinux/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="+gui" - -DEPEND="dev-lang/python[sqlite]" -RDEPEND="${DEPEND} - app-portage/gentoolkit[${PYTHON_USEDEP}] - dev-python/animation[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - dev-python/urllib3[${PYTHON_USEDEP}] - sys-apps/portage[${PYTHON_USEDEP}] - gui? ( dev-python/PyQt5[designer,gui,widgets,${PYTHON_USEDEP}] sys-apps/gentoo-functions )" - -src_prepare() { - default - eapply "${FILESDIR}"/"${PN}"-use-dateutil.patch - eapply "${FILESDIR}"/"${PN}"-drop-datetime.patch - eapply "${FILESDIR}"/"${PN}"-update.patch -} - -src_install() { - default - - inject_libsisyphus() { - # FIXME, ugly hack - python_moduleinto "$(python_get_sitedir)/.." - python_domodule src/backend/libsisyphus.py - rm -rf ${D}$(python_get_sitedir) - } - - python_foreach_impl inject_libsisyphus - - dosym /usr/share/${PN}/${PN}-cli.py /usr/bin/${PN} - dodir var/lib/${PN}/{csv,db} - - dodir etc/${PN} - insinto etc/${PN} - doins ${FILESDIR}/mirrors.conf - - if ! use gui; then - rm -rf ${ED}usr/bin/${PN}-gui - rm -rf ${ED}usr/bin/${PN}-gui-pkexec - rm -rf ${ED}usr/share/${PN}/${PN}-gui.py - rm -rf ${ED}usr/share/${PN}/icon - rm -rf ${ED}usr/share/${PN}/ui - rm -rf ${ED}usr/share/applications - rm -rf ${ED}usr/share/pixmaps - rm -rf ${ED}usr/share/polkit-1 - fi -} - -pkg_postinst() { - sisyphus rescue -} diff --git a/app-portage/sisyphus/sisyphus-1.1804-r4.ebuild b/app-portage/sisyphus/sisyphus-1.1804-r4.ebuild new file mode 100644 index 00000000..faa23dfd --- /dev/null +++ b/app-portage/sisyphus/sisyphus-1.1804-r4.ebuild @@ -0,0 +1,65 @@ +# Copyright 2016-2017 Redcore Linux Project +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{4,5,6} ) + +inherit eutils python-r1 + +DESCRIPTION="A simple portage python wrapper which works like other package managers(apt-get/yum/dnf)" +HOMEPAGE="http://redcorelinux.org" +SRC_URI="https://github.com/redcorelinux/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+gui" + +DEPEND="dev-lang/python[sqlite]" +RDEPEND="${DEPEND} + app-portage/gentoolkit[${PYTHON_USEDEP}] + dev-python/animation[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + sys-apps/portage[${PYTHON_USEDEP}] + gui? ( dev-python/PyQt5[designer,gui,widgets,${PYTHON_USEDEP}] sys-apps/gentoo-functions )" + +src_prepare() { + default + eapply "${FILESDIR}"/"${PN}"-fixes.patch +} + +src_install() { + default + + inject_libsisyphus() { + # FIXME, ugly hack + python_moduleinto "$(python_get_sitedir)/.." + python_domodule src/backend/libsisyphus.py + rm -rf ${D}$(python_get_sitedir) + } + + python_foreach_impl inject_libsisyphus + + dosym /usr/share/${PN}/${PN}-cli.py /usr/bin/${PN} + dodir var/lib/${PN}/{csv,db} + + dodir etc/${PN} + insinto etc/${PN} + doins ${FILESDIR}/mirrors.conf + + if ! use gui; then + rm -rf ${ED}usr/bin/${PN}-gui + rm -rf ${ED}usr/bin/${PN}-gui-pkexec + rm -rf ${ED}usr/share/${PN}/${PN}-gui.py + rm -rf ${ED}usr/share/${PN}/icon + rm -rf ${ED}usr/share/${PN}/ui + rm -rf ${ED}usr/share/applications + rm -rf ${ED}usr/share/pixmaps + rm -rf ${ED}usr/share/polkit-1 + fi +} + +pkg_postinst() { + sisyphus rescue +} -- cgit v1.2.3