[yum-commits] 2 commits - docs/yum.conf.5 etc/yum-makecache.service etc/yum-makecache.timer yum.spec
James Antill
james at osuosl.org
Tue Oct 29 19:43:13 UTC 2013
docs/yum.conf.5 | 7 +++++++
etc/yum-makecache.service | 9 +++++++++
etc/yum-makecache.timer | 11 +++++++++++
yum.spec | 26 ++++++++++++++++++++++++++
4 files changed, 53 insertions(+)
New commits:
commit a1b09bbe43a32d0fc0f56a0e1f07544af2e67225
Author: James Antill <james at and.org>
Date: Tue Oct 29 15:41:30 2013 -0400
Add docs. for depsolve_loop_limit.
diff --git a/docs/yum.conf.5 b/docs/yum.conf.5
index cb7ab14..5c73a39 100644
--- a/docs/yum.conf.5
+++ b/docs/yum.conf.5
@@ -843,6 +843,13 @@ The origin LVM devices to use for snapshots. Wildcards and negation are allowed,
first match (positive or negative) wins.
Default is: !*/swap !*/lv_swap glob:/etc/yum/fssnap.d/*.conf
+.IP
+\fBdepsolve_loop_limit\fR
+Set the number of times any attempt to depsolve before we just give up. This
+shouldn't be needed as yum should always solve or fail, however it has been
+observed that it can loop forever with very large system upgrades. Setting
+this to `0' (or "forever") makes yum try forever. Default is `100'.
+
.SH "[repository] OPTIONS"
.LP
commit 7bdb1091c6ec707969f0e8ddcb74da18ba4faa94
Author: James Antill <james at and.org>
Date: Tue Oct 29 15:22:51 2013 -0400
Add yum-makecache systemd service, force network updates on for better UI.
diff --git a/etc/yum-makecache.service b/etc/yum-makecache.service
new file mode 100644
index 0000000..b4434ea
--- /dev/null
+++ b/etc/yum-makecache.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=yum makecache
+
+[Service]
+Type=oneshot
+Nice=19
+IOSchedulingClass=2
+IOSchedulingPriority=7
+ExecStart=/usr/bin/yum makecache fast
diff --git a/etc/yum-makecache.timer b/etc/yum-makecache.timer
new file mode 100644
index 0000000..02fb5a2
--- /dev/null
+++ b/etc/yum-makecache.timer
@@ -0,0 +1,11 @@
+[Unit]
+Description=yum makecache timer
+ConditionKernelCommandLine=!rd.live.image
+
+[Timer]
+OnBootSec=10min
+OnUnitInactiveSec=1h
+Unit=yum-makecache.service
+
+[Install]
+WantedBy=basic.target
diff --git a/yum.spec b/yum.spec
index c234291..fa8b782 100644
--- a/yum.spec
+++ b/yum.spec
@@ -3,10 +3,12 @@
%define yum_updatesd 0
%define disable_check 0
%define yum_cron_systemd 1
+%define yum_makecache_systemd 1
%if 0%{?rhel} <= 6
# rhel-6 doesn't have the systemd stuff...
%define yum_cron_systemd 0
+%define yum_makecache_systemd 0
%endif
%if ! 0%{?rhel}
@@ -19,6 +21,11 @@ BuildRequires: bash-completion
%define yum_cron_systemd 0
%endif
+%if 0%{?fedora} <= 20
+# Don't use .timer's before 20
+%define yum_makecache_systemd 0
+%endif
+
%if %{auto_sitelib}
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
@@ -228,6 +235,11 @@ rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/yum-cron
rm -f $RPM_BUILD_ROOT/%{_unitdir}/yum-cron.service
%endif
+%if %{yum_makecache_systemd}
+cp -a etc/yum-makecache.service /usr/lib/systemd/system
+cp -a etc/yum-makecache.timer /usr/lib/systemd/system
+%endif
+
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -319,6 +331,16 @@ fi
exit 0
%endif
+%if %{yum_makecache_systemd}
+%post
+%systemd_post yum-makecache.timer
+
+%preun
+%systemd_preun yum-makecache.timer
+
+%postun
+%systemd_postun_with_restart yum-makecache.timer
+%endif
%files -f %{name}.lang
%defattr(-, root, root, -)
@@ -358,6 +380,10 @@ exit 0
%dir %{_sysconfdir}/yum/pluginconf.d
%dir %{yum_pluginslib}
%dir %{yum_pluginsshare}
+%if %{yum_makecache_systemd}
+%{_unitdir}/yum-makecache.service
+%{_unitdir}/yum-makecache.timer
+%endif
%files cron
%defattr(-,root,root)
More information about the Yum-commits
mailing list