summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_patchin.sh
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-04-05 16:43:36 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-04-05 18:59:54 +0200
commitc143fbc64435c445a1fe3086e5a547017d0dc36b (patch)
tree411fd53b8685e8b2e3e6db093d979775530aa6a9 /scripts/lib/ptxd_make_world_patchin.sh
parent8960ef76b5d1fc62ac556045f47c4ed5aefa4e54 (diff)
downloadptxdist-c143fbc64435c445a1fe3086e5a547017d0dc36b.tar.gz
ptxdist-c143fbc64435c445a1fe3086e5a547017d0dc36b.tar.xz
[ptxd_make_world_patchin] rework generation of git "patches" compat dir
For various reasons (git quiltimport cannot handle compressed patches and uses a hardcoded "series" file) ptxdist creates a special "patches" folder that git quiltimport" works with. This patch changes the name of the folder from ".ptxdist/patches" to ".ptxdist/git-patches" so that the original patch folder can always be found in ".ptxdist/patches" and "patches" (which links to it) regardless of using git or not. This fixes a problem with the package "directfb-examples". 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.sh23
1 files changed, 11 insertions, 12 deletions
diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh
index 3611292ef..5e6da9b37 100644
--- a/scripts/lib/ptxd_make_world_patchin.sh
+++ b/scripts/lib/ptxd_make_world_patchin.sh
@@ -98,32 +98,29 @@ export -f ptxd_make_world_patchin_apply_git_init
#
ptxd_make_world_patchin_apply_git_compat()
{
- mv "${pkg_patchin_dir}/.ptxdist/patches" "${pkg_patchin_dir}/.ptxdist/patches.orig" &&
- mv "${pkg_patchin_dir}/.ptxdist/series" "${pkg_patchin_dir}/.ptxdist/series.orig" &&
- mkdir "${pkg_patchin_dir}/.ptxdist/patches" || return
+ mkdir "${pkg_patchin_dir}/.ptxdist/git-patches" || return
local patch para
while read patch para; do
local cat
+ local patch_file="${patch##*/}"
case "${patch}" in
""|"#"*) continue ;; # skip empty lines and comments
*.gz) cat="zcat" ;;
*.bz2) cat="bzcat" ;;
*)
- ln -s "../patches.orig/${patch}" "${pkg_patchin_dir}/.ptxdist/patches/${patch##*/}" &&
- echo "${patch}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/series" || return
+ ln -s "../patches/${patch}" "${pkg_patchin_dir}/.ptxdist/git-patches/${patch_file}" &&
+ echo "${patch_file}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/git-patches/series" || return
continue
;;
esac &&
- "${cat}" "${pkg_patchin_dir}/.ptxdist/patches.orig/${patch}" > \
- "${pkg_patchin_dir}/.ptxdist/patches/${patch%.*}" &&
- echo "${patch%.*}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/series" || return
+ "${cat}" "${pkg_patchin_dir}/.ptxdist/patches/${patch}" > \
+ "${pkg_patchin_dir}/.ptxdist/git-patches/${patch_file%.*}"
+ echo "${patch_file%.*}" "${para}" >> "${pkg_patchin_dir}/.ptxdist/git-patches/series" || return
- done < "${pkg_patchin_dir}/.ptxdist/series.orig" &&
-
- ln -sf "../series" "${pkg_patchin_dir}/.ptxdist/patches"
+ done < "${pkg_patchin_dir}/.ptxdist/series"
}
export -f ptxd_make_world_patchin_apply_git_compat
@@ -138,7 +135,9 @@ ptxd_make_world_patchin_apply_git()
#
ptxd_make_world_patchin_apply_git_compat || return
- git quiltimport --patches "${pkg_patchin_dir}/.ptxdist/patches" --author "unknown author <unknown.author@example.com>"
+ git quiltimport \
+ --patches "${pkg_patchin_dir}/.ptxdist/git-patches" \
+ --author "unknown author <unknown.author@example.com>"
}
export -f ptxd_make_world_patchin_apply_git