Add backported upstream patches.

This commit is contained in:
mluscon 2015-06-12 10:18:36 +02:00
parent de255a7cf2
commit a313a3e265
3 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,40 @@
From f676801b93c6a3b9261e9524f8da249bd341e2a8 Mon Sep 17 00:00:00 2001
From: Michal Luscon <mluscon@redhat.com>
Date: Tue, 9 Jun 2015 15:15:30 +0200
Subject: [PATCH 1/3] conf: change minrate threshold to librepo default
(RhBug:1212320)
---
dnf/yum/config.py | 2 +-
doc/conf_ref.rst | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dnf/yum/config.py b/dnf/yum/config.py
index 1be7167..803eb3b 100644
--- a/dnf/yum/config.py
+++ b/dnf/yum/config.py
@@ -772,7 +772,7 @@ class YumConf(BaseConfig):
enablegroups = BoolOption(True)
bandwidth = BytesOption(0)
- minrate = BytesOption(0)
+ minrate = BytesOption(1000)
ip_resolve = CaselessSelectionOption(
allowed=('ipv4', 'ipv6', 'whatever'),
mapper={'4': 'ipv4', '6': 'ipv6'})
diff --git a/doc/conf_ref.rst b/doc/conf_ref.rst
index 0dbf87e..958e9fd 100644
--- a/doc/conf_ref.rst
+++ b/doc/conf_ref.rst
@@ -294,7 +294,7 @@ configuration.
``minrate``
storage size
- This sets the low speed threshold in bytes per second. If the server is sending data at the same or slower speed than this value for at least :ref:`timeout option <timeout-label>` seconds, DNF aborts the connection. The default is 0. Valid units are 'k', 'M', 'G'.
+ This sets the low speed threshold in bytes per second. If the server is sending data at the same or slower speed than this value for at least :ref:`timeout option <timeout-label>` seconds, DNF aborts the connection. The default is 1000. Valid units are 'k', 'M', 'G'.
``proxy``
string
--
2.4.2

View File

@ -0,0 +1,28 @@
From 784501a9b3b2c30610e67754ec4aaa2a26096022 Mon Sep 17 00:00:00 2001
From: Jan Silhan <jsilhan@redhat.com>
Date: Wed, 10 Jun 2015 15:11:31 +0200
Subject: [PATCH 2/3] group: fixed installing of already installed environment
---
dnf/base.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dnf/base.py b/dnf/base.py
index e1b32e6..2be68f2 100644
--- a/dnf/base.py
+++ b/dnf/base.py
@@ -1193,8 +1193,9 @@ class Base(object):
types = self._translate_comps_pkg_types(types)
trans = dnf.comps.install_or_skip(solver.environment_install,
env, types, exclude or set())
- if trans:
- return self._add_comps_trans(trans)
+ if not trans:
+ return 0
+ return self._add_comps_trans(trans)
def environment_remove(self, env):
solver = self.build_comps_solver()
--
2.4.2

View File

@ -11,7 +11,7 @@
Name: dnf
Version: 1.0.1
Release: 1%{?snapshot}%{?dist}
Release: 2%{?snapshot}%{?dist}
Summary: Package manager forked from Yum, using libsolv as a dependency resolver
# For a breakdown of the licensing, see PACKAGE-LICENSING
License: GPLv2+ and GPLv2 and GPL
@ -22,6 +22,8 @@ URL: https://github.com/rpm-software-management/dnf
# ./archive
# tarball will be generated in $HOME/rpmbuild/sources/
Source0: http://rpm-software-management.fedorapeople.org/dnf-%{version}.tar.gz
Patch0: 0001-conf-change-minrate-threshold-to-librepo-default-RhB.patch
Patch1: 0002-group-fixed-installing-of-already-installed-environm.patch
BuildArch: noarch
BuildRequires: cmake
BuildRequires: gettext
@ -119,6 +121,8 @@ Alternative CLI to "dnf upgrade" suitable for automatic, regular execution.
%prep
%setup -q -n dnf-%{version}
%patch0 -p1
%patch1 -p1
rm -rf py3
mkdir ../py3
cp -a . ../py3/
@ -241,6 +245,10 @@ popd
%systemd_postun_with_restart dnf-automatic.timer
%changelog
* Tue Jun 09 2015 Michal Luscon <mluscon@redhat.com> 1.0.1-2
- conf: change minrate threshold to librepo default (RhBug:1212320)
- group: fixed installation of already installed environments
* Tue Jun 09 2015 Michal Luscon <mluscon@redhat.com> 1.0.1-1
- doc: document variables in repo conf (Michal Luscon)
- groups: temporary fix for group remove (RhBug:1214968) (Michal Luscon)