[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XFree86 SVN commit: r1758 - trunk/debian



Author: fabbione
Date: 2004-08-28 01:43:46 -0500 (Sat, 28 Aug 2004)
New Revision: 1758

Modified:
   trunk/debian/CHANGESETS
   trunk/debian/libx11-6.preinst.in
   trunk/debian/libxt6.preinst.in
Log:
Transition should not happen on fresh installation.


Modified: trunk/debian/CHANGESETS
===================================================================
--- trunk/debian/CHANGESETS	2004-08-28 06:40:48 UTC (rev 1757)
+++ trunk/debian/CHANGESETS	2004-08-28 06:43:46 UTC (rev 1758)
@@ -479,6 +479,6 @@
   using the legacy paths to unpack to the old location with no symlink to
   redirect them, which is precisely what we don't want (see section 6.5 of
   the Debian Policy Manual).
-    1753, 1757
+    1753, 1757, 1758
 
 vim:set ai et sts=4 sw=4 tw=80:

Modified: trunk/debian/libx11-6.preinst.in
===================================================================
--- trunk/debian/libx11-6.preinst.in	2004-08-28 06:40:48 UTC (rev 1757)
+++ trunk/debian/libx11-6.preinst.in	2004-08-28 06:43:46 UTC (rev 1758)
@@ -18,38 +18,41 @@
 #INCLUDE_SHELL_LIB#
 
 if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
-  # xkb directory moved in 4.0
-  MIGRATION_FILE=/var/run/libx11-6.xkb.migration
-  DIR=/usr/X11R6/lib/X11/xkb
-  if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then
-    # We do this debconf stuff in the preinst, not the postinst, because the
-    # migration needs to happen *before* other packages are unpacked.
-    # The question may not have been seen yet if this package wasn't
-    # pre-configured.  If not, we must ask now.
-    run db_metaget libx11-6/migrate_xkb_dir seen
-    if [ "$RET" != "true" ]; then
-      run db_input low libx11-6/migrate_xkb_dir
-      run db_go
-    fi
-    if db_get libx11-6/migrate_xkb_dir; then
-      if [ "$RET" = "true" ]; then
-        if migrate_dir_to_symlink "$DIR" "$(maplink "$DIR")"; then
-          >"$MIGRATION_FILE"
+  # If there is no $2, this is a fresh install.
+  if [ -n "$2" ]; then
+    # xkb directory moved in 4.0
+    MIGRATION_FILE=/var/run/libx11-6.xkb.migration
+    DIR=/usr/X11R6/lib/X11/xkb
+    if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then
+      # We do this debconf stuff in the preinst, not the postinst, because the
+      # migration needs to happen *before* other packages are unpacked.
+      # The question may not have been seen yet if this package wasn't
+      # pre-configured.  If not, we must ask now.
+      run db_metaget libx11-6/migrate_xkb_dir seen
+      if [ "$RET" != "true" ]; then
+        run db_input low libx11-6/migrate_xkb_dir
+        run db_go
+      fi
+      if db_get libx11-6/migrate_xkb_dir; then
+        if [ "$RET" = "true" ]; then
+          if migrate_dir_to_symlink "$DIR" "$(maplink "$DIR")"; then
+            >"$MIGRATION_FILE"
+          else
+            die "failed to migrate $DIR to $(maplink "$DIR")"
+          fi
         else
-          die "failed to migrate $DIR to $(maplink "$DIR")"
+          die "aborting at user request"
         fi
       else
-        die "aborting at user request"
+        internal_error "failure using db_get to retrieve" \
+          "libx11-6/migrate_xkb_dir"
       fi
-    else
-      internal_error "failure using db_get to retrieve" \
-        "libx11-6/migrate_xkb_dir"
     fi
+    # Ensure the app-defaults directory is in the correct place.
+    if ! check_symlink "$DIR"; then
+      make_symlink_sane "$DIR" "$(maplink "$DIR")"
+    fi
   fi
-  # Ensure the app-defaults directory is in the correct place.
-  if ! check_symlink "$DIR"; then
-    make_symlink_sane "$DIR" "$(maplink "$DIR")"
-  fi
 fi
 
 #DEBHELPER#

Modified: trunk/debian/libxt6.preinst.in
===================================================================
--- trunk/debian/libxt6.preinst.in	2004-08-28 06:40:48 UTC (rev 1757)
+++ trunk/debian/libxt6.preinst.in	2004-08-28 06:43:46 UTC (rev 1758)
@@ -18,38 +18,41 @@
 #INCLUDE_SHELL_LIB#
 
 if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
-  # app-defaults directory moved in 4.0
-  MIGRATION_FILE=/var/run/libxt6.app-defaults.migration
-  DIR=/usr/X11R6/lib/X11/app-defaults
-  if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then
-    # We do this debconf stuff in the preinst, not the postinst, because the
-    # migration needs to happen *before* other packages are unpacked.
-    # The question may not have been seen yet if this package wasn't
-    # pre-configured.  If not, we must ask now.
-    run db_metaget libxt6/migrate_app_defaults_dir seen
-    if [ "$RET" != "true" ]; then
-      run db_input low libxt6/migrate_app_defaults_dir
-      run db_go
-    fi
-    if db_get libxt6/migrate_app_defaults_dir; then
-      if [ "$RET" = "true" ]; then
-        if migrate_dir_to_symlink "$DIR" "$(maplink "$DIR")"; then
-          >"$MIGRATION_FILE"
+  # If there is no $2, this is a fresh install.
+  if [ -n "$2" ]; then
+    # app-defaults directory moved in 4.0
+    MIGRATION_FILE=/var/run/libxt6.app-defaults.migration
+    DIR=/usr/X11R6/lib/X11/app-defaults
+    if [ -d "$DIR" ] && [ ! -L "$DIR" ]; then
+      # We do this debconf stuff in the preinst, not the postinst, because the
+      # migration needs to happen *before* other packages are unpacked.
+      # The question may not have been seen yet if this package wasn't
+      # pre-configured.  If not, we must ask now.
+      run db_metaget libxt6/migrate_app_defaults_dir seen
+      if [ "$RET" != "true" ]; then
+        run db_input low libxt6/migrate_app_defaults_dir
+        run db_go
+      fi
+      if db_get libxt6/migrate_app_defaults_dir; then
+        if [ "$RET" = "true" ]; then
+          if migrate_dir_to_symlink "$DIR" "$(maplink "$DIR")"; then
+            >"$MIGRATION_FILE"
+          else
+            die "failed to migrate $DIR to $(maplink "$DIR")"
+          fi
         else
-          die "failed to migrate $DIR to $(maplink "$DIR")"
+          die "aborting at user request"
         fi
       else
-        die "aborting at user request"
+        internal_error "failure using db_get to retrieve" \
+          "libxt6/migrate_app_defaults_dir"
       fi
-    else
-      internal_error "failure using db_get to retrieve" \
-        "libxt6/migrate_app_defaults_dir"
     fi
+    # Ensure the app-defaults directory is in the correct place.
+    if ! check_symlink "$DIR"; then
+      make_symlink_sane "$DIR" "$(maplink "$DIR")"
+    fi
   fi
-  # Ensure the app-defaults directory is in the correct place.
-  if ! check_symlink "$DIR"; then
-    make_symlink_sane "$DIR" "$(maplink "$DIR")"
-  fi
 fi
 
 #DEBHELPER#



Reply to: