1 apply_patches <- function(pkg) {
2 patch_path = file.path(patch_dir, pkg$name)
3 if (!file.exists(patch_path)) {
4 notice('no patches in',patch_path)
8 # make debian/patches for simple-patchsys
9 deb_patch = pkg$debfile('patches')
10 if (!dir.create(deb_patch)) {
11 fail('could not create patches directory', deb_patch)
14 # now just copy the contents of patch_path into debian/patches
15 for (patch in list.files(patch_path)) {
16 notice('including patch', patch)
17 file.copy(file.path(patch_path, patch), deb_patch)