[weasel-commit] Source: which=2.16-4

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Sat, 02 Jan 2010 17:21:28 -0500

================================
which:source=2.16-4
cvc rdiff which -1 /weasel.rpath.org@wgl:3-devel/2.16-4
================================
2.16-4 Filip Brcic (brcha@xxxxxxx) Sat Jan  2 17:21:13 2010
    Automatic promote by rBuild.

which.recipe: new
--- /dev/null
+++ which.recipe
@@ -0,0 +20 @@
+#
+# Copyright (c) 2004-2005 rPath, Inc.
+# This file is distributed under the terms of the MIT License.
+# A copy is available at http://www.rpath.com/permanent/mit-license.html
+#
+
+class Which(AutoPackageRecipe):
+
+    name = "which"
+    version = "2.16"
+
+    buildRequires = [ 'install-info:runtime' ]
+
+    def unpack(r):
+        r.addArchive("http://ftp.gnu.org/gnu/which/which-%(version)s.tar.gz")
+        r.addSource("which-2.sh", dest='%(sysconfdir)s/profile.d/', mode=0755)
+        r.addPatch("which-2.13-afs.patch")
+        r.addPatch("which-2.14-broken.patch")
+    def policy(r):
+        r.AutoDoc('EXAMPLES')

which-2.13-afs.patch: new
--- /dev/null
+++ which-2.13-afs.patch
@@ -0,0 +40 @@
+--- which-2.16/bash.c.afs      2003-09-15 03:58:55.000000000 +0200
++++ which-2.16/bash.c  2003-09-24 23:40:25.000000000 +0200
+@@ -33,7 +33,6 @@
+  */
+ #define HAVE_GETGROUPS
+ #undef SHELL
+-#undef AFS
+ #undef NOGROUP
+ 
+ /*
+@@ -253,7 +252,7 @@
+   if (S_ISDIR (finfo.st_mode))
+     return (FS_EXISTS|FS_DIRECTORY);
+ 
+-#if defined (AFS)
++  if (getenv("AFS")) {
+   /* We have to use access(2) to determine access because AFS does not
+      support Unix file system semantics.  This may produce wrong
+      answers for non-AFS files when ruid != euid.  I hate AFS. */
+@@ -261,8 +260,9 @@
+     return (FS_EXISTS | FS_EXECABLE);
+   else
+     return (FS_EXISTS);
+-#else /* !AFS */
+-
++  }
++  else /* !AFS */
++    {
+   /* Find out if the file is actually executable.  By definition, the
+      only other criteria is that the file has an execute bit set that
+      we can use. */
+@@ -298,7 +298,7 @@
+     return (FS_EXISTS | FS_EXECABLE);
+ 
+   return (FS_EXISTS);
+-#endif /* !AFS */
++  } /* !AFS */
+ }
+ 
+ /* From bash-2.05b / general.c / line 501 ; Changes: Using 'strchr' instead 
of 'xstrchr'. */

which-2.sh: new
--- /dev/null
+++ which-2.sh
@@ -0,0 +4 @@
+# Initialization script for bash and sh
+
+# export AFS, if you are in AFS environment
+alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot 
--show-tilde'

which-2.16.tar.gz: new
which-2.14-broken.patch: new
--- /dev/null
+++ which-2.14-broken.patch
@@ -0,0 +33 @@
+--- which-2.14/tilde/tilde.c.orig      Mon Dec  9 18:52:19 2002
++++ which-2.14/tilde/tilde.c   Mon Dec  9 18:58:09 2002
+@@ -182,7 +182,10 @@
+   int result_size, result_index;
+ 
+   result_index = result_size = 0;
+-  if (result = strchr (string, '~'))
++
++  result = strchr (string, '~');
++  
++  if (!result)
+     result = xmalloc (result_size = (strlen (string) + 16));
+   else
+     result = xmalloc (result_size = (strlen (string) + 1));
+--- which-2.14/which.c.orig    Mon Dec  9 18:58:28 2002
++++ which-2.14/which.c Mon Dec  9 18:59:52 2002
+@@ -22,6 +22,7 @@
+ #include "getopt.h"
+ #include "tilde/tilde.h"
+ #include "bash.h"
++#include <ctype.h>
+ 
+ static const char *progname;
+ 
+@@ -536,7 +537,7 @@
+     while (fgets(buf, sizeof(buf), stdin))
+     {
+       int looks_like_function_start = 0;
+-      int function_start_version_205b;
++      int function_start_version_205b = 0;
+       if (read_functions)
+       {
+       // bash version 2.0.5a and older output a pattern for `str' like


Committed by: brcha

Other related posts: