public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-apps/pkgcore/files: 0.5.11.8-magic-compat.patch
@ 2011-03-05 22:13 Brian Harring (ferringb)
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Harring (ferringb) @ 2011-03-05 22:13 UTC (permalink / raw
  To: gentoo-commits

ferringb    11/03/05 22:13:29

  Added:                0.5.11.8-magic-compat.patch
  Log:
  fix incompatibility introduced in file 5.05
  
  (Portage version: 2.2.0_alpha3/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-apps/pkgcore/files/0.5.11.8-magic-compat.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/pkgcore/files/0.5.11.8-magic-compat.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/pkgcore/files/0.5.11.8-magic-compat.patch?rev=1.1&content-type=text/plain

Index: 0.5.11.8-magic-compat.patch
===================================================================
From d739669499bd04058f87f40e78405989b6a86dc1 Mon Sep 17 00:00:00 2001
From: Brian Harring <ferringb@gmail.com>
Date: Fri, 4 Feb 2011 02:10:38 -0800
Subject: [PATCH] add compatibility for 5.05 of file

---
 pkgcore/util/file_type.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/pkgcore/util/file_type.py b/pkgcore/util/file_type.py
index ee8ae7e..2557528 100644
--- a/pkgcore/util/file_type.py
+++ b/pkgcore/util/file_type.py
@@ -23,7 +23,12 @@ class file_identifier(object):
             import magic
         except ImportError:
             return self._fallback_file
-        obj = magic.open(magic.MAGIC_NONE)
+        if hasattr(magic, 'MAGIC_NONE'):
+            # <5.05 of file
+            magic_const = magic.MAGIC_NONE
+        else:
+            magic_const = magic.NONE
+        obj = magic.open(magic_const)
         ret = obj.load()
         if ret != 0:
             raise ValueError("non zero ret from loading magic: %s" % ret)
-- 
1.7.4







^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in sys-apps/pkgcore/files: 0.5.11.8-magic-compat.patch
@ 2011-06-22 22:02 Brian Harring (ferringb)
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Harring (ferringb) @ 2011-06-22 22:02 UTC (permalink / raw
  To: gentoo-commits

ferringb    11/06/22 22:02:58

  Removed:              0.5.11.8-magic-compat.patch
  Log:
  pkgcore 0.6.5; fixup PMS/EAPI4 support, remove a fair number of user unfriendly behaviour
  
  (Portage version: 2.1.10.3/cvs/Linux x86_64)



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-22 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 22:13 [gentoo-commits] gentoo-x86 commit in sys-apps/pkgcore/files: 0.5.11.8-magic-compat.patch Brian Harring (ferringb)
  -- strict thread matches above, loose matches on Subject: below --
2011-06-22 22:02 Brian Harring (ferringb)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox