Careful what you wish for...

  • 12 August, 2011

Via #241343:

* Package name    : apt-gentoo
  Version         : 0.0.1
* URL             :
* License         : GPL version 2 or above
  Description     : enhanced package installation

 apt-gentoo enhances the Debian package installation experience to make
 it fully competitive with newly-popular source-based distributions.

 As packages are installed, apt-gentoo automatically downloads their
 build logs from the buildd network. The logs are then slowly scrolled
 past on the user's terminal to simulate building the software on the
 local machine.


So, something like:

#!/usr/bin/env python
# Insert into /etc/apt/conf.d/50apt-gentoo:
# DPkg {
#         Pre-Install-Pkgs { "/path/to/apt-gentoo || true"; };
# };

import time
import random
import urllib
import urllib2
import urlparse
import fileinput

from lxml import etree
from debian import debfile

for filename in fileinput.input():
    pkg_data = debfile.DebFile(filename.strip()).debcontrol()

    url = "" % urllib.urlencode({
        'pkg': pkg_data['Package'],
        'ver': pkg_data['Version'],
        'arch': pkg_data['Architecture'],

    html = etree.parse(urllib2.urlopen(url), etree.HTMLParser())
    link = html.xpath("//table[@class='data logs']//td[3]/a")

        fetch_url = urlparse.urljoin(
    except IndexError:

    html = etree.parse(urllib2.urlopen(fetch_url), etree.HTMLParser())

        log = html.xpath('//pre')[0].text.split('\n')
    except IndexError:

    for line in log:
        print line
        time.sleep(random.random() * 0.09)

Package/source and example installation transcript.

Comments (7)

Felix Geyer

Nice, time to re-open the ITP bug ;-)

Here is a version for Ubuntu:

Aug. 12, 2011, 4:50 p.m. #


Aug. 12, 2011, 5:05 p.m. #

I think you should change the 0.09 with a function of

awk '/bogo/{ a+=$3} END{ print a}' < /proc/cpuinfo

Otherwise this package won't meet users expectations.

Using /proc/cpuinfo and not any other means should be considered a requirement.

Aug. 12, 2011, 7:48 p.m. #

Could you please enhance it so that I can set arbitrary compile flags in order to get imaginary performance gains?

Aug. 13, 2011, 9 a.m. #
real-life Gentoo user

Gentoo has numerous deficiencies that are almost begging to be mocked. There is the dysfunctional "leadership", the terrible p.g.o website, the poor qa practices, the ever-delayed git migration, overlay proliferation, the endless portage-2.2.0 alpha/beta, .la file hell, the joy of libpng and jpeg upgrades, the recent changelog scandal - dozens of issues that anyone even tangentially involved with Gentoo would be aware of, and could easily make fun of.

Instead, you dredge up tired old memes ("Gentoo is for ricers" and "Gentoo is for people who like to watch gcc output scrolling by") that (a) have little relevance to what Gentoo is really about, and (b) went out of fashion around five or six years ago.

Or, as one might say - 2004 called, they want their jokes back.

When you are making fun of a subject, it helps to know something about it. I recommend you to try installing Gentoo on a spare machine and using it for a while. Maybe you will grow to love it, and will drop Debian, like I did. And even if you hate it, at least you will be able to write jokes that don't make your readers cringe :)

Aug. 13, 2011, 10:23 a.m. #
Your assumption that I have never used Gentoo is false, and I never used nor implied the "R"-word. I look forward to reading your criticism of Gentoo on the topics you outlined. Also, "I guess that's a debian user's idea [of] how package building works" is an idiotic statement if you know my work.

Dear "real-life Gentoo user",

You don't understand the humour properly. You do realise when the bug that lamby is fixing was filed? Yep: 2004. This is at least equally about poking fun at Debian as it is about reviving 7 year old jokes.

I think that this could have been better executed, however, had the package been added to the archive on exactly it's 8 year anniversary.


Aug. 29, 2011, 9:40 a.m. #
Alice Bevan-McGregor

I have server installs of Gentoo built from scratch (stage-zero) in 10 minutes. Kernel compiles from depclean take 54 seconds—it takes longer to download (and extract) the source than to compile it. I do not see compilation output unless something goes wrong, which it only ever does if I try to compile PHP in parallel. I only compile packages once for an entire cluster.

All of these 7-year-old jokes aren't just old, they're stupidly inaccurate.

Jan. 12, 2012, 4:35 p.m. #
u mad?