Files
linux/debian/bin/patch.apply
Ben Hutchings f4932e3768 Replace patch series lists with one main series and one per featureset
Change patch.apply.in to apply a single patch series without
filtering.  Move series/base to series-all and series/base-extra to
series-rt and series-none (the latter empty).

Remove the redundant status file support from patch.apply.in, and
convert it into a static file rather than a template.

Remove the redundant patch series list support from patches.py.

svn path=/dists/sid/linux/; revision=19071
2012-06-03 22:03:33 +00:00

51 lines
1.2 KiB
Python

#!/usr/bin/env python
import os, os.path, re, sys
from warnings import warn
from debian_linux.patches import PatchSeries
def main():
options, args = parse_options()
if len(args) > 1:
print "Too much arguments"
return
home = options.home
name = options.featureset or "all"
fp = file(os.path.join(home, "series-%s" % name))
PatchSeries(name, home, fp)()
def parse_options():
from optparse import OptionParser
parser = OptionParser(
usage = "%prog [OPTION]... [TARGET]",
)
parser.add_option(
'-f', '--featureset',
dest = 'featureset',
help = "featureset",
)
parser.add_option(
'-H', '--overwrite-home',
dest = 'home',
help = "overwrite home [no default]",
)
options, args = parser.parse_args()
return options, args
if __name__ == '__main__':
def showwarning(message, category, filename, lineno,
file=sys.stderr, line=''):
file.write("Warning: %s\n" % message)
import warnings
warnings.showwarning = showwarning
try:
main()
except RuntimeError, e:
sys.stderr.write("Error: %s\n" % e)
raise SystemExit, 1