Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #210259

Re: Only Download Packages via Wi-Fi if Total Download Size Over 100 MB

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Only Download Packages via Wi-Fi if Total Download Size Over 100 MB
Date 2019-06-22 21:00 +0200
Message-ID <ybToZ-590-1@gated-at.bofh.it> (permalink)
References <ybNCV-1Jv-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat 22 Jun 2019 at 19:32:20 (+0700), Bagas Sanjaya wrote:
> In Android (Google Play), when a user is about to download application which its size is over 100 MB, a message is
> displayed whether the application is about to be downloaded only via Wi-Fi or continue using mobile data.
> 
> How can I configure the similar feature on apt, that is when user tried to install or upgrade packages, alert whether
> the download should continue only via Wi-Fi if the total download size is over 100 MB?

apt-get emits messages like:

  Calculating upgrade... Done
  The following packages will be upgraded:
    …   …   …   …
  9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  Need to get 52.5 MB/52.5 MB of archives.
  After this operation, 74.8 kB of additional disk space will be used.
  Do you want to continue? [Y/n]

If you wanted to automate it, I guess you could write a script to
pipe stdout through tee to some process that's checking the value and
taking action accordingly. It's the sort of thing I might do myself
if I were to have a mobile data account somewhere. (My smartphone
only uses wifi as it has no SIM, so I guess it's not really a phone.)

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Only Download Packages via Wi-Fi if Total Download Size Over 100 MB Bagas Sanjaya <bagasdotme@gmail.com> - 2019-06-22 14:50 +0200
  Re: Only Download Packages via Wi-Fi if Total Download Size Over 100 MB Ryan Nowakowski <tubaman@fattuba.com> - 2019-06-22 16:20 +0200
  Re: Only Download Packages via Wi-Fi if Total Download Size Over 100  MB David Wright <deblis@lionunicorn.co.uk> - 2019-06-22 21:00 +0200
    Re: Re: Only Download Packages via Wi-Fi if Total Download Size Over  100 MB Bagas Sanjaya <bagasdotme@gmail.com> - 2019-06-25 06:10 +0200

csiph-web