OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   23-Jan-2003 11:24:05
  Branch: OPENPKG_1_1_SOLID                Handle: 2003012310240500

  Added files:              (Branch: OPENPKG_1_1_SOLID)
    openpkg-src/python      python.patch
  Modified files:           (Branch: OPENPKG_1_1_SOLID)
    openpkg-src/python      python.spec

  Log:
    SA-2003.006-python; CAN-2002-1119

  Summary:
    Revision    Changes     Path
    1.1.2.1     +101 -0     openpkg-src/python/python.patch
    1.20.2.2    +3  -1      openpkg-src/python/python.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/python/python.patch
  ============================================================================
  $ cvs diff -u -r0 -r1.1.2.1 python.patch
  --- /dev/null 2003-01-23 11:24:05.000000000 +0100
  +++ python.patch      2003-01-23 11:24:05.000000000 +0100
  @@ -0,0 +1,101 @@
  +--- Lib/os.py-orig   Sat Mar 16 19:02:20 2002
  ++++ Lib/os.py        Sat Sep  7 06:49:09 2002
  +@@ -298,7 +298,7 @@
  +     _execvpe(file, args)
  + 
  + def execvpe(file, args, env):
  +-    """execv(file, args, env)
  ++    """execvpe(file, args, env)
  + 
  +     Execute the executable file (which is searched for along $PATH)
  +     with argument list args and environment env , replacing the
  +@@ -308,8 +308,9 @@
  + 
  + __all__.extend(["execl","execle","execlp","execlpe","execvp","execvpe"])
  + 
  +-_notfound = None
  + def _execvpe(file, args, env=None):
  ++    from errno import ENOENT, ENOTDIR
  ++
  +     if env is not None:
  +         func = execve
  +         argrest = (args, env)
  +@@ -317,7 +318,7 @@
  +         func = execv
  +         argrest = (args,)
  +         env = environ
  +-    global _notfound
  ++
  +     head, tail = path.split(file)
  +     if head:
  +         apply(func, (file,) + argrest)
  +@@ -327,30 +328,21 @@
  +     else:
  +         envpath = defpath
  +     PATH = envpath.split(pathsep)
  +-    if not _notfound:
  +-        if sys.platform[:4] == 'beos':
  +-            #  Process handling (fork, wait) under BeOS (up to 5.0)
  +-            #  doesn't interoperate reliably with the thread interlocking
  +-            #  that happens during an import.  The actual error we need
  +-            #  is the same on BeOS for posix.open() et al., ENOENT.
  +-            try: unlink('/_#.# ## #.#')
  +-            except error, _notfound: pass
  +-        else:
  +-            import tempfile
  +-            t = tempfile.mktemp()
  +-            # Exec a file that is guaranteed not to exist
  +-            try: execv(t, ('blah',))
  +-            except error, _notfound: pass
  +-    exc, arg = error, _notfound
  ++    saved_exc = None
  ++    saved_tb = None
  +     for dir in PATH:
  +         fullname = path.join(dir, file)
  +         try:
  +             apply(func, (fullname,) + argrest)
  +-        except error, (errno, msg):
  +-            if errno != arg[0]:
  +-                exc, arg = error, (errno, msg)
  +-    raise exc, arg
  +-
  ++        except error, e:
  ++            tb = sys.exc_info()[2]
  ++            if (e.errno != ENOENT and e.errno != ENOTDIR
  ++                and saved_exc is None):
  ++                saved_exc = e
  ++                saved_tb = tb
  ++    if saved_exc:
  ++        raise error, saved_exc, saved_tb
  ++    raise error, e, tb
  + 
  + # Change environ to automatically call putenv() if it exists
  + try:
  +@@ -374,7 +366,7 @@
  +         from riscosenviron import _Environ
  +     elif name in ('os2', 'nt', 'dos'):  # Where Env Var Names Must Be UPPERCASE
  +         # But we store them as upper case
  +-        class _Environ(UserDict.UserDict):
  ++        class _Environ(UserDict.IterableUserDict):
  +             def __init__(self, environ):
  +                 UserDict.UserDict.__init__(self)
  +                 data = self.data
  +@@ -403,7 +395,7 @@
  +                     self[k] = v
  + 
  +     else:  # Where Env Var Names Can Be Mixed Case
  +-        class _Environ(UserDict.UserDict):
  ++        class _Environ(UserDict.IterableUserDict):
  +             def __init__(self, environ):
  +                 UserDict.UserDict.__init__(self)
  +                 self.data = environ
  +--- Modules/Setup.dist       Wed Oct 17 15:46:28 2001
  ++++ Modules/Setup.dist       Thu Aug  8 21:52:42 2002
  +@@ -97,6 +97,7 @@
  + # setup.py script in the root of the Python source tree.
  + 
  + posix posixmodule.c         # posix (UNIX) system calls
  ++errno errnomodule.c         # posix (UNIX) errno values
  + _sre _sre.c                 # Fredrik Lundh's new regular expressions
  + new newmodule.c                     # Tommy Burnette's 'new' module
  + 
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/python/python.spec
  ============================================================================
  $ cvs diff -u -r1.20.2.1 -r1.20.2.2 python.spec
  --- openpkg-src/python/python.spec    26 Aug 2002 19:54:52 -0000      1.20.2.1
  +++ openpkg-src/python/python.spec    23 Jan 2003 10:24:05 -0000      1.20.2.2
  @@ -33,10 +33,11 @@
   Group:        Language
   License:      GPL
   Version:      2.2.1
  -Release:      1.1.0
  +Release:      1.1.1
   
   #   list of sources
   Source0:      ftp://ftp.python.org/pub/python/%{version}/Python-%{version}.tgz
  +Patch0:       python.patch
   
   #   build information
   Prefix:       %{l_prefix}
  @@ -58,6 +59,7 @@
   
   %prep
       %setup -q -n Python-%{version}
  +    %patch -p0
   
   %build
       CC="%{l_cc}" \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to