• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/scripts/xorg-release
Thomas De SchampheleireThomas De Schampheleire committed 60714bb2ed724 Jul 2014
Raw file
Source viewDiff to previous
xxxxxxxxxx
        print FORMAT_STRING % (pkgname, br_version.center(15), xorg_version.center(15), action)
 
1
#!/usr/bin/python
2
​
3
# This script generates a report on the packaging status of X.org
4
# releases in Buildroot. It does so by downloading the list of
5
# tarballs that are part of a given X.org release, and compare that
6
# with the packages that are available in Buildroot.
7
​
8
import BeautifulSoup
9
import re
10
import os
11
import urllib
12
from distutils.version import LooseVersion
13
​
14
# This can be customized
15
XORG_VERSION = "X11R7.7"
16
​
17
# Key names in dictionaries
18
XORG_VERSION_KEY = "xorg-version"
19
BR_VERSION_KEY = "br-version"
20
BR_NAME_KEY = "br-name"
21
​
22
# Packages part of X.org releases that we do not want to package in
23
# Buildroot (old drivers for hardware unlikely to be used in embedded
24
# contexts).
25
XORG_EXCEPTIONS = [
26
    'xf86-video-suncg6',
27
    'xf86-video-sunffb',
28
]
29
​
30
# Get the list of tarballs of a X.org release, parse it, and return a
31
# dictionary of dictionaries, of the form:
32
#
33
#   { <name_of_package> : { XORG_VERSION_KEY: <version_of_package> },
34
#     <name_of_package2> : { XORG_VERSION_KEY: <version_of_package2> }}
35
#
36
def get_xorg_release_pkgs():
37
    u = urllib.URLopener().open("http://www.x.org/releases/%s/src/everything/" % XORG_VERSION)
38
    b = BeautifulSoup.BeautifulSoup()
39
    b.feed(u.read())
40
    links = b.findAll("a")
41
    packages = {}
42
    r = re.compile("(.*)-([0-9\.]*).tar.bz2")
43
    # We now have a list of all links.
44
    for link in links:
45
        href = link.get("href")
46
        # Skip everything but tarballs
47
        if not href.endswith(".tar.bz2"):
48
            continue
49
        # Separate the name and the version
50
        groups = r.match(href)
51
        if not groups:
52
            continue
53
        name = groups.group(1)
54
        version = groups.group(2)
55
        # Skip packages we don't want to hear about
56
        if name in XORG_EXCEPTIONS:
57
            continue
58
        packages[name] = { XORG_VERSION_KEY : version }
59
    return packages
60
​
61
# Files and directories in package/x11r7/ that should be ignored in
62
# our processing.
63
BUILDROOT_EXCEPTIONS = [
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.