rpms/yum-presto/devel speedup.patch, NONE, 1.1 yum-presto.spec, 1.10, 1.11
James Antill
james at fedoraproject.org
Wed Mar 11 18:19:11 UTC 2009
Author: james
Update of /cvs/pkgs/rpms/yum-presto/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14542
Modified Files:
yum-presto.spec
Added Files:
speedup.patch
Log Message:
* Wed Mar 11 2009 James Antill <james at fedoraproject.org> - 0.4.5-4
- Added speedup patch from upstream.
speedup.patch:
--- NEW FILE speedup.patch ---
commit b169b61683ec3275d7021441ba411ada48fe0fe9
Author: James Antill <james at and.org>
Date: Mon Feb 9 10:22:30 2009 -0500
Don't init. prest stuff all the time
diff --git a/yum-presto/presto.py b/yum-presto/presto.py
index 2130595..f4d9545 100644
--- a/yum-presto/presto.py
+++ b/yum-presto/presto.py
@@ -414,7 +414,10 @@ def config_hook(conduit):
help="disable Presto plugin and don't download any deltarpms")
# Set up Presto repositories
-def postreposetup_hook(conduit):
+# Don't do this whn repos. are setup as that happens a lot, but we only
+# care about presto when we are about to download packages. Eventaully if
+# we have MD deltas we'll want to trigger then too.
+def xpostreposetup_hook(conduit):
opts, commands = conduit.getCmdLine()
if opts and opts.disablepresto:
conduit.info(5, '--disablepresto specified - Presto disabled')
@@ -433,6 +436,7 @@ def predownload_hook(conduit):
global complete_download_size
global actual_download_size
+ xpostreposetup_hook(conduit)
opts, commands = conduit.getCmdLine()
if (opts and opts.disablepresto) or len(conduit.getDownloadPackages()) == 0:
return
commit 5637a30f03046edbc653dc41b41f9ed3f61bd113
Author: James Antill <james at and.org>
Date: Mon Feb 9 10:29:42 2009 -0500
Only operate on non-downloaded packages and repos for same
diff --git a/yum-presto/presto.py b/yum-presto/presto.py
index f4d9545..b545b9e 100644
--- a/yum-presto/presto.py
+++ b/yum-presto/presto.py
@@ -192,7 +192,7 @@ def getDelta(po, presto, rpmdb):
return bestdelta
-def downloadPkgs(conduit, presto):
+def downloadPkgs(conduit, presto, download_pkgs=None):
"""download list of package objects handed to you, return errors"""
errors = {}
@@ -207,9 +207,11 @@ def downloadPkgs(conduit, presto):
remote_pkgs = []
+ if download_pkgs is None:
+ download_pkgs = conduit.getDownloadPackages()
# see which deltas we need to download; if the delta is already
# downloaded, we can start it reconstructing in the background
- for po in conduit.getDownloadPackages():
+ for po in download_pkgs:
delta = getDelta(po, presto, conduit.getRpmDB())
if delta is None:
continue
@@ -417,14 +419,16 @@ def config_hook(conduit):
# Don't do this whn repos. are setup as that happens a lot, but we only
# care about presto when we are about to download packages. Eventaully if
# we have MD deltas we'll want to trigger then too.
-def xpostreposetup_hook(conduit):
+def xpostreposetup_hook(conduit, repos=None):
opts, commands = conduit.getCmdLine()
if opts and opts.disablepresto:
conduit.info(5, '--disablepresto specified - Presto disabled')
return
conduit.info(2, 'Setting up and reading Presto delta metadata')
- for active_repo in conduit.getRepos().listEnabled():
+ if repos is None:
+ repos = conduit.getRepos().listEnabled()
+ for active_repo in repos:
try:
deltamd = active_repo.retrieveMD("prestodelta")
except:
@@ -436,21 +440,32 @@ def predownload_hook(conduit):
global complete_download_size
global actual_download_size
- xpostreposetup_hook(conduit)
opts, commands = conduit.getCmdLine()
if (opts and opts.disablepresto) or len(conduit.getDownloadPackages()) == 0:
return
# Get download size, to calculate accurate download savings
pkglist = conduit.getDownloadPackages()
+ repos = set()
+ download_pkgs = []
for po in pkglist:
+ local = po.localPkg()
+ if os.path.exists(local):
+ if conduit._base.verifyPkg(local, po, False):
+ continue
+ repos.add(po.repo)
+ download_pkgs.append(po)
complete_download_size += int(po.size)
actual_download_size = complete_download_size
+ if not download_pkgs:
+ return
+ xpostreposetup_hook(conduit, repos)
conduit.info(2, "Downloading DeltaRPMs:")
+ download_pkgs.sort()
# Download deltarpms
- problems = downloadPkgs(conduit, pinfo)
+ problems = downloadPkgs(conduit, pinfo, download_pkgs)
# If 'exitondownloaderror' is on, exit
if conduit.confBool('main', 'exitondownloaderror') and \
Index: yum-presto.spec
===================================================================
RCS file: /cvs/pkgs/rpms/yum-presto/devel/yum-presto.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- yum-presto.spec 25 Feb 2009 18:24:30 -0000 1.10
+++ yum-presto.spec 11 Mar 2009 18:18:41 -0000 1.11
@@ -3,10 +3,11 @@
Summary: Presto plugin for yum
Name: yum-presto
Version: 0.4.5
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
Group: Development/Tools
Source: http://www.lesbg.com/jdieter/presto/%{name}-%{version}.tar.bz2
+Patch0: speedup.patch
URL: http://www.lesbg.com/jdieter/presto/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -26,6 +27,8 @@
%prep
%setup -q
+%patch0 -p2
+
%build
%install
@@ -45,6 +48,9 @@
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/presto.conf
%changelog
+* Wed Mar 11 2009 James Antill <james at fedoraproject.org> - 0.4.5-4
+- Added speedup patch from upstream.
+
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
More information about the fedora-extras-commits
mailing list