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 <[email protected]>
---
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



Reply via email to