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"))
|
||||
group.add_option("-F", "--package-format", action="store", default='1.1',
|
||||
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):
|
||||
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.install_dir_suffix = "/install"
|
||||
self.__c.debug_dir_suffix = "/debug"
|
||||
self.__c.quilt_dir_suffix = "/patches"
|
||||
|
||||
# file/directory names
|
||||
#note: these don't seem very well, constants are used
|
||||
|
||||
+13
-1
@@ -488,7 +488,19 @@ def do_patch(sourceDir, patchFile, level = 0):
|
||||
level = 0
|
||||
|
||||
check_file(patchFile)
|
||||
(ret, out, err) = run_batch("patch -p%d < %s" %
|
||||
|
||||
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" %
|
||||
(level, patchFile))
|
||||
if ret:
|
||||
if out is None and err is None:
|
||||
|
||||
Reference in New Issue
Block a user