python-central NMU (python2.6 related)

View: New views
7 Messages — Rating Filter:   Alert me  

python-central NMU (python2.6 related)

by Piotr Ożarowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Matthias,

You uploaded new python-central package that fixed one indentation error
in pycentral.py (which is ok, this bug had Severity=important in BTS).
Since my NMU of python-central was still waiting in DELAYED (queue was
disabled by ftpmasters) at that time, it didn't make it into unstable.
Please let me know if it was just a coincidence and I can upload my
changes again (I assume that if you would want to reject it, you'd add a
comment over a month ago when I sent you my patch or you'd upload a new
version before Thursday, when my 0.6.11+nmu1 was supposed to be uploaded
to unstable). If it's ok with you, I'll upload my changes again this
Thursday.

Please note that when python-central will be fixed, we will be almost
ready for your upload of python2.6 to unstable - the only remaining
changes will be python-central based packages that do not define
XB-Python-Version - let me know if you want me to change python-central
to detect such packages and fix it in pycentral instead - I'll send you
a patch.
--
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc (205 bytes) Download Attachment

Re: python-central NMU (python2.6 related)

by Piotr Ożarowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

attached patch uploaded to DELAYED/4
--
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


diff -Nru python-central-0.6.12/debian/changelog python-central-0.6.12+nmu1/debian/changelog
--- python-central-0.6.12/debian/changelog 2009-10-29 19:21:57.000000000 +0100
+++ python-central-0.6.12+nmu1/debian/changelog 2009-11-05 20:56:11.000000000 +0100
@@ -1,3 +1,12 @@
+python-central (0.6.12+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix move_files() to work with python2.6's new locations. Closes: 547565.
+  * Fix few typos, missing declarations and indentation errors that lead
+    to a crash.
+
+ -- Piotr Ożarowski <piotr@...>  Thu, 05 Nov 2009 20:25:12 +0100
+
 python-central (0.6.12) unstable; urgency=low
 
   * Fix pycentral debhelper failure, when there are files in the root
diff -Nru python-central-0.6.12/pycentral.py python-central-0.6.12+nmu1/pycentral.py
--- python-central-0.6.12/pycentral.py 2009-10-29 19:19:04.000000000 +0100
+++ python-central-0.6.12+nmu1/pycentral.py 2009-11-05 20:54:06.000000000 +0100
@@ -1,6 +1,7 @@
 #! /usr/bin/python
 
-import fnmatch, glob, os, re, string, sys, time, cStringIO
+import glob, os, re, string, sys, time, cStringIO
+import logging
 from optparse import OptionParser
 from ConfigParser import SafeConfigParser
 
@@ -18,7 +19,7 @@
 
 shared_base = '/usr/share/pycentral/'
 shared_base2 = '/usr/share/pyshared/'
-pycentral_version = '0.6.11'
+pycentral_version = '0.6.12+nmu1'
 req_pycentral_version = '0.6.11'
 
 def samefs(path1, path2):
@@ -232,7 +233,7 @@
         for ext in ('c', 'o'):
             for fn in files:
                 fnc = fn + ext
- yield fnc
+                yield fnc
 
 installed_runtimes = None
 default_runtime = None
@@ -242,7 +243,6 @@
     global default_runtime
 
     if not installed_runtimes:
-        import glob
         installed_runtimes = []
         default_version = pyversions.default_version(version_only=True)
         supported = pyversions.supported_versions()
@@ -294,7 +294,7 @@
     if os.path.exists(fn):
         try:
             config.readfp(open(fn))
-        except Error:
+        except:
             logging.error("error reading config file `%s'" % fn)
             sys.exit(1)
     # checks
@@ -558,27 +558,27 @@
             if pversion in ('python2.3', 'python2.4', 'python2.5'):
                 srctop = os.path.join(self.pkgdir, 'usr/lib', pversion, 'site-packages')
             else:
-                srctop2 = os.path.join(self.pkgdir, 'usr/lib', pversion, 'dist-packages')
+                srctop = os.path.join(self.pkgdir, 'usr/lib', pversion, 'dist-packages')
+                srctop2 = os.path.join(self.pkgdir, 'usr/lib', pversion, 'site-packages')
                 srctop3 = os.path.join(self.pkgdir, 'usr/local/lib', pversion, 'dist-packages')
-                if os.path.isdir(srctop2) and (os.path.isdir(srctop) or os.path.isdir(srctop3)):
+                if os.path.isdir(srctop) and (os.path.isdir(srctop2) or os.path.isdir(srctop3)):
                     raise PyCentralError, 'both directories site-packages and dist-packages exist.'
-                if os.path.isdir(srctop):
-                    print 'renaming %s to %s' % (srctop, srctop2)
-                    os.rename(srctop, srctop2)
+                if os.path.isdir(srctop2):
+                    print 'renaming %s to %s' % (srctop2, srctop)
+                    os.rename(srctop2, srctop)
                 elif os.path.isdir(srctop3):
-                    print 'renaming %s to %s' % (srctop3, srctop2)
+                    print 'renaming %s to %s' % (srctop3, srctop)
                     try:
-                        os.makedirs(os.path.dirname(srctop2))
+                        os.makedirs(os.path.dirname(srctop))
                     except OSError:
                         pass
-                    os.rename(srctop3, srctop2)
+                    os.rename(srctop3, srctop)
                     while srctop3:
                         srctop3=os.path.dirname(srctop3)
                         try:
                             os.rmdir(srctop3)
                         except OSError:
                             break
-                srctop = srctop2
             for root, dirs, files in os.walk(srctop, topdown=False):
                 for name in files:
                     m = vrx.match(name)
@@ -651,8 +651,8 @@
             # remove empty dirs in /usr/lib/pythonX.Y
             for root, dirs, files in os.walk(self.pkgdir + '/usr/lib', topdown=False):
                 try:
-    if re.match("/usr/lib/python\d\.\d($|/)", root.replace(self.pkgdir, "")):
- os.rmdir(root)
+                    if re.match("/usr/lib/python\d\.\d($|/)", root.replace(self.pkgdir, "")):
+                        os.rmdir(root)
                 except OSError:
                     pass
             try:
@@ -980,7 +980,7 @@
         ppos = len(self.shared_prefix)
         for fn in self.shared_files:
             fn2 = rt.prefix + fn[ppos:]
-    yield fn2
+            yield fn2
 
 
     def install(self, runtimes, bc_option, exclude_regex,
@@ -1031,6 +1031,7 @@
             old_pylib_fs += old_pkg.other_pylib_files
 
         if old_pkg and old_pkg.shared_files:
+            ppos = len(self.shared_prefix)
             for rt in old_runtimes:
                 if rt in runtimes:
                     continue
@@ -1205,22 +1206,22 @@
                 linked_files = [ rt.prefix + fn[ppos:]
                                  for fn in self.shared_files
                                  if fn[-3:] == '.py']
- for f in default_runtime.list_byte_code(linked_files):
-    yield f
- for f in self.list_shared_files(rt):
-    yield f
+                for f in default_runtime.list_byte_code(linked_files):
+                    yield f
+                for f in self.list_shared_files(rt):
+                    yield f
         # list byte compiled files inside prefix
         if self.pylib_files:
             for pyver, files in self.pylib_files.items():
                 rt = get_runtime_for_version(pyver)
                 if rt in runtimes:
-    for f in default_runtime.list_byte_code(files):
- yield f
+                    for f in default_runtime.list_byte_code(files):
+                        yield f
         # list byte code for script files
         if list_script_files:
             if self.private_files:
- for f in default_runtime.list_byte_code(self.private_files):
-    yield f
+                for f in default_runtime.list_byte_code(self.private_files):
+                    yield f
 
     def update_bytecode_files(self, runtimes, rt_default, bc_option):
         # byte-compile with default python version
@@ -1344,11 +1345,11 @@
                     rt = get_runtime_for_version(version)
                     rt.byte_compile_dirs(dirs, bc_option, self.options.exclude)
                 if self.private_dirs:
-                    version = pkg.version_field
+                    version = self.pkg.version_field
                     if version == 'current':
                         version = pyversions.default_version(version_only=True)
                     rt = get_runtime_for_version(version)
-                    rt.byte_compile_dirs(private_dirs, bc_option, self.options.exclude)
+                    rt.byte_compile_dirs(self.private_dirs, bc_option, self.options.exclude)
             except PyCentralError:
                 self.error("error byte-compiling package `%s'" % self.pkgname)
             return
@@ -1394,14 +1395,14 @@
         try:
             pkg.set_default_runtime_from_version_info()
         except ValueError:
-    # Package doesn't provide support for any supported runtime
-    if len(used_runtimes) == 0:
- self.error('%s needs unavailable runtime (%s)'
-   % (self.pkgname, pkg.version_field))
-    else:
- # Still byte compile for the available runtimes (with the
- # first matching runtime)
- pkg.default_runtime = get_runtime_for_version(used_runtimes[0])
+            # Package doesn't provide support for any supported runtime
+            if len(used_runtimes) == 0:
+                self.error('%s needs unavailable runtime (%s)'
+                           % (self.pkgname, pkg.version_field))
+            else:
+                # Still byte compile for the available runtimes (with the
+                # first matching runtime)
+                 pkg.default_runtime = get_runtime_for_version(used_runtimes[0])
         logging.debug('\tavail=%s, pkg=%s, install=%s'
                       % ([rt.short_name for rt in runtimes],
                          pkg.version_field,
@@ -1471,14 +1472,14 @@
         try:
             pkg.set_default_runtime_from_version_info()
         except ValueError:
-    # Package doesn't provide support for any supported runtime
-    if len(used_runtimes) == 0:
- self.error('%s needs unavailable runtime (%s)'
-   % (self.pkgname, pkg.version_field))
-    else:
- # Still byte compile for the available runtimes (with the
- # first matching runtime)
- pkg.default_runtime = get_runtime_for_version(used_runtimes[0])
+            # Package doesn't provide support for any supported runtime
+            if len(used_runtimes) == 0:
+                self.error('%s needs unavailable runtime (%s)'
+                           % (self.pkgname, pkg.version_field))
+            else:
+                # Still byte compile for the available runtimes (with the
+                # first matching runtime)
+                 pkg.default_runtime = get_runtime_for_version(used_runtimes[0])
 
         if os.path.exists('/var/lib/dpkg/info/%s.list' % self.pkgname):
             old_pkg = DebPackage('package', self.args[0], oldstyle=False)
@@ -1589,8 +1590,8 @@
             # original runtime may be removed, use the default
             pkg.default_runtime = get_default_runtime()
         try:
-    for f in pkg.list(runtimes, list_script_files=True):
- print f
+            for f in pkg.list(runtimes, list_script_files=True):
+                print f
         except PyCentralError, msg:
             self.error(msg)
 
@@ -1787,11 +1788,11 @@
 
     def run(self, global_options):
         runtimes = get_installed_runtimes(with_unsupported=True)
- for (p, v) in read_dpkg_status():
-    pkg = DebPackage('package', p)
-    pkg.read_version_info()
-    for f in pkg.list(runtimes, list_script_files=True):
- print f
+        for (p, v) in read_dpkg_status():
+            pkg = DebPackage('package', p)
+            pkg.read_version_info()
+            for f in pkg.list(runtimes, list_script_files=True):
+                print f
 
 register_action(ActionList)
 
@@ -2018,7 +2019,7 @@
     elif len(matching_actions) > 1:
         usage(sys.stderr,
               "ambiguous action `%s', matching actions: %s"
-              % (action_name, strlist(matching_actions)))
+              % (action_name, str(list(matching_actions))))
     else:
         action_name = matching_actions[0]
 



signature.asc (205 bytes) Download Attachment

Bug#547565: Info received (python-central NMU (python2.6 related))

by Debian Bug Tracking System :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for the additional information you have supplied regarding
this Bug report.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Matthias Klose <doko@...>

If you wish to submit further information on this problem, please
send it to 547565@....

Please do not send mail to owner@... unless you wish
to report a problem with the Bug-tracking system.

--
547565: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547565
Debian Bug Tracking System
Contact owner@... with problems


--
To UNSUBSCRIBE, email to debian-python-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: python-central NMU (python2.6 related)

by Piotr Ożarowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Piotr Ożarowski, 2009-11-05]
> attached patch uploaded to DELAYED/4

I actually used `dput ... -e 4` instead of `dput -e 4 ...` so it's
already in unstable. Sorry about that. I didn't do it on purpose :-(
--
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc (205 bytes) Download Attachment

Re: python-central NMU (python2.6 related)

by Matthias Klose :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Fyi, I replaced your NMU with my merge from Ubuntu, which already had these
changes. I may have missed the "indentation problems", please file separate bug
reports for these.

   Matthias

On 03.11.2009 16:07, Piotr Ożarowski wrote:

> Hi Matthias,
>
> You uploaded new python-central package that fixed one indentation error
> in pycentral.py (which is ok, this bug had Severity=important in BTS).
> Since my NMU of python-central was still waiting in DELAYED (queue was
> disabled by ftpmasters) at that time, it didn't make it into unstable.
> Please let me know if it was just a coincidence and I can upload my
> changes again (I assume that if you would want to reject it, you'd add a
> comment over a month ago when I sent you my patch or you'd upload a new
> version before Thursday, when my 0.6.11+nmu1 was supposed to be uploaded
> to unstable). If it's ok with you, I'll upload my changes again this
> Thursday.
>
> Please note that when python-central will be fixed, we will be almost
> ready for your upload of python2.6 to unstable - the only remaining
> changes will be python-central based packages that do not define
> XB-Python-Version - let me know if you want me to change python-central
> to detect such packages and fix it in pycentral instead - I'll send you
> a patch.


--
To UNSUBSCRIBE, email to debian-python-REQUEST@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...


Re: python-central NMU (python2.6 related)

by Piotr Ożarowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Matthias Klose, 2009-11-16]
> Fyi, I replaced your NMU with my merge from Ubuntu, which already had
> these changes. I may have missed the "indentation problems", please
> file separate bug reports for these.

srctop related lines were broken in Ubuntu, if you used Luca's merge
then it's fine, though (he even ported my changes in -dbg hack)

Did you upload new version somewhere?
--
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc (853 bytes) Download Attachment

Re: python-central NMU (python2.6 related)

by Piotr Ożarowski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

[Matthias Klose, 2009-11-16]
> Fyi, I replaced your NMU with my merge from Ubuntu, which already had
> these changes. I may have missed the "indentation problems", please
> file separate bug reports for these.

Indentation problems and typos were so obvious that I know now that you
didn't even read my debdiff. The most important change (srctop related)
is gone as well.

/me wasted lots of time testing these few lines :-(
--
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


signature.asc (853 bytes) Download Attachment