Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451526 - Update apache in thirdpartymirrors
Summary: Update apache in thirdpartymirrors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-12 13:32 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2013-05-03 11:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2013-01-12 13:32:01 UTC
I got lots of errors from apache mirrors. I looked, and the last update seems to be in early 2011, so it seems like about time. I'd be happy to do it myself if it's just a matter of parsing their mirrors list! Are these scripts kept in a repository somewhere? I might also be able to help with bug 232399.
Comment 1 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-04-29 07:53:24 UTC
Ping!! Please give me some guidance on this, it doesn't seem too hard.
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2013-05-03 11:50:20 UTC
Here's a script to extract new mirrors; committed the results to the tree.

from lxml import html
import urllib

URL = 'http://www.apache.org/mirrors/'

mirrors = []
root = html.parse(urllib.urlopen(URL)).getroot()
table = root.findall('.//table')[1]
for row in table.findall('tr'):

        if row.find('td') is None:
                continue

        cell = row.findall('td')[0]
        if cell.findall('a'):
                mirrors.append(cell.findall('a')[0].attrib['href'])

with open('thirdpartymirrors') as f:
        for ln in f:
                if ln.startswith('apache'):
                        print 'apache\t\t' + ' '.join(mirrors)
                else:
                        print ln.rstrip('\n')