[Python-modules-commits] r19095 - in packages/django-countries/trunk/debian (5 files)
fladi-guest at users.alioth.debian.org
fladi-guest at users.alioth.debian.org
Sat Oct 29 21:31:18 UTC 2011
Date: Saturday, October 29, 2011 @ 21:31:17
Author: fladi-guest
Revision: 19095
Moce locale directory and simplify postinst.
Added:
packages/django-countries/trunk/debian/python-django-countries.links
Modified:
packages/django-countries/trunk/debian/python-django-countries.dirs
packages/django-countries/trunk/debian/python-django-countries.lintian-overrides
packages/django-countries/trunk/debian/python-django-countries.postinst
packages/django-countries/trunk/debian/python-django-countries.prerm
Modified: packages/django-countries/trunk/debian/python-django-countries.dirs
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.dirs 2011-10-29 20:44:40 UTC (rev 19094)
+++ packages/django-countries/trunk/debian/python-django-countries.dirs 2011-10-29 21:31:17 UTC (rev 19095)
@@ -1 +1 @@
-/usr/share/pyshared/django_countries/locale
+/usr/share/python-django-countries/locale
Added: packages/django-countries/trunk/debian/python-django-countries.links
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.links (rev 0)
+++ packages/django-countries/trunk/debian/python-django-countries.links 2011-10-29 21:31:17 UTC (rev 19095)
@@ -0,0 +1 @@
+/usr/share/python-django-countries/locale /usr/share/pyshared/django_countries/locale
Modified: packages/django-countries/trunk/debian/python-django-countries.lintian-overrides
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.lintian-overrides 2011-10-29 20:44:40 UTC (rev 19094)
+++ packages/django-countries/trunk/debian/python-django-countries.lintian-overrides 2011-10-29 21:31:17 UTC (rev 19095)
@@ -1,3 +1,3 @@
# This directory is intentionally empty as it is populated by postinst with
# the symlink farm.
-python-django-countries binary: package-contains-empty-directory usr/share/pyshared/django_countries/locale/
+python-django-countries binary: package-contains-empty-directory usr/share/python-django-countries/locale/
Modified: packages/django-countries/trunk/debian/python-django-countries.postinst
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.postinst 2011-10-29 20:44:40 UTC (rev 19094)
+++ packages/django-countries/trunk/debian/python-django-countries.postinst 2011-10-29 21:31:17 UTC (rev 19095)
@@ -4,42 +4,23 @@
build_locale_symlinks ()
{
- local path dest
+ local path dest file
+ # Remove existing symlink farm. We will recreate it immediately.
+ rm -rf /usr/share/python-django-countries/locale/*
for file in /usr/share/locale/*/LC_MESSAGES/iso_3166.mo; do
- path=$(dirname /usr/share/pyshared/django_countries/locale/${file#/usr/share/locale/})
- # See if the directory already exists otherwise create it.
- if [ ! -d ${path} ]; then
- mkdir -p ${path}
- fi
+ # Create the necessary directory structure for each language.
+ path=$(dirname /usr/share/python-django-countries/locale/${file#/usr/share/locale/})
+ mkdir -p ${path}
+ # Create the symlink with an absolute target path (iso_3166.mo -> django.mo).
dest=${path}/django.mo
- # Is there a readable file. This also triggers if the is a dangling symlink.
- if [ ! -e ${dest} ]; then
- # Remove the file if it is a symlink as it is dangling.
- if [ -h ${dest} ]; then
- rm ${dest}
- fi
- # Create the symlink with an absolute target path.
- ln -s ${file} ${dest}
- fi
+ ln -s ${file} ${dest}
done
}
-if [ "$1" = "configure" ]; then
- # package has been updated and the symlink farm needs to be rebuilt.
+if [ "$1" = "configure" -o "$1" = "triggered" ]; then
+ # iso-codes has been updated
build_locale_symlinks
-elif [ "$1" = "triggered" ]; then
- for triggername in $2; do
- # iso-codes has been updated
- case "$triggername" in
- "iso-codes-translation-update")
- build_locale_symlinks
- ;;
- *)
- echo "unhandled/unknown trigger!"
- exit 1
- ;;
- esac
- done
+ exit 0
fi
#DEBHELPER#
Modified: packages/django-countries/trunk/debian/python-django-countries.prerm
===================================================================
--- packages/django-countries/trunk/debian/python-django-countries.prerm 2011-10-29 20:44:40 UTC (rev 19094)
+++ packages/django-countries/trunk/debian/python-django-countries.prerm 2011-10-29 21:31:17 UTC (rev 19095)
@@ -4,5 +4,7 @@
# Remove directories and symlinks created during postinst.
if [ "$1" = "upgrade" -o "$1" = "remove" ]; then
- rm -rf /usr/share/pyshared/django_countries/locale/*
+ rm -rf /usr/share/python-django-countries/locale/*
fi
+
+#DEBHELPER#
More information about the Python-modules-commits
mailing list