[pacman-dev] [PATCH] makepkg: deprecate repackaging without a package function
Allan McRae
allan at archlinux.org
Fri Apr 23 07:22:53 CEST 2010
File permissions are not guaranteed to stay the same on exit from fakeroot,
so repackaging may result in files with different permissions. This is
avioded when using a package() function (or split packages) as the
packaging step is rerun.
Signed-off-by: Allan McRae <allan at archlinux.org>
---
This extents the earier patch sent to the list and now deprecates the rebuilding
of packages without package() functions.
scripts/makepkg.sh.in | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index b2b449c..b306620 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1847,9 +1847,14 @@ fi
if (( INFAKEROOT )); then
if (( ! SPLITPKG )); then
if (( ! PKGFUNC )); then
- if (( BUILDFUNC && ! REPKG )); then
- run_build
- tidy_install
+ if (( ! REPKG )); then
+ if (( BUILDFUNC )); then
+ run_build
+ tidy_install
+ fi
+ else
+ warning "$(gettext "Repackaging without the use of a package() function is deprecated")"
+ plain "$(gettext "as it may not preserve file permissions.")"
fi
else
run_package
@@ -1975,8 +1980,13 @@ else
if (( PKGFUNC )); then
run_package
tidy_install
- elif (( ! REPKG )); then
- tidy_install
+ else
+ if (( ! REPKG )); then
+ tidy_install
+ else
+ warning "$(gettext "Repackaging without the use of a package() function is deprecated")"
+ plain "$(gettext "as it may not preserve file permissions.")"
+ fi
fi
create_package
else
--
1.7.0.5
More information about the pacman-dev
mailing list