3
# this is part of langpack-o-matic, by Martin Pitt <martin.pitt@canonical.com>
5
# (C) 2005 Canonical Ltd.
6
# Author: Martin Pitt <martin.pitt@canonical.com>
8
# Updates a language-support-%PKGNAME% source package after the supplemental
9
# dependencies changed.
11
# After this script finishes successfully, the source package path will be
12
# written to "updated-packages".
14
# Usage: update-depends <language> <distro-release>
16
import sys, os, os.path, time
18
# change working directory to the directory of this script
19
os.chdir(os.path.dirname(sys.argv[0]))
21
sys.path.append('lib')
22
import macros, makepkg
24
if len(sys.argv) != 3:
25
print >> sys.stderr, 'Usage:', sys.argv[0], '<language> <distro release>'
31
# verify release and create config file
32
basepath = '../' + release
33
if not os.path.isdir(basepath):
34
raise OSError, 'Invalid distribution release, %s does not exist' % basepath
36
macr = macros.LangpackMacros(locale, '', release, time.strftime('%Y%m%d'))
37
pkg = macr.subst_string(basepath+'/sources-support/language-support-%PKGNAME%')
38
makepkg.make_pkg('skel-support', pkg, macr)