Hello community,

here is the log from the commit of package python-xattr for openSUSE:Factory 
checked in at 2012-06-26 17:26:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xattr (Old)
 and      /work/SRC/openSUSE:Factory/.python-xattr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-xattr", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xattr/python-xattr.changes        
2011-12-06 13:53:43.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-xattr.new/python-xattr.changes   
2012-06-26 17:26:40.000000000 +0200
@@ -1,0 +2,10 @@
+Fri Jun 22 01:13:30 UTC 2012 - [email protected]
+
+- Update to 0.6.4:
+  * Updated README.txt to match setup.py description
+  * Bug fixes for Solaris port
+- Changes from 0.6.3:
+  * Fix tests for Linux, allow xattr on symlinks
+- Update URL as changed in setup.py
+
+-------------------------------------------------------------------

Old:
----
  xattr-0.6.2.tar.gz

New:
----
  xattr-0.6.4.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-xattr.spec ++++++
--- /var/tmp/diff_new_pack.MJMtjL/_old  2012-06-26 17:26:40.000000000 +0200
+++ /var/tmp/diff_new_pack.MJMtjL/_new  2012-06-26 17:26:40.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-xattr
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -11,18 +11,18 @@
 # case the license is the MIT License). An "Open Source License" is a
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
-#
+
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
 
 Name:           python-xattr
-Version:        0.6.2
+Version:        0.6.4
 Release:        0
-License:        MIT
 Summary:        Python wrapper for extended filesystem attributes
-Url:            http://undefined.org/python/#xattr
+License:        MIT
 Group:          Development/Languages/Python
+Url:            http://github.com/xattr/xattr
 Source:         xattr-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRequires:  python-distribute
@@ -51,7 +51,7 @@
 python setup.py install --prefix=%{_prefix} --root=%{buildroot}
 
 %files
-%defattr(-,root,root,-)
+%defattr(-,root,root)
 %doc CHANGES.txt LICENSE.txt README.txt TODO.txt
 %{_bindir}/xattr
 %{python_sitearch}/*

++++++ xattr-0.6.2.tar.gz -> xattr-0.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/.gitignore new/xattr-0.6.4/.gitignore
--- old/xattr-0.6.2/.gitignore  1970-01-01 01:00:00.000000000 +0100
+++ new/xattr-0.6.4/.gitignore  2012-01-23 18:35:37.000000000 +0100
@@ -0,0 +1,6 @@
+/xattr.egg-info
+/build
+/dist
+*.pyc
+*.so
+.\#*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/CHANGES.txt new/xattr-0.6.4/CHANGES.txt
--- old/xattr-0.6.2/CHANGES.txt 2011-08-17 07:56:12.000000000 +0200
+++ new/xattr-0.6.4/CHANGES.txt 2012-02-01 20:29:13.000000000 +0100
@@ -1,3 +1,15 @@
+Version 0.6.4 released 2012-02-01
+
+* Updated README.txt to match setup.py description
+  https://github.com/xattr/xattr/issues/5
+* Bug fixes for Solaris port
+   https://github.com/xattr/xattr/pull/2
+
+Version 0.6.3 released 2012-01-23
+
+* Fix tests for Linux, allow xattr on symlinks
+  https://github.com/xattr/xattr/pull/4
+
 Version 0.6.2 released 2011-08-17
 
 * Bug fix in Solaris support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/PKG-INFO new/xattr-0.6.4/PKG-INFO
--- old/xattr-0.6.2/PKG-INFO    2011-08-17 17:39:37.000000000 +0200
+++ new/xattr-0.6.4/PKG-INFO    2012-02-01 20:31:20.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: xattr
-Version: 0.6.2
+Version: 0.6.4
 Summary: Python wrapper for extended filesystem attributes
 Home-page: http://github.com/xattr/xattr
 Author: Bob Ippolito
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/README.txt new/xattr-0.6.4/README.txt
--- old/xattr-0.6.2/README.txt  2011-08-17 07:12:49.000000000 +0200
+++ new/xattr-0.6.4/README.txt  2012-02-01 20:26:19.000000000 +0100
@@ -1,8 +1,8 @@
-xattr is a Python wrapper for Darwin's extended filesystem attributes
+xattr is a Python wrapper for extended filesystem attributes.
 
 Extended attributes extend the basic attributes of files and directories
 in the file system.  They are stored as name:data pairs associated with
 file system objects (files, directories, symlinks, etc).
 
-Extended attributes are currently only available on Darwin 8.0 and later.
-This corresponds to Mac OS X 10.4 (Tiger).
+Extended attributes are currently only available on Darwin 8.0+ (Mac OS X 10.4)
+and Linux 2.6+. Experimental support is included for Solaris and FreeBSD.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/setup.py new/xattr-0.6.4/setup.py
--- old/xattr-0.6.2/setup.py    2011-08-17 07:59:44.000000000 +0200
+++ new/xattr-0.6.4/setup.py    2012-02-01 20:29:52.000000000 +0100
@@ -5,7 +5,7 @@
 
 from setuptools import setup, Extension
 
-VERSION = '0.6.2'
+VERSION = '0.6.4'
 DESCRIPTION = "Python wrapper for extended filesystem attributes"
 LONG_DESCRIPTION = """
 Extended attributes extend the basic attributes of files and directories
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/xattr/__init__.py 
new/xattr-0.6.4/xattr/__init__.py
--- old/xattr-0.6.2/xattr/__init__.py   2011-08-17 07:57:36.000000000 +0200
+++ new/xattr-0.6.4/xattr/__init__.py   2012-02-01 20:29:36.000000000 +0100
@@ -7,7 +7,7 @@
 that exposes these extended attributes.
 """
 
-__version__ = '0.6.2'
+__version__ = '0.6.4'
 from constants import XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE, \
     XATTR_NOSECURITY, XATTR_MAXNAMELEN, XATTR_FINDERINFO_NAME, \
     XATTR_RESOURCEFORK_NAME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/xattr/_xattr.c 
new/xattr-0.6.4/xattr/_xattr.c
--- old/xattr-0.6.2/xattr/_xattr.c      2011-08-17 07:54:30.000000000 +0200
+++ new/xattr-0.6.4/xattr/_xattr.c      2012-02-01 20:29:19.000000000 +0100
@@ -80,7 +80,7 @@
         return -1;
     }
 
-    if (options & XATTR_XATTR_NOFOLLOW) {
+    if (nofollow) {
         rv = extattr_set_link(path, EXTATTR_NAMESPACE_USER,
                                 name, value, size);
     }
@@ -175,7 +175,7 @@
         return -1;
     }
 
-    if (options & XATTR_XATTR_NOFOLLOW) {
+    if (nofollow) {
         return -1;
     }
     else {
@@ -387,14 +387,19 @@
     ssize_t nsize = 0;
 
     dirp = fdopendir(xfd);
+    if (dirp == NULL) {
+        return (-1);
+    }
     while (entry = readdir(dirp)) {
-       esize = strlen(entry->d_name);
-       if (nsize + esize + 1 < size) {
-           strcat(namebuf + nsize, entry->d_name);
+        if (strcmp(entry->d_name, ".") == 0 ||
+                strcmp(entry->d_name, "..") == 0)
+            continue;
+           esize = strlen(entry->d_name);
+           if (nsize + esize + 1 <= size) {
+            snprintf((char *)(namebuf + nsize), esize + 1,
+                    entry->d_name);
+       }
            nsize += esize + 1; /* +1 for \0 */
-       } else {
-           break;
-       }
     }
     closedir(dirp);
     return nsize;
@@ -447,7 +452,7 @@
     } else if (options != 0) {
         return -1;
     }
-    if (options & XATTR_XATTR_NOFOLLOW) {
+    if (nofollow) {
         return lsetxattr(path, name, value, size, options);
     } else {
         return setxattr(path, name, value, size, options);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/xattr/tests/test_xattr.py 
new/xattr-0.6.4/xattr/tests/test_xattr.py
--- old/xattr-0.6.2/xattr/tests/test_xattr.py   2011-08-17 07:12:49.000000000 
+0200
+++ new/xattr-0.6.4/xattr/tests/test_xattr.py   2012-01-23 18:28:45.000000000 
+0100
@@ -1,42 +1,54 @@
 import os
 from unittest import TestCase
-from tempfile import mkstemp, mkdtemp
+from tempfile import mkdtemp, NamedTemporaryFile
 
 import xattr
 
 class TestFile(TestCase):
     def setUp(self):
-        self.tempfh, self.tempfile = mkstemp()
+        self.tempfile = NamedTemporaryFile()
+        self.tempfilename = self.tempfile.name
 
     def tearDown(self):
-        os.close(self.tempfh)
-        os.unlink(self.tempfile)
+        self.tempfile.close()
 
     def testAttr(self):
         x = xattr.xattr(self.tempfile)
         self.assertEqual(x.keys(), [])
         self.assertEqual(dict(x), {})
 
-        x['sopal'] = 'foo'
-        x['sop.foo'] = 'bar'
+        x['user.sopal'] = 'foo'
+        x['user.sop.foo'] = 'bar'
         del x
 
         x = xattr.xattr(self.tempfile)
-        self.assertTrue('sopal' in x)
-        self.assertEqual(x['sopal'], 'foo')
-        self.assertTrue('sop.foo' in x)
-        self.assertEqual(x['sop.foo'], 'bar')
+        self.assertTrue('user.sopal' in x)
+        self.assertEqual(x['user.sopal'], 'foo')
+        self.assertTrue('user.sop.foo' in x)
+        self.assertEqual(x['user.sop.foo'], 'bar')
 
-        del x['sop.foo']
+        del x['user.sop.foo']
         del x
-        
+
         x = xattr.xattr(self.tempfile)
-        self.assertTrue('sop.foo' not in x)
+        self.assertTrue('user.sop.foo' not in x)
 
+    def testSymlinkAttrs(self):
+        symlinkPath = self.tempfilename + '.link'
+        os.symlink(self.tempfilename, symlinkPath)
+        try:
+            symlink = xattr.xattr(symlinkPath, options=xattr.XATTR_NOFOLLOW)
+            realfile = xattr.xattr(self.tempfilename)
+            symlink['user.islink'] = 'true'
+            self.assertEqual(dict(realfile), {})
+            self.assertEqual(symlink['user.islink'], 'true')
+        finally:
+            os.remove(symlinkPath)
 
 class TestDir(TestFile):
     def setUp(self):
         self.tempfile = mkdtemp()
-    
+        self.tempfilename = self.tempfile
+
     def tearDown(self):
-        os.rmdir(self.tempfile)
\ No newline at end of file
+        os.rmdir(self.tempfile)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/xattr.egg-info/PKG-INFO 
new/xattr-0.6.4/xattr.egg-info/PKG-INFO
--- old/xattr-0.6.2/xattr.egg-info/PKG-INFO     2011-08-17 17:39:35.000000000 
+0200
+++ new/xattr-0.6.4/xattr.egg-info/PKG-INFO     2012-02-01 20:31:17.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: xattr
-Version: 0.6.2
+Version: 0.6.4
 Summary: Python wrapper for extended filesystem attributes
 Home-page: http://github.com/xattr/xattr
 Author: Bob Ippolito
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xattr-0.6.2/xattr.egg-info/SOURCES.txt 
new/xattr-0.6.4/xattr.egg-info/SOURCES.txt
--- old/xattr-0.6.2/xattr.egg-info/SOURCES.txt  2011-08-17 17:39:35.000000000 
+0200
+++ new/xattr-0.6.4/xattr.egg-info/SOURCES.txt  2012-02-01 20:31:17.000000000 
+0100
@@ -1,3 +1,4 @@
+.gitignore
 CHANGES.txt
 INSTALLING.txt
 LICENSE.txt

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to