Bug 1415711 - DNF should not automatically download repodata over metered connections
Summary: DNF should not automatically download repodata over metered connections
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-23 13:56 UTC by Patrick Uiterwijk
Modified: 2017-02-16 11:32 UTC (History)
3 users (show)

Fixed In Version: dnf-2.1.0-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-16 11:32:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Patrick Uiterwijk 2017-01-23 13:56:10 UTC
I have no way to tell DNF not to download repodata over specific connections, either in NM or anywhere else.
This leads to DNF downloading the repodata up to once per hour, with 50MB.
If I'm on a metered or slow connection I might not want it to do this, as I may need the bandwith and/or data allowance.

It would be great if I could mark a connection as metered or DNF could detect that a connection is slow and then no automatically update the cache.

Comment 1 Honza Silhan 2017-02-01 16:26:20 UTC
from some discussion on fedora devel list:

On Tue, Nov 1, 2016 at 9:59 AM, Miroslav Suchý <msuchy> wrote:
> Dne 31.10.2016 v 12:55 Tom Hughes napsal(a):
>> The problem, as I believe has been repeatedly explained, is that you don't really have any idea whether the connection
>> is metered. Yes you may be trying to guess by considering things like 3G connections as metered but that is an extremely
>> poor proxy for whether a connection is metered.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1112230

Then new DNF config option ~sync_metadata_unmetred_conn_only, set to
True by default could be a solution. I am just skeptical about DNF
depending on NetworkManager.

Seems like bug 1112230 is fixed now so it may be possible.

Comment 2 Igor Gnatenko 2017-02-01 16:30:55 UTC
(In reply to Honza Silhan from comment #1)
> from some discussion on fedora devel list:
> 
> On Tue, Nov 1, 2016 at 9:59 AM, Miroslav Suchý <msuchy> wrote:
> > Dne 31.10.2016 v 12:55 Tom Hughes napsal(a):
> >> The problem, as I believe has been repeatedly explained, is that you don't really have any idea whether the connection
> >> is metered. Yes you may be trying to guess by considering things like 3G connections as metered but that is an extremely
> >> poor proxy for whether a connection is metered.
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1112230
> 
> Then new DNF config option ~sync_metadata_unmetred_conn_only, set to
> True by default could be a solution. I am just skeptical about DNF
> depending on NetworkManager.
Recommends: pythonX-networkmanager ?

Comment 3 Igor Gnatenko 2017-02-01 16:31:25 UTC
I was thinking about implementation and only tricky part would be "which connection librepo is going to use?".


Note You need to log in before you can comment on or make changes to this bug.