Updating daily builds on a daily basis.

Sanjeev Gupta ghane0 at gmail.com
Fri Feb 1 03:26:08 UTC 2013


On Fri, Feb 1, 2013 at 3:15 AM, John Kim <johnkim.ubuntu at gmail.com> wrote:

> Sanjeev Gutpa,
>
> So do you only run those two commands at different times throughout the
> day? Are there any other commands to be aware of?
>

I sit at my laptop for most of the day, and when there is nothing
happening, I do:

# apt-get update ; apt-get -d -y dist-upgrade

and leave that running.  I have lots of PPAs, including firefox-next,
google, etc, so this takes some time.

Then, I immediately, or later, do:

# eatmydata apt-get upgrade

The reason the second command is later, is that I look at changelogs, so it
is in the foreground (with respect to my attention span).  Also, at one
time the Google archive was really, really, slow, so the first job was a
fire-an-forget.

Secondly, the "eatmydata" is a relic of when dpkg on btrfs was so
sloooooooooow, that a day's updates of a dozen packages would take 30
mins.  Adding "eatmydata" in front makes dpkg's fsync a NOOP.  As I do not
expect my laptop to crash during the upgrade, I can live without that
protection.  But then, no one expects the Spanish Inquisition...

(secondly.5) apt-btrfs-snapshot is fantastic.  Just remember to clear old
snapshots once in a while.

Thirdly, although I pull down packages in the "dist-upgrade" list, I
install only those in the "upgrade" list, so I see packages being held.
Once every few days, half-a-dozen packages (eg, python) become upgradable,
and get installed as a batch.

How can I ensure that by running those two commands, I get the daily build
> from the uk.archive.ubuntu.com archive? Because by default, mine is set
> to us.archive.ubuntu.com.
>

Firstly, this is not exactly equivalent to the "daily build", which applies
to the CDs, I think.  With the apt method, you may be a few hours ahead of
the daily build; including stuff that entered the archive after the nightly
build happened.  Assuming you are in Korea, (I am in Singapore) so our idea
of build times do not match Mr Shuttleworth's :-)

On the UK vs US archive, my reasoning is just not having to wait an entire
2 hours!!!!   I want my .debs NOW!!!!!  So I look at the rsync trace files
in /ubuntu/project/trace on the mirror, and see where it is syncing from,
and try to move closer to Canonical.  Again, this may not help, if the
primary has bad bandwidth to you.

See: https://launchpad.net/ubuntu/+archivemirrors  for archive delay
times.  But this is just an over-optimisation on my part.

The last bit of optimisation is because apt-get runs multiple fetches for
each archive specified, but serialises all fetches from the same archive.
So something like:

deb http://uk.archive.ubuntu.com/ubuntu/ raring main restricted
deb http://jp.archive.ubuntu.com/ubuntu/ quantal-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ raring universe
deb http://hk.archive.ubuntu.com/ubuntu/ quantal-updates universe
deb http://jp.archive.ubuntu.com/ubuntu/ raring multiverse
deb http://de.archive.ubuntu.com/ubuntu/ quantal-updates multiverse

means that my apt-get downloads happen in parallel

Hope this helps.
-- 
Sanjeev Gupta
+65 98551208     http://www.linkedin.com/in/ghane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-quality/attachments/20130201/a131e456/attachment.html>


More information about the Ubuntu-quality mailing list