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

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



Author: branden
Date: 2004-02-19 15:12:59 -0500 (Thu, 19 Feb 2004)
New Revision: 1074

Modified:
   trunk/debian/changelog
   trunk/debian/shell-lib.sh
Log:
(find_culprits):
* Guard against potentially empty second argument to fgrep.
* Reimplement the long error message that accompanies the discovery of
  obsolete or Policy-violating packages with file overlaps as a here
  document (since it is a pain to reflow the message every time the
  indentation level is changed).

(check_symlinks_and_bomb):
* Use warn() instead of die() when problems are found, so that multiple
  problems can be identified at the same time, and find_culprits() can be
  run (find_culprits() was previously unreachable).
* Call die() after find_culprits() returns.


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-02-19 19:56:03 UTC (rev 1073)
+++ trunk/debian/changelog	2004-02-19 20:12:59 UTC (rev 1074)
@@ -29,8 +29,19 @@
     (thanks, Filip Van Raemdonck).  (Closes: #233645)
     - debian/shell-lib.sh
 
- -- Branden Robinson <branden@debian.org>  Thu, 19 Feb 2004 14:52:33 -0500
+  * Guard against potentially empty second argument to fgrep in
+    find_culprits().  Reimplement the long error message that accompanies the
+    discovery of obsolete or Policy-violating packages with file overlaps as a
+    here document (since it is a pain to reflow the message every time the
+    indentation level is changed).  Use warn() instead of die() in
+    check_symlinks_and_bomb() when problems are found, so that multiple
+    problems can be identified at the same time, and find_culprits() can be
+    run (find_culprits() was previously unreachable).  Call die() after
+    find_culprits() returns.
+    - debian/shell-lib.sh
 
+ -- Branden Robinson <branden@debian.org>  Thu, 19 Feb 2004 15:06:51 -0500
+
 xfree86 (4.3.0-2) unstable; urgency=low
 
   * The "It's like I have a shotgun in my mouth, I've got my finger on the

Modified: trunk/debian/shell-lib.sh
===================================================================
--- trunk/debian/shell-lib.sh	2004-02-19 19:56:03 UTC (rev 1073)
+++ trunk/debian/shell-lib.sh	2004-02-19 20:12:59 UTC (rev 1074)
@@ -219,7 +219,8 @@
 }
 
 find_culprits () {
-  local f p dpkg_info_dir possible_culprits smoking_guns bad_packages package
+  local f p dpkg_info_dir possible_culprits smoking_guns bad_packages package \
+    msg
 
   reject_whitespace "$1"
   message "Searching for overlapping packages..."
@@ -228,29 +229,32 @@
     if [ "$(echo $dpkg_info_dir/*.list)" != "$dpkg_info_dir/*.list" ]; then
       possible_culprits=$(ls -1 $dpkg_info_dir/*.list | egrep -v \
         "(xbase-clients|xfree86-common|xfs|xlibs)")
-      smoking_guns=$(grep -l "$1" $possible_culprits)
-      if [ -n "$smoking_guns" ]; then
-        bad_packages=$(printf "\\n")
-        for f in $smoking_guns; do
-          # too bad you can't nest parameter expansion voodoo
-          p=${f%*.list}      # strip off the trailing ".list"
-          package=${p##*/}   # strip off the directories
-          bad_packages=$(printf "%s\n%s" "$bad_packages" "$package")
-        done
-        message "The following packages appear to have file overlaps" \
-                "with the XFree86 packages; these packages are either very" \
-                "old, or in violation of Debian Policy.  Try upgrading each of" \
-                "these packages to the latest available version if possible:" \
-                "for example, with the command \"apt-get install\".  If no" \
-                "newer version of a package is available, you will have to" \
-                "remove it: for example, with the command \"apt-get remove\". " \
-                "If even the latest available version of the package has this" \
-                "file overlap, please file a bug against that package with the" \
-                "Debian Bug Tracking System.  You may want to refer the package" \
-                "maintainer to section 12.8 of the Debian Policy manual."
-        message "The overlapping packages are: $bad_packages"
-      else
-        message "no overlaps found."
+      if [ -n "$possible_culprits" ]; then
+        smoking_guns=$(grep -l "$1" $possible_culprits)
+        if [ -n "$smoking_guns" ]; then
+          bad_packages=$(printf "\\n")
+          for f in $smoking_guns; do
+            # too bad you can't nest parameter expansion voodoo
+            p=${f%*.list}      # strip off the trailing ".list"
+            package=${p##*/}   # strip off the directories
+            bad_packages=$(printf "%s\n%s" "$bad_packages" "$package")
+          done
+          msg=$(cat <<EOF
+The following packages appear to have file overlaps with the XFree86 packages;
+these packages are either very old, or in violation of Debian Policy.  Try
+upgrading each of these packages to the latest available version if possible:
+for example, with the command "apt-get install".  If no newer version of a
+package is available, you will have to remove it; for example, with the command
+"apt-get remove".  If even the latest available version of the package has
+this file overlap, please file a bug against that package with the Debian Bug
+Tracking System.  You may want to refer the package maintainer to section 12.8
+of the Debian Policy manual.
+EOF)
+          message "$msg"
+          message "The overlapping packages are: $bad_packages"
+        else
+          message "no overlaps found."
+        fi
       fi
     else
       message "cannot search; no matches for $dpkg_info_dir/*.list."
@@ -334,20 +338,20 @@
     if [ -L "$symlink" ]; then
       if [ "$(maplink "$symlink")" != "$(readlink "$symlink")" ]; then
         problem=yes
-        die "$symlink symbolic link points to wrong location" \
-            "$(readlink "$symlink")"
+        warn "$symlink symbolic link points to wrong location" \
+             "$(readlink "$symlink")"
       fi
     elif [ -e "$symlink" ]; then
       problem=yes
-      die "$symlink is not a symbolic link"
+      warn "$symlink is not a symbolic link"
     else
       problem=yes
-      die "$symlink symbolic link does not exist"
+      warn "$symlink symbolic link does not exist"
     fi
     if [ -n "$problem" ]; then
       analyze_path "$symlink" "$(readlink "$symlink")"
       find_culprits "$symlink"
-      exit $SHELL_LIB_THROWN_ERROR
+      die "bad symbolic links on system"
     fi
     shift
   done



Reply to: