diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-04-03 00:37:03 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-04-03 00:53:58 +0200 |
commit | 28bca41d1b3bd683ed14bd6033884133f22f29bc (patch) | |
tree | bf0f1b4c3af415e259aad3d5d66ffaf84f990eff /scripts/lib/ptxd_make_world_patchin.sh | |
parent | ec601f5f9b7a07e0a1bcae5439e9be88a782c850 (diff) | |
download | ptxdist-28bca41d1b3bd683ed14bd6033884133f22f29bc.tar.gz ptxdist-28bca41d1b3bd683ed14bd6033884133f22f29bc.tar.xz |
[ptxd_make_world_patchin] work around git quiltimport's limitations
decompress bzip2 and gz patches on the fly.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_patchin.sh')
-rw-r--r-- | scripts/lib/ptxd_make_world_patchin.sh | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh index d9453b826..3611292ef 100644 --- a/scripts/lib/ptxd_make_world_patchin.sh +++ b/scripts/lib/ptxd_make_world_patchin.sh @@ -92,24 +92,36 @@ export -f ptxd_make_world_patchin_apply_git_init # # create a directory containing the patches and the selected series -# file. name that file "series" +# file. name that file "series". +# +# decompress "bz2" and "gz" patches on the fly # ptxd_make_world_patchin_apply_git_compat() { mv "${pkg_patchin_dir}/.ptxdist/patches" "${pkg_patchin_dir}/.ptxdist/patches.orig" && - mkdir "${pkg_patchin_dir}/.ptxdist/patches" && - - # FIXME use lndir? + mv "${pkg_patchin_dir}/.ptxdist/series" "${pkg_patchin_dir}/.ptxdist/series.orig" && + mkdir "${pkg_patchin_dir}/.ptxdist/patches" || return + local patch para while read patch para; do + local cat + case "${patch}" in ""|"#"*) continue ;; # skip empty lines and comments + *.gz) cat="zcat" ;; + *.bz2) cat="bzcat" ;; *) - # FIXME take care about subdirs - ln -s "../patches.orig/${patch}" "${pkg_patchin_dir}/.ptxdist/patches" || return + ln -s "../patches.orig/${patch}" "${pkg_patchin_dir}/.ptxdist/patches/${patch##*/}" && + echo "${patch}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/series" || return + continue ;; - esac - done < "${pkg_patchin_dir}/.ptxdist/series" && + esac && + + "${cat}" "${pkg_patchin_dir}/.ptxdist/patches.orig/${patch}" > \ + "${pkg_patchin_dir}/.ptxdist/patches/${patch%.*}" && + echo "${patch%.*}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/series" || return + + done < "${pkg_patchin_dir}/.ptxdist/series.orig" && ln -sf "../series" "${pkg_patchin_dir}/.ptxdist/patches" } @@ -122,12 +134,9 @@ export -f ptxd_make_world_patchin_apply_git_compat ptxd_make_world_patchin_apply_git() { # - # git quiltimport has uses a hardcoded "series" - # for now we cannot use git with series files not names "series" + # git quiltimport has certain limitations, work around them # - if [ -n "${pkg_patch_series}" -a "${pkg_patch_series##*/}" != "series" ]; then - ptxd_make_world_patchin_apply_git_compat || return - fi + ptxd_make_world_patchin_apply_git_compat || return git quiltimport --patches "${pkg_patchin_dir}/.ptxdist/patches" --author "unknown author <unknown.author@example.com>" } |