i forgot to commit these into trunk/
This commit is contained in:
@@ -452,6 +452,8 @@ to be downloaded from a repository containing sources.
|
|||||||
default=False, help=_("Do not install build dependencies, fail if a build dependency is present"))
|
default=False, help=_("Do not install build dependencies, fail if a build dependency is present"))
|
||||||
group.add_option("-F", "--package-format", action="store", default='1.1',
|
group.add_option("-F", "--package-format", action="store", default='1.1',
|
||||||
help=_("PiSi binary package formats: '1.0', '1.1' (default)"))
|
help=_("PiSi binary package formats: '1.0', '1.1' (default)"))
|
||||||
|
group.add_option("--use-quilt", action="store_true",
|
||||||
|
default=False, help=_("Use quilt patch management system instead of GNU patch"))
|
||||||
|
|
||||||
def add_steps_options(self):
|
def add_steps_options(self):
|
||||||
group = OptionGroup(self.parser, _("build steps"))
|
group = OptionGroup(self.parser, _("build steps"))
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class Constants:
|
|||||||
self.__c.work_dir_suffix = "/work" # these, too, because we might wanna change 'em
|
self.__c.work_dir_suffix = "/work" # these, too, because we might wanna change 'em
|
||||||
self.__c.install_dir_suffix = "/install"
|
self.__c.install_dir_suffix = "/install"
|
||||||
self.__c.debug_dir_suffix = "/debug"
|
self.__c.debug_dir_suffix = "/debug"
|
||||||
|
self.__c.quilt_dir_suffix = "/patches"
|
||||||
|
|
||||||
# file/directory names
|
# file/directory names
|
||||||
#note: these don't seem very well, constants are used
|
#note: these don't seem very well, constants are used
|
||||||
|
|||||||
@@ -488,6 +488,18 @@ def do_patch(sourceDir, patchFile, level = 0):
|
|||||||
level = 0
|
level = 0
|
||||||
|
|
||||||
check_file(patchFile)
|
check_file(patchFile)
|
||||||
|
|
||||||
|
if ctx.get_option('use_quilt'):
|
||||||
|
patchesDir = join_path(sourceDir, ctx.const.quilt_dir_suffix)
|
||||||
|
# Make sure sourceDir/patches directory exists and if not create one!
|
||||||
|
if not os.path.exists(patchesDir):
|
||||||
|
os.makedirs(patchesDir)
|
||||||
|
# Import original patch into quilt tree
|
||||||
|
(ret, out, err) = run_batch('quilt import -p %d -n %s %s' % (level, os.path.basename(patchFile), patchFile))
|
||||||
|
# run quilt push to apply original patch into tree
|
||||||
|
(ret, out, err) = run_batch('quilt push')
|
||||||
|
else:
|
||||||
|
# run GNU patch to apply original patch into tree
|
||||||
(ret, out, err) = run_batch("patch -p%d < %s" %
|
(ret, out, err) = run_batch("patch -p%d < %s" %
|
||||||
(level, patchFile))
|
(level, patchFile))
|
||||||
if ret:
|
if ret:
|
||||||
|
|||||||
Reference in New Issue
Block a user