[gentoo-dev] when the music's over

2009-03-08 Thread Ali Polatel
Hey everyone,
It's my turn to say goodbye.
It's been really nice for two years. I've had great fun and have no bad
feelings as I leave. This mail is meant as an apology to people who are
awaiting my return. I'm sorry to let you down.
So when the fun^Wmusic's over, turn off gentoo^Wthe lights.

Ah.. the reasons? there are no reasons, who needs reasons when you got exherbo?

Goodbye all you people
There's nothing you can say
To make me change my mind
Goodbye

-- 
Regards,
Ali Polatel



[gentoo-dev] Re: python_need_rebuild

2008-10-27 Thread Ali Polatel
Christian Faulhammer yazmış:
 Hi,
 
 Ali Polatel [EMAIL PROTECTED]:
 
  Packages using distutils_src_install don't need any modifications.
  For other packages I've opened a tracker bug¹. The usage is simple,
  just call python_need_rebuild without arguments in src_install.
 
  And what about packages (app-misc/gramps) that need a rebuilt, are not
 distutils based and use no python.eclass?
 
 V-Li
 

inherit python

src_install() {
python_need_rebuild
...
}

-- 
Regards,
Ali Polatel


pgpJtXPE3T2W0.pgp
Description: PGP signature


[gentoo-dev] python_need_rebuild

2008-10-26 Thread Ali Polatel
Hi everyone,
Rebuilding python modules after a python upgrade is a pita. In addition
to that it's not easy to determine what needs to be rebuilt and what
not. We have even ended up keeping a manual list of packages in
python-updater.

To make this situation less ugly, i have added a new function called
python_need_rebuild to python.eclass. This is a simple functions that
exports an environment variable which marks that the package has to be
rebuilt after a python upgrade. This way python-updater can accurately
find out what needs to be rebuilt.

Packages using distutils_src_install don't need any modifications.  For
other packages I've opened a tracker bug¹. The usage is simple, just
call python_need_rebuild without arguments in src_install.

And be ready for faster and more accurate python upgrades :)

¹: https://bugs.gentoo.org/show_bug.cgi?id=244555

-- 
Regards,
Ali Polatel


pgp2TZTlowWeD.pgp
Description: PGP signature


[gentoo-dev] Re: gentoo-x86 commit in dev-lang/python: ChangeLog python-2.6.ebuild python-2.5.2-r6.ebuild

2008-10-06 Thread Ali Polatel
Thomas Sachau yazmış:
 Ali Polatel (hawking) schrieb:
  use threads \
   myconf=${myconf} --with-threads \
  || myconf=${myconf} --without-threads
 
 What about an econf option $(use_with threads)?
 
  econf \
  --with-fpectl \
  --enable-shared \
  `use_enable ipv6` \
  --infodir='${prefix}'/share/info \
  --mandir='${prefix}'/share/man \
  --with-libc='' \
  ${myconf} || die
 
 || die could be dropped
 
  src_install() {
  dodir /usr
 
 Will the install fail without a /usr dir?
 
  src_configure
  make DESTDIR=${D} altinstall maninstall || die
 
 Why not emake?
 
  if use examples ; then
  mkdir -p ${D}/usr/share/doc/${P}/examples
  cp -r ${S}/Tools ${D}/usr/share/doc/${P}/examples
  fi
 
 what about this:
   insinto /usr/share/doc/${P}/examples
   doins -r Tools
 
  python_mod_cleanup /usr/lib/python${PYVER}
  [[ $(get_libdir) == lib ]] || \
  python_mod_cleanup /usr/$(get_libdir)/python${PYVER}
 
 Why not remove the first 2 lines?
 
  python_mod_optimize -x (site-packages|test) \
  /usr/lib/python${PYVER}
  [[ $(get_libdir) == lib ]] || \
  python_mod_optimize -x (site-packages|test) \
  
  /usr/$(get_libdir)/python${PYVER}
 
 the same here
 
 

+*python-2.6-r1 (06 Oct 2008)
+
+  06 Oct 2008; Ali Polatel [EMAIL PROTECTED] -python-2.6.ebuild,
+  +python-2.6-r1.ebuild:
+  Revbump. Use use_with for threads, remove die from econf, use emake
+  instead of make, remove redundant python_mod_{cleanup,optimize}. Drop old.
+

Thanks!

 -- 
 Thomas Sachau
 
 Gentoo Linux Developer
 

-- 
Regards,
Ali Polatel


pgpefd2hJM87p.pgp
Description: PGP signature


[gentoo-portage-dev] [PATCH] import cPickle as pickle

2008-09-23 Thread Ali Polatel
()
except SystemExit, e:
raise
@@ -652,11 +652,11 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, 
verbose=1, usingcache=
if modified in metadata[baseurl] and 
metadata[baseurl][modified]:
metadata[baseurl][timestamp] = int(time.time())
metadatafile = 
open(/var/cache/edb/remote_metadata.pickle, w+)
-   cPickle.dump(metadata,metadatafile)
+   pickle.dump(metadata,metadatafile)
metadatafile.close()
if makepickle:
metadatafile = open(makepickle, w)
-   cPickle.dump(metadata[baseurl][data],metadatafile)
+   pickle.dump(metadata[baseurl][data],metadatafile)
metadatafile.close()
except SystemExit, e:
raise
diff --git a/pym/portage/util.py b/pym/portage/util.py
index 177a6db..0e4fd0b 100644
--- a/pym/portage/util.py
+++ b/pym/portage/util.py
@@ -17,9 +17,9 @@ import portage.exception
 from portage.dep import isvalidatom
 
 try:
-   import cPickle
+   import cPickle as pickle
 except ImportError:
-   import pickle as cPickle
+   import pickle
 
 try:
import cStringIO as StringIO
@@ -568,7 +568,7 @@ def pickle_write(data,filename,debug=0):
import os
try:
myf=open(filename,w)
-   cPickle.dump(data,myf,-1)
+   pickle.dump(data,myf,-1)
myf.flush()
myf.close()
writemsg(Wrote pickle: +str(filename)+\n,1)
@@ -588,7 +588,7 @@ def pickle_read(filename,default=None,debug=0):
data = None
try:
myf = open(filename)
-   mypickle = cPickle.Unpickler(myf)
+   mypickle = pickle.Unpickler(myf)
mypickle.find_global = None
data = mypickle.load()
myf.close()
-- 
Regards,
Ali Polatel




[gentoo-dev] Re: Last rites: =dev-lang/python-2.3* (Second try)

2008-08-19 Thread Ali Polatel
Ali Polatel yazmış:
 Now that the packages depending on 2.3 are masked, masking this one
 again for removal in 30 days.
 

I've moved python-2.3 from gentoo-x86 to python junkyard overlay¹.

¹: http://overlays.gentoo.org/proj/python/browser/overlays/junkyard

-- 
Regards,
Ali Polatel


pgpB3R7i4FEp1.pgp
Description: PGP signature


[gentoo-portage-dev] portage-py3k status report

2008-08-15 Thread Ali Polatel
Hi,
I've written a status report¹ about portage py3k conversion. It tells
about the current state, what needs to be done etc.
I'll be updating the page so people can learn about the current status.

¹: http://dev.gentoo.org/~hawking/portage-2to3/status.xml

-- 
Regards,
Ali Polatel


pgpBFbU1QeIVp.pgp
Description: PGP signature


[gentoo-portage-dev] Re: portage-py3k status report

2008-08-15 Thread Ali Polatel
René 'Necoro' Neumann yazmış:
 What's the best way to send patches for the patches ;) ?

In this particular case you shouldn't send patches for patches, so it's
not a problem, see below ;)

snip
 But the complete expression could be rewritten as:
 
 return [int(fd) for fd in os.listdir(/proc/%i/fd % os.getpid()) if
 fd.isdigit()]
 
 This is more readable - and you don't need to traverse the list multiple
 times.
 
 Alternatively - if you like the functional style more:
 
 return list(map(int, filter(str.isdigit, os.listdir(/proc/%i/fd %
 os.getpid()
 
 Again more readable (if you are used to the functional style ;)) - and only
 one traversal (as iterators are used).
 

Portage aims for 2.4 compatibility and your snippets should work on 2.4
afaik. So you can submit it as a patch to the current trunk.
Changing the automatically generated output is not a good idea.

 Regards,
 Necoro

-- 
Regards,
Ali Polatel


pgpE4ozCfOnGL.pgp
Description: PGP signature


[gentoo-portage-dev] [PATCH] Fix warning for lib2to3/fixes/fix_map.py

2008-08-15 Thread Ali Polatel
2to3 gives a warning while converting portage codebase using map¹ fix:
RefactoringTool: Warnings/messages while refactoring:
RefactoringTool: ### In file ./pym/portage/dbapi/porttree.py ###
RefactoringTool: Line 266: You should use a for loop here

This is a valid warning because map() will change in py3k. Read the docstring of
fix_map.py for more information.

¹: http://svn.python.org/view/python/trunk/Lib/lib2to3/fixes/fix_map.py

---
 pym/portage/dbapi/porttree.py |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 2948ba6..4e76b1e 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -263,7 +263,8 @@ class portdbapi(dbapi):
# if newer version, wipe everything and negate eapi
eapi = metadata[EAPI]
metadata = {}
-   map(lambda x: metadata.setdefault(x, ), auxdbkeys)
+   for x in auxdbkeys:
+   metadata.setdefault(x, )
metadata[EAPI] = - + eapi
 
if metadata.get(INHERITED, False):
-- 
Regards,
Ali Polatel




[gentoo-portage-dev] [PATCH] fpformat is deprecated, use string interpolation

2008-08-14 Thread Ali Polatel
Hi,
The fpformat module is deprecated and will be removed in py3k.
The % string interpolation operator should be used instead.
Attached patch fixes this.

---
 pym/_emerge/__init__.py |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 7a5c743..9bc06db 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -24,7 +24,6 @@ import array
 from collections import deque
 import fcntl
 import formatter
-import fpformat
 import logging
 import select
 import shlex
@@ -8674,7 +8673,7 @@ class JobStatusDisplay(object):
avg = os.getloadavg()
except OSError, e:
return str(e)
-   return , .join(fpformat.fix(x, digits) for x in avg)
+   return , .join((%%.%df % digits ) % x for x in avg)
 
def display(self):

-- 
Regards,
Ali Polatel




[gentoo-dev] Re: Jeeves IRC replacement now alive - Willikins

2008-08-06 Thread Ali Polatel
Robin H. Johnson yazmış:
 Hi folks,
 
 Sorry that it's taken this long to get completed, but the Jeeves
 replacement, Willikins, is finally 99% done, and ready to join lots of
 channels.
 

Thanks!

 Getting the bot out there
 -
 If you would like to have the new bot in your #gentoo-* channel, would
 each channel founder/leader please respond to this thread, stating the
 channel name, and that they are the contact for any problems/troubles.
 

#gentoo-vim

-- 
Regards,
Ali Polatel


pgp2pCscnvZ9t.pgp
Description: PGP signature


[gentoo-portage-dev] [RFC/PATCH v2] New objects cpv, pv and version to be used instead of raw strings.

2008-07-23 Thread Ali Polatel
(ver2, str):
+   ## Backwards compatibility
+   msg = vercmp(str,str) is deprecated use portage.version object 
instead
+   warnings.warn(msg, DeprecationWarning)
+
+   if ver1 == ver2:
+   return 0
+   mykey=ver1+:+ver2
+   try:
+   return vercmp_cache[mykey]
+   except KeyError:
+   pass
+   match1 = ver_regexp.match(ver1)
+   match2 = ver_regexp.match(ver2)
+
+   # checking that the versions are valid
+   if not match1 or not match1.groups():
+   if not silent:
+   print !!! syntax error in version: %s % ver1
+   return None
+   if not match2 or not match2.groups():
+   if not silent:
+   print !!! syntax error in version: %s % ver2
+   return None
+
+   group1 = match1.groups()
+   group2 = match2.groups()
+   else:
+   raise TypeError(
+   Arguments aren't of type str,str or version,version)
 
# shortcut for cvs ebuilds (new style)
-   if match1.group(1) and not match2.group(1):
+   if group1[0] and not group2[0]:
vercmp_cache[mykey] = 1
return 1
-   elif match2.group(1) and not match1.group(1):
+   elif group2[0] and not group1[0]:
vercmp_cache[mykey] = -1
return -1

# building lists of the version parts before the suffix
# first part is simple
-   list1 = [int(match1.group(2))]
-   list2 = [int(match2.group(2))]
+   list1 = [int(group1[1])]
+   list2 = [int(group2[1])]
 
# this part would greatly benefit from a fixed-length version pattern
-   if len(match1.group(3)) or len(match2.group(3)):
-   vlist1 = match1.group(3)[1:].split(.)
-   vlist2 = match2.group(3)[1:].split(.)
+   if len(group1[2]) or len(group2[2]):
+   vlist1 = group1[2][1:].split(.)
+   vlist2 = group2[2][1:].split(.)
for i in range(0, max(len(vlist1), len(vlist2))):
# Implcit .0 is given a value of -1, so that 1.0.0  
1.0, since it
# would be ambiguous if two versions that aren't 
literally equal
@@ -111,10 +371,10 @@ def vercmp(ver1, ver2, silent=1):
list2.append(int(vlist2[i].ljust(max_len, 0)))
 
# and now the final letter
-   if len(match1.group(5)):
-   list1.append(ord(match1.group(5)))
-   if len(match2.group(5)):
-   list2.append(ord(match2.group(5)))
+   if len(group1[4]):
+   list1.append(ord(group1[4]))
+   if len(group2[4]):
+   list2.append(ord(group2[4]))
 
for i in range(0, max(len(list1), len(list2))):
if len(list1) = i:
@@ -128,8 +388,8 @@ def vercmp(ver1, ver2, silent=1):
return list1[i] - list2[i]

# main version is equal, so now compare the _suffix part
-   list1 = match1.group(6).split(_)[1:]
-   list2 = match2.group(6).split(_)[1:]
+   list1 = group1[5].split(_)[1:]
+   list2 = group2[5].split(_)[1:]

for i in range(0, max(len(list1), len(list2))):
# Implicit _p0 is given a value of -1, so that 1  1_p0
@@ -154,12 +414,12 @@ def vercmp(ver1, ver2, silent=1):
return r1 - r2

# the suffix part is equal to, so finally check the revision
-   if match1.group(10):
-   r1 = int(match1.group(10))
+   if group1[9]:
+   r1 = int(group1[9])
else:
r1 = 0
-   if match2.group(10):
-   r2 = int(match2.group(10))
+   if group2[9]:
+   r2 = int(group2[9])
else:
r2 = 0
vercmp_cache[mykey] = r1 - r2
-- 
Regards,
Ali Polatel




[gentoo-portage-dev] [RFC/PATCH] New objects cpv, pv and version to be used instead of raw strings.

2008-07-18 Thread Ali Polatel
Hi,
Attached patch adds objects cpv, pv and version to portage.versions. This is
meant as a thin layer over functions vercmp(), pkgcmp(), pkgsplit() and
catpkgsplit().
Using these objects instead of the mentioned functions allows us to write
cleaner code and remove deprecated stuff like:
list.sort(pkgcmp)
which won't exist in py3k.

Please comment.

---
 pym/portage/versions.py |  292 +--
 1 files changed, 256 insertions(+), 36 deletions(-)

diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index 261fa9d..20b0d4f 100644
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@ -4,6 +4,7 @@
 # $Id$
 
 import re
+import warnings
 
 ver_regexp = 
re.compile(^(cvs\\.)?(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?$)
 suffix_regexp = re.compile(^(alpha|beta|rc|pre|p)(\\d*)$)
@@ -12,6 +13,205 @@ endversion_keys = [pre, p, alpha, beta, rc]
 
 from portage.exception import InvalidData
 
+# builtin all() is new in Python-2.5
+# TODO Move compatibility stuff to a new module portage.compat
+# and import from it like from portage.compat import all
+from sys import hexversion
+if hexversion  0x0205:
+def all(iterable):
+for i in iterable:
+if not bool(i):
+return False
+return True
+del hexversion
+
+def needs_version(func):
+   Decorator for functions that require non-keyword arguments of type 
version.
+   def func_proxy(*args, **kwargs):
+   if not all([isinstance(arg, version) for arg in args]):
+   raise TypeError(Not all non-keyword arguments are of 
type version)
+   return func(*args, **kwargs)
+   func_proxy.__doc__ = func.__doc__
+   return func_proxy
+
+def needs_pv(func):
+   Decorator for functions that require non-keyword arguments of type 
pv.
+   def func_proxy(*args, **kwargs):
+   if not all([isinstance(arg, pv) for arg in args]):
+   raise TypeError(Not all non-keyword arguments are of 
type pv)
+   return func(*args, **kwargs)
+   func_proxy.__doc__ = func.__doc__
+   return func_proxy
+
+def needs_cpv(func):
+   Decorator for functions that require non-keyword arguments of type 
cpv.
+   def func_proxy(*args, **kwargs):
+   if not all([isinstance(arg, cpv) for arg in args]):
+   raise TypeError(Not all non-keyword arguments are of 
type cpv)
+   return func(*args, **kwargs)
+   func_proxy.__doc__ = func.__doc__
+   return func_proxy
+
+class version(str):
+   Represents a package version
+
+   __hash = None
+   __parts = ()
+   __str = 
+
+   def __new__(cls, value):
+   m = ver_regexp.match(value)
+   if m is None:
+   raise TypeError(Syntax error in version: %s % value)
+   else:
+   new_ver = str.__new__(cls, m.groups())
+   new_ver.__hash = hash(m.groups()) + hash(value)
+   new_ver.__parts = m.groups()
+   new_ver.__str = value
+
+   return new_ver
+
+   def __str__(self):
+   return self.__str
+
+   def __repr__(self):
+   return %s object at 0x%x: %s % (self.__class__.__name__,
+   id(self), self.__str)
+
+   def __hash__(self):
+   return self.__hash
+
+   def __getitem__(self, i):
+   return self.__parts[i]
+
+   def __getslice__(self, i, j):
+   return self.__parts[i:j]
+
+   def __len__(self):
+   return len(self.__parts)
+
+   @needs_version
+   def __cmp__(self, y):
+   return vercmp(self, y)
+
+   @needs_version
+   def __eq__(self, y):
+   return vercmp(self, y) == 0
+
+   @needs_version
+   def __ne__(self, y):
+   return vercmp(self, y) != 0
+
+   @needs_version
+   def __lt__(self, y):
+   return vercmp(self, y)  0
+
+   @needs_version
+   def __le__(self, y):
+   return vercmp(self, y) = 0
+
+   @needs_version
+   def __gt__(self, y):
+   return vercmp(self, y)  0
+
+   @needs_version
+   def __ge__(self, y):
+   return vercmp(self, y) = 0
+
+class pv(str):
+   Represents a pv
+
+   __hash = None
+   __parts = ()
+   __str = 
+
+   def __new__(cls, value):
+   parts = pkgsplit(value)
+   if parts is None:
+   # Ideally a TypeError should be raised here.
+   # But to fit code using this easily, fail silently.
+   return None
+   else:
+   new_pv = str.__new__(cls, parts)
+   new_pv.__hash = hash(parts) + hash(value)
+   new_pv.__parts = (parts[0], 

[gentoo-dev] Re: Python 2.5

2008-07-08 Thread Ali Polatel
 Hi,

Hey!

 dev-lang/python 2.5 is going stable with arches cced on
 URL:http://bugs.gentoo.org/show_bug.cgi?id=178800.  File your
 stabilisation requests that were postponed because of Python 2.5 in
 testing and make it block above bug.  Please test a lot and at least
 report for x86 on stable machines (including upgrade path) to
 [EMAIL PROTECTED] Thanks.


Thanks! I have filed a bug to get a newer version of python-updater stable too
so people will experience fewer problems during the upgrade.

--
Regards,
Ali Polatel


[gentoo-portage-dev] [PATCH] Bad indentation in bin/archive-conf

2008-07-05 Thread Ali Polatel
bin/archive-conf has bad indentation:
RefactoringTool: Can't parse bin/archive-conf:
IndentationError: unindent does not match any outer indentation level 
(tokenize, line 19) [ !! ]

Attached patch fixes this.
---
 bin/archive-conf |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/archive-conf b/bin/archive-conf
index 63ce9b2..caf8fa2 100755
--- a/bin/archive-conf
+++ b/bin/archive-conf
@@ -14,8 +14,8 @@ import os, sys
 try:
 import portage
 except ImportError:
-   from os import path as osp
-   sys.path.insert(0, 
osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), pym))
+from os import path as osp
+sys.path.insert(0, 
osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), pym))
 import portage
 
 import dispatch_conf
-- 
Regards,
Ali Polatel

-- 
gentoo-portage-dev@lists.gentoo.org mailing list



[gentoo-portage-dev] [PATCH 1/6] Replace has_key() with the in operator (portage)

2008-07-01 Thread Ali Polatel
This is a series of patches to use the in operator instead of the has_key()
method for dictionaries. The has_key() method is deprecated in python2.6 and
removed in python3.0.

I've also added DeprecationWarning's to classes that have a has_key() method so
people writing code using portage will be notified to use the in operator
instead (or override __contains__ instead of has_key())

It's briefly tested and seems to work fine here, please test back and report.

---
 pym/_emerge/__init__.py  |6 ++--
 pym/portage/__init__.py  |   60 +-
 pym/portage/const.py |2 +-
 pym/portage/cvstree.py   |   16 +-
 pym/portage/dispatch_conf.py |2 +-
 pym/portage/getbinpkg.py |   12 
 pym/portage/glsa.py  |6 ++--
 pym/portage/locks.py |6 ++--
 pym/portage/manifest.py  |4 +-
 pym/portage/util.py  |4 +-
 10 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 93fa112..8b3ab91 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -6518,7 +6518,7 @@ class MergeTask(object):
emergelog(xterm_titles,  *** Finished. Cleaning up...)
 
# We're out of the loop... We're done. Delete the resume data.
-   if mtimedb.has_key(resume):
+   if resume in mtimedb:
del mtimedb[resume]
mtimedb.commit()
 
@@ -6743,7 +6743,7 @@ def unmerge(root_config, myopts, unmerge_action,
# since we're pruning, we don't 
care about slots
# and put all the pkgs in 
together
myslot = 0
-   if not slotmap.has_key(myslot):
+   if myslot not in slotmap:
slotmap[myslot] = {}

slotmap[myslot][localtree.dbapi.cpv_counter(mypkg)] = mypkg

@@ -7417,7 +7417,7 @@ def action_sync(settings, trees, mtimedb, myopts, 
myaction):
rsync_initial_timeout = 15
 
try:
-   if settings.has_key(RSYNC_RETRIES):
+   if RSYNC_RETRIES in settings:
print yellow(WARNING:)+ usage of 
RSYNC_RETRIES is deprecated, use PORTAGE_RSYNC_RETRIES instead
maxretries=int(settings[RSYNC_RETRIES])   

else:
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 879e65b..9e29435 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -161,7 +161,7 @@ def load_mod(name):
 
 def best_from_dict(key, top_dict, key_order, EmptyOnError=1, FullCopy=1, 
AllowEmpty=1):
for x in key_order:
-   if top_dict.has_key(x) and top_dict[x].has_key(key):
+   if x in top_dict and key in top_dict[x]:
if FullCopy:
return copy.deepcopy(top_dict[x][key])
else:
@@ -195,7 +195,7 @@ cacheStale=0
 def cacheddir(my_original_path, ignorecvs, ignorelist, EmptyOnError, 
followSymlinks=True):
global cacheHit,cacheMiss,cacheStale
mypath = normalize_path(my_original_path)
-   if dircache.has_key(mypath):
+   if mypath in dircache:
cacheHit += 1
cached_mtime, list, ftype = dircache[mypath]
else:
@@ -220,7 +220,7 @@ def cacheddir(my_original_path, ignorecvs, ignorelist, 
EmptyOnError, followSymli
return None, None
# Python retuns mtime in seconds, so if it was changed in the last few 
seconds, it could be invalid
if mtime != cached_mtime or time.time() - mtime  4:
-   if dircache.has_key(mypath):
+   if mypath in dircache:
cacheStale += 1
try:
list = os.listdir(mypath)
@@ -852,7 +852,7 @@ def ExtractKernelVersion(base_dir):
 
# Check the .config for a CONFIG_LOCALVERSION and append that too, also 
stripping whitespace
kernelconfig = getconfig(base_dir+/.config)
-   if kernelconfig and kernelconfig.has_key(CONFIG_LOCALVERSION):
+   if kernelconfig and CONFIG_LOCALVERSION in kernelconfig:
version += .join(kernelconfig[CONFIG_LOCALVERSION].split())
 
return (version,None)
@@ -1225,7 +1225,7 @@ class config(object):
self.prevmaskdict={}
for x in self.packages:
mycatpkg=dep_getkey(x)
-   if not self.prevmaskdict.has_key(mycatpkg):
+   if mycatpkg not in self.prevmaskdict:

[gentoo-portage-dev] [PATCH 2/6] Replace has_key() with the in operator (portage.cache)

2008-07-01 Thread Ali Polatel
---
 pym/portage/cache/metadata_overlay.py |2 +-
 pym/portage/cache/sql_template.py |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/cache/metadata_overlay.py 
b/pym/portage/cache/metadata_overlay.py
index 13d1278..e25759c 100644
--- a/pym/portage/cache/metadata_overlay.py
+++ b/pym/portage/cache/metadata_overlay.py
@@ -61,7 +61,7 @@ class database(template.database):
 
def _delitem(self, cpv):
value = self[cpv] # validates whiteout and/or raises a KeyError 
when necessary
-   if self.db_ro.has_key(cpv):
+   if cpv in self.db_ro:
self.db_rw[cpv] = self._create_whiteout(value)
else:
del self.db_rw[cpv]
diff --git a/pym/portage/cache/sql_template.py 
b/pym/portage/cache/sql_template.py
index f32a728..3c5cbd4 100644
--- a/pym/portage/cache/sql_template.py
+++ b/pym/portage/cache/sql_template.py
@@ -150,7 +150,7 @@ class SQLDatabase(template.database):
# so we store only what's handed to us and is a known 
key
db_values = []
for key in self._known_keys:
-   if values.has_key(key) and values[key] != '':
+   if key in values and values[key] != '':
db_values.append({key:key, 
value:values[key]})
 
if len(db_values)  0:
-- 
1.5.6.1

-- 
gentoo-portage-dev@lists.gentoo.org mailing list



[gentoo-portage-dev] [PATCH 4/6] Replace has_key() with the in operator (portage.elog)

2008-07-01 Thread Ali Polatel
---
 pym/portage/elog/__init__.py |4 ++--
 pym/portage/elog/filtering.py|2 +-
 pym/portage/elog/messages.py |4 ++--
 pym/portage/elog/mod_mail.py |2 +-
 pym/portage/elog/mod_mail_summary.py |2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py
index 3039370..ea81e84 100644
--- a/pym/portage/elog/__init__.py
+++ b/pym/portage/elog/__init__.py
@@ -73,13 +73,13 @@ def elog_process(cpv, mysettings, phasefilter=None):
 
ebuild_logentries = 
collect_ebuild_messages(os.path.join(mysettings[T], logging))
all_logentries = collect_messages()
-   if all_logentries.has_key(cpv):
+   if cpv in all_logentries:
all_logentries[cpv] = _merge_logentries(ebuild_logentries, 
all_logentries[cpv])
else:
all_logentries[cpv] = ebuild_logentries
 
for key in _preserve_logentries.keys():
-   if all_logentries.has_key(key):
+   if key in all_logentries:
all_logentries[key] = 
_merge_logentries(_preserve_logentries[key], all_logentries[key])
else:
all_logentries[key] = _preserve_logentries[key]
diff --git a/pym/portage/elog/filtering.py b/pym/portage/elog/filtering.py
index c93085c..d33d312 100644
--- a/pym/portage/elog/filtering.py
+++ b/pym/portage/elog/filtering.py
@@ -12,7 +12,7 @@ def filter_loglevels(logentries, loglevels):
for phase in logentries:
for msgtype, msgcontent in logentries[phase]:
if msgtype.upper() in loglevels or * in loglevels:
-   if not rValue.has_key(phase):
+   if phase not in rValue:
rValue[phase] = []
rValue[phase].append((msgtype, msgcontent))
return rValue
diff --git a/pym/portage/elog/messages.py b/pym/portage/elog/messages.py
index 2daacd1..ac8d701 100644
--- a/pym/portage/elog/messages.py
+++ b/pym/portage/elog/messages.py
@@ -76,9 +76,9 @@ def _elog_base(level, msg, phase=other, key=None, 
color=None):
if color == None:
color = GOOD
print colorize(color,  * )+msg
-   if not _msgbuffer.has_key(key):
+   if key not in _msgbuffer:
_msgbuffer[key] = {}
-   if not _msgbuffer[key].has_key(phase):
+   if phase not in _msgbuffer[key]:
_msgbuffer[key][phase] = []
_msgbuffer[key][phase].append((level, msg))
 
diff --git a/pym/portage/elog/mod_mail.py b/pym/portage/elog/mod_mail.py
index 09e3db2..d6383a4 100644
--- a/pym/portage/elog/mod_mail.py
+++ b/pym/portage/elog/mod_mail.py
@@ -8,7 +8,7 @@ from portage.exception import PortageException
 from portage.util import writemsg
 
 def process(mysettings, key, logentries, fulltext):
-   if mysettings.has_key(PORTAGE_ELOG_MAILURI):
+   if PORTAGE_ELOG_MAILURI in mysettings:
myrecipient = mysettings[PORTAGE_ELOG_MAILURI].split()[0]
else:
myrecipient = [EMAIL PROTECTED]
diff --git a/pym/portage/elog/mod_mail_summary.py 
b/pym/portage/elog/mod_mail_summary.py
index 8f7f862..ed51473 100644
--- a/pym/portage/elog/mod_mail_summary.py
+++ b/pym/portage/elog/mod_mail_summary.py
@@ -33,7 +33,7 @@ def _finalize(mysettings, items):
count = one package
else:
count = multiple packages
-   if mysettings.has_key(PORTAGE_ELOG_MAILURI):
+   if PORTAGE_ELOG_MAILURI in mysettings:
myrecipient = mysettings[PORTAGE_ELOG_MAILURI].split()[0]
else:
myrecipient = [EMAIL PROTECTED]
-- 
1.5.6.1

-- 
gentoo-portage-dev@lists.gentoo.org mailing list



[gentoo-portage-dev] [PATCH 5/6] Replace has_key() with the in operator (bin)

2008-07-01 Thread Ali Polatel
---
 bin/dispatch-conf |6 +++---
 bin/dohtml|6 +++---
 bin/glsa-check|4 ++--
 bin/repoman   |   14 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 28516c9..a8159cd 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -75,7 +75,7 @@ class dispatch:
 
 self.options = portage.dispatch_conf.read_config(MANDATORY_OPTS)
 
-if self.options.has_key(log-file):
+if log-file in self.options:
 if os.path.isfile(self.options[log-file]):
 shutil.copy(self.options[log-file], self.options[log-file] 
+ '.old')
 if os.path.isfile(self.options[log-file]) \
@@ -273,7 +273,7 @@ class dispatch:
 show_new_diff = 1
 continue
 elif c == 'e':
-if not os.environ.has_key('EDITOR'):
+if 'EDITOR' not in os.environ:
 os.environ['EDITOR']='nano'
 os.system(os.environ['EDITOR'] + ' ' + newconf)
 continue
@@ -337,7 +337,7 @@ class dispatch:
 conf  = re.sub (r'\._cfg\d+_', '', nconf)
 dir   = re.match (r'^(.+)/', nconf).group (1)
 
-if h.has_key (conf):
+if conf in h:
 mrgconf = re.sub(r'\._cfg', '._mrg', h[conf]['new'])
 if os.path.exists(mrgconf):
 os.unlink(mrgconf)
diff --git a/bin/dohtml b/bin/dohtml
index d65a31a..ab8ff3a 100755
--- a/bin/dohtml
+++ b/bin/dohtml
@@ -86,11 +86,11 @@ class OptionsClass:
self.ED = 
self.DOCDESTTREE = 

-   if os.environ.has_key(PF):
+   if PF in os.environ:
self.PF = os.environ[PF]
-   if os.environ.has_key(ED):
+   if ED in os.environ:
self.ED = os.environ[ED]
-   if os.environ.has_key(_E_DOCDESTTREE_):
+   if _E_DOCDESTTREE_ in os.environ:
self.DOCDESTTREE = os.environ[_E_DOCDESTTREE_]

self.allowed_exts = [ 'htm', 'html', 'css', 'js',
diff --git a/bin/glsa-check b/bin/glsa-check
index cdd1db3..2cff501 100644
--- a/bin/glsa-check
+++ b/bin/glsa-check
@@ -295,12 +295,12 @@ if mode == mail:
# color doesn't make any sense for mail
nocolor()
 
-   if portage.settings.has_key(PORTAGE_ELOG_MAILURI):
+   if PORTAGE_ELOG_MAILURI in portage.settings:
myrecipient = 
portage.settings[PORTAGE_ELOG_MAILURI].split()[0]
else:
myrecipient = [EMAIL PROTECTED]

-   if portage.settings.has_key(PORTAGE_ELOG_MAILFROM):
+   if PORTAGE_ELOG_MAILFROM in portage.settings:
myfrom = portage.settings[PORTAGE_ELOG_MAILFROM]
else:
myfrom = glsa-check
diff --git a/bin/repoman b/bin/repoman
index 93c01f6..701dbfc 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -660,7 +660,7 @@ if os.path.exists(descfile):
if not os.path.isdir(portdir+/profiles/+arch[1]):
print Invalid +arch[2]+ profile (+arch[1]+) for 
arch +arch[0]
continue
-   if profiles.has_key(arch[0]):
+   if arch[0] in profiles:
profiles[arch[0]]+= [[arch[1], arch[2]]]
else:
profiles[arch[0]] = [[arch[1], arch[2]]]
@@ -668,7 +668,7 @@ if os.path.exists(descfile):
for x in repoman_settings.archlist():
if x[0] == ~:
continue
-   if not profiles.has_key(x):
+   if x not in profiles:
print red(\+x+\ doesn't have a valid profile 
listed in profiles.desc.)
print red(You need to either \cvs update\ your 
profiles dir or follow this)
print red(up with the +x+ team.)
@@ -1327,7 +1327,7 @@ for x in scanlist:
 
# uselist checks - local
mykey = portage.dep_getkey(catpkg)
-   if luselist.has_key(mykey):
+   if mykey in luselist:
for mypos in range(len(myuse)-1,-1,-1):
if myuse[mypos] and (myuse[mypos] in 
luselist[mykey]):
del myuse[mypos]
@@ -1372,7 +1372,7 @@ for x in scanlist:
if myskey not in kwlist:
stats[KEYWORDS.invalid] += 1

fails[KEYWORDS.invalid].append(x+/+y+.ebuild: %s % mykey)
-   elif not profiles.has_key(myskey):
+   elif myskey not in profiles:
stats[KEYWORDS.invalid] += 1

fails[KEYWORDS.invalid].append(x+/+y+.ebuild: %s 

[gentoo-portage-dev] [PATCH 6/6] Add deprecation warnings to classes that have has_key() methods.

2008-07-01 Thread Ali Polatel
---
 pym/portage/__init__.py   |4 
 pym/portage/cache/mappings.py |   12 +++-
 pym/portage/cache/template.py |4 
 3 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 9e29435..1564aba 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -30,6 +30,7 @@ try:
import UserDict
from itertools import chain, izip
import platform
+   import warnings
 except ImportError, e:
sys.stderr.write(\n\n)
sys.stderr.write(!!! Failed to complete python imports. These are 
internal modules for\n)
@@ -2767,6 +2768,9 @@ class config(object):
return v
 
def has_key(self,mykey):
+   warnings.warn(portage.config.has_key() is deprecated, 
+   use the in operator instead,
+   DeprecationWarning)
return mykey in self
 
def __contains__(self, mykey):
diff --git a/pym/portage/cache/mappings.py b/pym/portage/cache/mappings.py
index 9aa5a21..55616ca 100644
--- a/pym/portage/cache/mappings.py
+++ b/pym/portage/cache/mappings.py
@@ -4,6 +4,7 @@
 # $Id$
 
 import UserDict
+import warnings
 
 class ProtectedDict(UserDict.DictMixin):

@@ -54,9 +55,15 @@ class ProtectedDict(UserDict.DictMixin):
return list(self.__iter__())
 
 
-   def has_key(self, key):
+   def __contains__(self, key):
return key in self.new or (key not in self.blacklist and key in 
self.orig)
 
+   def has_key(self, key):
+   warnings.warn(portage.cache.mapping.ProtectedDict.has_key() is
+deprecated, use the in operator instead,
+   DeprecationWarning)
+   return key in self
+
 
 class LazyLoad(UserDict.DictMixin):

@@ -90,6 +97,9 @@ class LazyLoad(UserDict.DictMixin):
 
 
def has_key(self, key):
+   warnings.warn(portage.cache.mappings.LazyLoad.has_key() is 
+   deprecated, use the in operator instead,
+   DeprecationWarning)
return key in self
 
 
diff --git a/pym/portage/cache/template.py b/pym/portage/cache/template.py
index d5a0752..891a582 100644
--- a/pym/portage/cache/template.py
+++ b/pym/portage/cache/template.py
@@ -6,6 +6,7 @@
 from portage.cache import cache_errors
 from portage.cache.cache_errors import InvalidRestriction
 from portage.cache.mappings import ProtectedDict
+import warnings
 
 class database(object):
# this is for metadata/cache transfer.
@@ -121,6 +122,9 @@ class database(object):
if self.has_key is database.has_key:
# prevent a possible recursive loop
raise NotImplementedError
+   warnings.warn(portage.cache.template.database.has_key() is 
+   deprecated, override __contains__ instead,
+   DeprecationWarning)
return self.has_key(cpv)
 
def __iter__(self):
-- 
1.5.6.1

-- 
gentoo-portage-dev@lists.gentoo.org mailing list



[gentoo-portage-dev] Re: [PATCH 6/6] Add deprecation warnings to classes that have has_key() methods.

2008-07-01 Thread Ali Polatel
These don't apply to the trunk anymore.
Updated patches can be found at: http://dev.gentoo.org/~hawking/py3k/portage/

-- 
Regards,
Ali Polatel
-- 
gentoo-portage-dev@lists.gentoo.org mailing list



[gentoo-dev] Last rites: =dev-lang/python-2.3* (Second try)

2008-06-24 Thread Ali Polatel
Now that the packages depending on 2.3 are masked, masking this one
again for removal in 30 days.

-- 
Regards,
Ali Polatel


pgpN7f7hYDgvJ.pgp
Description: PGP signature


[gentoo-dev] Re: Re: What to do when Python 2.5 is blocking your package from entering stable? (Agenda for next council meeting?)

2008-06-20 Thread Ali Polatel
Santiago M. Mola yazmış:
 There are a few things which need some kind of action before/during
 python 2.5 stabilization:
 
 Needs stabilization:
 * dev-python/python-bibtext-1.2.3
Already done. #194810

 * dev-python/pyvorbis-1.4-r3 (a bit buggy, debian has patches for 1.3,
 some of them can be ported)
 * tinyerp? http://qa.mandriva.com/show_bug.cgi?id=31554
This is m-needed and shouldn't prevent stabling. If anyone cares to fix
it we can work on a proxy-maint solution.

 * dev-libs/xapian-1.0.6
 * dev-libs/xapian-bindings-1.0.6
What's wrong with these? xapian-bindings builds fine here with python
enabled using python-2.5 and I couldn't find a related bug report.

 * dev-python/pygame-1.8.0 (buggy, I have patches from trunk, we might
 want to wait to 1.8.1)
I couldn't find a bug report related to this either. Care to submit a
bug report with the patches?

 * dev-python/soappy-0.12.0 (bug #216385)

#228535

 Needs fix:
 * x11-misc/qterm (bug #216466)
We need ppc and x86 teams to stable 0.5.2.

 * dev-db/rekall (bug #141068) - needs bump, probably this is going to
 be p.masked and eventually removed from the tree
 
/me looks at KDE team.

 Regards,

-- 
Regards,
Ali Polatel


pgp2XCvJcCFia.pgp
Description: PGP signature


[gentoo-dev] Re: What to do when Python 2.5 is blocking your package from entering stable? (Agenda for next council meeting?)

2008-06-20 Thread Ali Polatel
Samuli Suominen yazmış:
 Perhaps it should be a council agenda?

I think we can get it stable before the next council meeting ;)

-- 
Regards,
Ali Polatel


pgpNUct0SMpL2.pgp
Description: PGP signature


[gentoo-dev] Re: Nominations open for the Gentoo Council 2008/2009

2008-06-05 Thread Ali Polatel
Łukasz Damentko yazmış:
 Hi guys,
 
 Nominations for the Gentoo Council 2008/2009 are open now and will be
 open for the next two weeks (until 23:59 UTC, 18/06/2008).
 

I want to nominate:

Fernando J. Pereda -- ferdy
Bo Ørsted Andresen -- zlin

-- 
Regards,
Ali Polatel


pgpt5DDlXWbJD.pgp
Description: PGP signature


[gentoo-dev] Re: Re: Nominations open for the Gentoo Council 2008/2009

2008-06-05 Thread Ali Polatel
Alex Howells yazmış:
 2008/6/5 Ali Polatel [EMAIL PROTECTED]:
 
  I want to nominate:
 
  Fernando J. Pereda -- ferdy
  Bo Ørsted Andresen -- zlin
 
 
 Is there a method for objecting to a nomination, kinda like the
 opposite of seconding it? :P

No!
*stab*

-- 
Regards,
Ali Polatel


pgpvighaEuqEb.pgp
Description: PGP signature


[gentoo-dev] Re: packages up for grabs

2008-05-31 Thread Ali Polatel
Mike Frysinger yazmış:
 no herd:
 dev-libs/libtomcrypt
 dev-libs/libtomfloat
 dev-libs/libtommath
 dev-libs/libtompoly
 dev-libs/tomsfastmath

I'll take these if noone else wants them. I use them from time to time
for my studies.

-- 
Regards,
Ali Polatel


pgpzikkFYJLHN.pgp
Description: PGP signature


[gentoo-dev] Re: packages up for grabs

2008-05-31 Thread Ali Polatel
Thilo Bangert yazmış:
 
 
   net-misc/ntp
 
  This is rather basic, isn't it ?  It keeps your clock accurate.
  Is there any alternative ?
 
 net-misc/openntpd - by the OpenBSD folks...
 
 http://openntpd.org/
 http://en.wikipedia.org/wiki/OpenNTPD

Or net-misc/clockspeed :-)


 
 regards
 Thilo

-- 
Regards,
Ali Polatel


pgpTI21xw09yX.pgp
Description: PGP signature


[gentoo-dev] Recent changes wrt python.eclass

2008-05-29 Thread Ali Polatel
Hi people,

All python_mod_* functions are now ROOT aware. I've also modified them
to die if they aren't run in expected phases. Also I plan to make byte
compiling functions print a warning when *.py{c,o} are installed under
/usr/share which is a FHS violation.

The tree and python developer's guide are updated to reflect the
changes.

As a last thing, I want to give some usage notes here so it's
clear for everyone.

* If your package uses distutils.eclass, generally you have nothing to
  worry about. By default it'll byte compile python modules under
  /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}. If your package
  installs a directory with a name other than ${PN} set PYTHON_MODNAME
  to the name of directory.

* python_version should only be called if you need any of PYVER*
  variables. If your package only uses python.eclass - and not
  distutils.eclass, you need to call it when you want to use $python
  too. ( Note: Right now python_version is buggy wrt ROOT. This is the
  next thing I'm going to fix.)

* Don't call python_mod_cleanup with PYVER like:
  Wrong:
python_mod_cleanup \
/usr/$(get_libdir)/python${PYVER}/site-packages/$PN
  
  This is wrong because the python version may change in the meantime.
  Instead use:
python_mod_cleanup \
/usr/$(get_libdir)/python*/site-packages/$PN
  
  python_mod_cleanup has a safe default so you can usually avoid passing
  any arguments.

These are important stuff I can remember by the time I'm writing this
mail. Python devguide will be updated with these useful information
soon.

So if anything is not clear and/or you have any questions feel free to
bug/poke/stab me :-)

-- 
Regards,
Ali Polatel


pgpbLsWF5ExNi.pgp
Description: PGP signature


[gentoo-dev] Re: Re: [RFC] Eclass for gnome-python* split

2008-05-29 Thread Ali Polatel
Ali Polatel yazmış:
 Mart Raudsepp yazmış:
  On L, 2008-05-24 at 10:18 +0300, Ali Polatel wrote:
   Arun Raghavan yazmış:
Greetings All,
   
   Hey there
   
I've been working on an ancient bug [1] requesting a split of the
gnome-python, gnome-python-extras, and gnome-python-desktop ebuilds.
   
   Good for you :P
   
   *snip*

Feedback and comments (and even brickbats ;)) on the eclass are invited.

   
   Attached is a patch for two minor issues with the eclass. First try to
   remove py-compile only if it exists. Second, python_mod_optimize is
   ROOT aware (since recently).
  
  Does that mean that every python_mod_optimize user (ebuild) that used it
  as was expected from python_mod_optimize is now broken for ROOT != /
  by installing them into ${ROOT}/${ROOT}/ ?
  
  
 
 *fail*
 
 Appearently python_mod_optimize is not ROOT aware (yet). I thought this
 patch¹ was committed and didn't bother to check the eclass (silly me).
 I'll commit it tomorrow and make sure the tree is consistent.
 Join the fun if you have time :-)
 
 ¹: http://dev.gentoo.org/~hawking/tmp/python-root_awareness.diff
 

Done. :-)

-- 
Regards,
Ali Polatel


pgplmE8XYISCh.pgp
Description: PGP signature


[gentoo-dev] Re: Re: [RFC] Eclass for gnome-python* split

2008-05-25 Thread Ali Polatel
Mart Raudsepp yazmış:
 On L, 2008-05-24 at 10:18 +0300, Ali Polatel wrote:
  Arun Raghavan yazmış:
   Greetings All,
  
  Hey there
  
   I've been working on an ancient bug [1] requesting a split of the
   gnome-python, gnome-python-extras, and gnome-python-desktop ebuilds.
  
  Good for you :P
  
  *snip*
   
   Feedback and comments (and even brickbats ;)) on the eclass are invited.
   
  
  Attached is a patch for two minor issues with the eclass. First try to
  remove py-compile only if it exists. Second, python_mod_optimize is
  ROOT aware (since recently).
 
 Does that mean that every python_mod_optimize user (ebuild) that used it
 as was expected from python_mod_optimize is now broken for ROOT != /
 by installing them into ${ROOT}/${ROOT}/ ?
 
 

*fail*

Appearently python_mod_optimize is not ROOT aware (yet). I thought this
patch¹ was committed and didn't bother to check the eclass (silly me).
I'll commit it tomorrow and make sure the tree is consistent.
Join the fun if you have time :-)

¹: http://dev.gentoo.org/~hawking/tmp/python-root_awareness.diff

-- 
Regards,
Ali Polatel


pgpu3cWIk7Y2G.pgp
Description: PGP signature


[gentoo-dev] Re: [RFC] Eclass for gnome-python* split

2008-05-24 Thread Ali Polatel
Arun Raghavan yazmış:
 Greetings All,

Hey there

 I've been working on an ancient bug [1] requesting a split of the
 gnome-python, gnome-python-extras, and gnome-python-desktop ebuilds.

Good for you :P

*snip*
 
 Feedback and comments (and even brickbats ;)) on the eclass are invited.
 

Attached is a patch for two minor issues with the eclass. First try to
remove py-compile only if it exists. Second, python_mod_optimize is
ROOT aware (since recently).

 Cheers!
 -- 
 Arun Raghavan
 (http://nemesis.accosted.net)
 v2sw5Chw4+5ln4pr6$OFck2ma4+9u8w3+1!m?l7+9GSCKi056
 e6+9i4b8/9HTAen4+5g4/8APa2Xs8r1/2p5-8 hackerkey.com

-- 
Regards,
Ali Polatel
diff --git a/eclass/gnome-python-common.eclass 
b/eclass/gnome-python-common.eclass
index f938f98..9169496 100644
--- a/eclass/gnome-python-common.eclass
+++ b/eclass/gnome-python-common.eclass
@@ -85,8 +85,10 @@ gnome-python-common_src_unpack() {
done
 
# disable pyc compiling
-   rm py-compile
-   ln -s $(type -P true) py-compile
+   if [[ -f py-compile ]]; then
+   rm py-compile
+   ln -s $(type -P true) py-compile
+   fi
 
[[ ${do_eautoreconf} -eq 1 ]]  eautoreconf
 }
@@ -121,7 +123,7 @@ gnome-python-common_src_install() {
 
 gnome-python-common_pkg_postinst() {
python_version
-   python_mod_optimize 
${ROOT}/usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0
+   python_mod_optimize 
/usr/$(get_libdir)/python${PYVER}/site-packages/gtk-2.0
 }
 
 gnome-python-common_pkg_postrm() {


pgp6V2Hb97pu1.pgp
Description: PGP signature


[gentoo-dev] Re: LaTeX documentation

2008-05-13 Thread Ali Polatel
Andrey Grozin yazmış:
 Hello *,


Hey :)

 There are two methods commonly used to fight against this situation in 
 ebuilds: using addwrite or setting VARTEXFONTS=${T}/fonts. The second 
 method is, probably, better. The packages still using addwrite are:

 dev-python/python-xlib
 dev-python/pyx

Both set VARTEXFONTS=${T}/fonts now.


 What do you think?

I think you should relax and smoke some weed :P


 Andrey

-- 
Regards,
Ali Polatel


pgpYjr9uj0VNg.pgp
Description: PGP signature


[gentoo-dev] Re: New developer : Chris Henhawke (bunder)

2008-04-26 Thread Ali Polatel
Denis Dupeyron yazmış:
 Chris lives in Hamilton, Ontario, and is a computer operator who does
 maintenance and support. During the interrogation^Wreview, he wasn't
 very talkative but did confess an addiction to the Gentoo forums and
 smoking.

Yay! Yet another smoker!

 Please everybody, give a very warm welcome to bunder.
 

Welcome to crew!

-- 
Regards,
Ali Polatel


pgpVvf8oxHdWl.pgp
Description: PGP signature


[gentoo-dev] Re: New global USE flag: keyring

2008-04-20 Thread Ali Polatel
Alon Bar-Lev yazmış:
 I suggest gnome-something as it is gnome feature.

How about gnome-keyring? :)

-- 
Regards,
Ali Polatel


pgpo12m9JUCL3.pgp
Description: PGP signature


[gentoo-dev] [RFC] vim-plugin.ec lass and DEPEND

2008-04-06 Thread Ali Polatel
Hi everyone,

Attached is a patch about vim-plugin.eclass which I'm about to commit.
The patch is aimed to make the eclass usable by packages not under
app-vim but come with their own vim plugin stuff (like git). It limits
setting default DEPEND,SLOT and SRC_URI to packages under category
app-vim and checks for VIM_PLUGIN_VERSION to add a dependency upon vim
or gvim. This way the eclass doesn't unconditionally depend on vim but
still give the option to set VIM_PLUGIN_VERSION in the ebuild make the
eclass add the dependencies.

What do you think? Do you think it's the right way to implement it?
Please comment.

-- 
Regards,
Ali Polatel
Index: vim-plugin.eclass
===
RCS file: /var/cvsroot/gentoo-x86/eclass/vim-plugin.eclass,v
retrieving revision 1.21
diff -u -r1.21 vim-plugin.eclass
--- vim-plugin.eclass   7 May 2007 19:06:14 -   1.21
+++ vim-plugin.eclass   6 Apr 2008 11:20:33 -
@@ -10,14 +10,20 @@
 inherit vim-doc
 EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm
 
-VIM_PLUGIN_VIM_VERSION=${VIM_PLUGIN_VIM_VERSION:-6.4}
+if [ ${CATEGORY} = app-vim ]; then
+   IUSE=
+   SRC_URI=mirror://gentoo/${P}.tar.bz2
+   SLOT=0
+fi
 
-IUSE=
-DEPEND=|| ( =app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
+if [ -n ${VIM_PLUGIN_VERSION} ]; then
+   DEPEND=|| ( =app-editors/vim-${VIM_PLUGIN_VIM_VERSION}
=app-editors/gvim-${VIM_PLUGIN_VIM_VERSION} )
+elif [ ${CATEGORY} = app-vim ]; then
+   # Default fallback for packages under app-vim/
+   DEPEND=|| ( app-editors/vim app-editors/gvim )
+fi
 RDEPEND=${DEPEND}
-SRC_URI=mirror://gentoo/${P}.tar.bz2
-SLOT=0
 
 vim-plugin_src_install() {
local f


pgp8VwhnhxbIl.pgp
Description: PGP signature


[gentoo-dev] Re: New developer: Ahmed Ammar (b33fc0d3)

2008-03-29 Thread Ali Polatel
Petteri Räty yazmış:
 Joining us from the land of the pyramids, we have Ahmed b33fc0d3 Ammar. 
 Although originally from Egypt, nowadays he lives in UK and studies Computer 
 Engineering there. He will be joining us to help with Gnome and all sorts of 
 miscellaneous packages. He says he enjoys a good debate so I think he will 
 make a fine addition to our mailing lists.

 Bring it on,
 Petteri


Welcome!


pgpJbpydme17c.pgp
Description: PGP signature


[gentoo-dev] Re: gentoo-x86 commit in eclass: distutils.eclass

2008-01-31 Thread Ali Polatel
Donnie Berkholz yazmış:
 On 22:19 Wed 23 Jan , Ali Polatel (hawking) wrote:
  hawking 08/01/23 22:19:05
  
Modified: distutils.eclass
Log:
Fixed ROOT usage for distutils_pkg_postinst failing when ROOT ends with 
  slash
 
  @@ -99,11 +99,14 @@
   distutils_pkg_postinst() {
  PYTHON_MODNAME=${PYTHON_MODNAME:-${PN}}
   
  +   # strip trailing slash
  +   myroot=${ROOT%/}
  +
  if has_version =dev-lang/python-2.3; then
  python_version
  for pymod in ${PYTHON_MODNAME}; do
  -   if [ -d 
  ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod} ]; then
  -   python_mod_optimize 
  ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
  +   if [ -d 
  ${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod} ]; then
  +   python_mod_optimize 
  ${myroot}/usr/$(get_libdir)/python${PYVER}/site-packages/${pymod}
  fi
  done
  fi
 
 Seems like this might be better fixed by properly handling ROOT in 
 python.eclass instead of hacking around it.
 

You're right. dev-zero has made some changes to these eclasses in python
overlay[1] which I'll merge to the tree after some more testing.

[1]: http://overlays.gentoo.org/proj/python/browser/overlays/testing/eclass

-ali


pgpCu6HnGDj6D.pgp
Description: PGP signature


[gentoo-dev] Re: Packages up for grabs

2008-01-24 Thread Ali Polatel
Christian Heim yazmış:
 Okay, today was another tree-wrecking^Hcleaning day. Find below the
 packages that got assigned to maintainer-needed due to no maintainer
 being available.
 
 As usual you are free to pick them up, if you'd like to maintain them...
 
 [EMAIL PROTECTED]:
  - app-misc/pwsafe
  - dev-libs/shhopt
  - dev-util/ccmalloc
  - dev-util/cook
  - dev-util/pmk
  - dev-util/pretrace
  - net-misc/knock
  - net-misc/secpanel
  - www-client/surfraw

Taking these if nobody else wants them.

-ali


pgpGsVh4l9lOS.pgp
Description: PGP signature


[gentoo-dev] Last rites: =dev-lang/python-2.3*

2008-01-07 Thread Ali Polatel
# Ali Polatel [EMAIL PROTECTED] (07 Jan 2008)
# Old, unmaintained version. Will be removed in 30 days.
=dev-lang/python-2.3*

Python-2.3 is old and unmaintained. Python-2.4 has been in the tree
for quite a long time and is stable.

P.S: I plan to add a junk overlay like java's to put old python stuff.
I'll keep you posted.


pgpNW7UrBMLFt.pgp
Description: PGP signature


[gentoo-dev] Re: Last rites: =dev-lang/python-2.3*

2008-01-07 Thread Ali Polatel
Markus Ullmann yazmış:
 Ali Polatel schrieb:
 P.S: I plan to add a junk overlay like java's to put old python stuff.
 I'll keep you posted.

 Just make sure to copy anything that has mirror://gentoo as it would be gone 
 automatically 14 after you remove the ebuild from gentoo-x86 (and thus the 
 reference to it).


Thanks for the reminder ;)

 Greetz
 -Jokey


-ali


pgpyb7EzR4nID.pgp
Description: PGP signature


[gentoo-dev] Re: Last rites: =dev-lang/python-2.3*

2008-01-07 Thread Ali Polatel
Ali Polatel yazmış:
 # Ali Polatel [EMAIL PROTECTED] (07 Jan 2008)
 # Old, unmaintained version. Will be removed in 30 days.
 =dev-lang/python-2.3*
 
 Python-2.3 is old and unmaintained. Python-2.4 has been in the tree
 for quite a long time and is stable.
 

Appearently there are some packages which I missed are broken due to
masking this, unmasked for now. Sorry for the inconvenience and thanks
again to mr_bones_.

-ali


pgpBx6fhfdmJn.pgp
Description: PGP signature


[gentoo-dev] Re: Last rites: dev-python/logging

2007-10-06 Thread Ali Polatel
Thu, Sep 06, 2007 at 03:12:57PM +0300 tarihinde, Ali Polatel yazmış:
 # Ali Polatel [EMAIL PROTECTED] (06 Sept 2007)
 # Masked for removal in 30 days. bug 185041
 # Included to python standard library as of 2.3
 dev-python/logging
 
 As said in the comment, included to py standard library as of 2.3 and no
 package depends on it.
 

Removed.

-- 
ali polatel (hawking)


pgpo40GCnMT3D.pgp
Description: PGP signature


[gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in sys-auth/pam_chroot: ChangeLog pam_chroot-0.9.2.ebuild

2007-10-01 Thread Ali Polatel
Mon, Oct 01, 2007 at 01:06:42AM -0700 tarihinde, Donnie Berkholz yazmış:
 On 07:46 Mon 01 Oct , Ali Polatel (hawking) wrote:
  1.1  sys-auth/pam_chroot/pam_chroot-0.9.2.ebuild
  
  file : 
  http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/pam_chroot/pam_chroot-0.9.2.ebuild?rev=1.1view=markup
  plain: 
  http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-auth/pam_chroot/pam_chroot-0.9.2.ebuild?rev=1.1content-type=text/plain
 
  LDFLAGS=$(raw-ldflags) emake \
  CC=$(tc-getCC) LD=$(tc-getLD) || die emake failed
 
 This reads really strangely to me. It's passing variables on both sides 
 of emake. Generally one would just pick a side (afterwards) and add 
 everything there.

Well, here is the related part from Makefile:

LDFLAGS  := -x --shared $(LDFLAGS)

emake LDFLAGS=$(raw-ldflags) overrides that definition,
emake LDFLAGS=-x --shared $(raw-ldflags) works as expected, or my
version, maybe I should add a note about it to the ebuild...

 Thanks,
 Donnie

-- 
ali polatel (hawking)


pgpK28kFNp2U5.pgp
Description: PGP signature


Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in dev-util/ctags: ctags-5.6-r2.ebuild ChangeLog ctags-5.6-r3.ebuild ctags-5.7.ebuild ctags-5.6-r1.ebuild ctags-5.6.ebuild ctags-5.5.4-r3.ebuild

2007-09-24 Thread Ali Polatel
Mon, Sep 24, 2007 at 12:59:16PM -0700 tarihinde, Donnie Berkholz yazmış:
 On 19:40 Mon 24 Sep , Ali Polatel (hawking) wrote:
  hawking 07/09/24 19:40:06
  
Modified: ctags-5.6-r2.ebuild ChangeLog ctags-5.6-r3.ebuild
Added:ctags-5.7.ebuild
Removed:  ctags-5.6-r1.ebuild ctags-5.6.ebuild
  ctags-5.5.4-r3.ebuild
Log:
version bump. modified SRC_URI to get ada-mode depending on the ada use 
  flag. drop old.
(Portage version: 2.1.3.9)
 
  mv ${D}/usr/bin/{ctags,exuberant-ctags}
  mv ${D}/usr/share/man/man1/{ctags,exuberant-ctags}.1
 
 This ebuild did it right so many times, but missed a couple quotes for 
 the D's here.
 
 Thanks,
 Donnie
 -- 
 [EMAIL PROTECTED] mailing list
 

fixed thanks

-- 
ali polatel (hawking)


pgpg7NLT6DOjT.pgp
Description: PGP signature


[gentoo-dev] Last rites: dev-python/logging

2007-09-06 Thread Ali Polatel
# Ali Polatel [EMAIL PROTECTED] (06 Sept 2007)
# Masked for removal in 30 days. bug 185041
# Included to python standard library as of 2.3
dev-python/logging

As said in the comment, included to py standard library as of 2.3 and no
package depends on it.

--
ali polatel (hawking)


pgp9GGkQIFhXk.pgp
Description: PGP signature


[gentoo-dev] Re: How should I kill a daemon from an ebuild file?

2007-07-27 Thread Ali Polatel
Jules Colding [EMAIL PROTECTED] yazmış:
 Hi,
 
 I have an ebuild (see below) for a small keyring daemon. I would like to
 kill the daemon process, if it is running, whenever it is emerged again
 to ensure that no running daemon process refers to an old install.
 
 Is there a clean and recommended way of doing this in an ebuild or
 should I just use killall in pkg_postinst()?
 
 Or is this ultimately a big no-no??
 

Have a look at pkg_setup functions in postfix ebuilds. This can give you
an idea about how to do it properly.

-- 
ali polatel (hawking)


pgp9pvL5DktEe.pgp
Description: PGP signature


[gentoo-dev] Re: Last rites: dev-python/pyunit

2007-07-27 Thread Ali Polatel
Ali Polatel [EMAIL PROTECTED] yazmış:
 # Ali Polatel [EMAIL PROTECTED] (28 Jun 2007)
 # Included in python standard library with python-2.1.
 # See bug #145154 for details.
 # Masked for removal in 30 days.
 dev-python/pyunit
 
  Last release was in 2001, older than all python standard library versions
 in the tree.


removed.

-- 
ali polatel (hawking)


pgpnhfjSkgpgr.pgp
Description: PGP signature


[gentoo-dev] Re: So long Gentoo...

2007-07-14 Thread Ali Polatel
Mike Kelly [EMAIL PROTECTED] yazmış:
 For many reasons, I'm choosing to take my leave from Gentoo at this
 time. While this was in part brought on by the recent discussions about
 the mailing lists, it's related to many other things as well. Mainly, I
 don't have the motivation that I used to have to work on Gentoo. I feel
 like my efforts are being stymied by the lack of overall technical
 progress and direction in the project.
 
 I'm not abandoning open source altogether; I'll still be working on a
 few projects here and there. I'll still be around on IRC if I'm needed
 for anything.
 
 I regret not having fully completed my GLEP-27 implementation, but my
 code is still available for anyone who wants to do the few remaining
 bits (mainly, incorporate it with portage, and patch shadow to allow it
 to work on an alternate /etc/passwd,shadow,group etc).
 
 I have a few helpful scripts for Vim maintenance that I can give to
 whomever wants them (nelchael probably, don't if anyone else is going
 help him out).
 
 Also, my apologizes to anyone else that I had said I would help out. If
 you still need me, you can track me down on IRC and I can at least give
 you some pointers (but probably not much in the way of code).
 
 As for SoC this year, I'll still be available to mentor as much as I
 can, on IRC and by email.
 
 Best of luck with Gentoo.
 

Sorry to see you go... The vim herd could really use some more people
so I added myself to it today. I'll be happy if you can mail me the
scripts you used for maintenance.

-- 
ali polatel (hawking)


pgpD8b5Fi029G.pgp
Description: PGP signature


[gentoo-dev] Last rites: dev-python/clientcookie

2007-06-30 Thread Ali Polatel
# Ali Polatel [EMAIL PROTECTED] (30 Jun 2007)
# This module is now part of dev-python/mechanize.
# Upstream says there will be no standalone releases.
# Masked for removal in 30 days. bug 166914
dev-python/clientcookie

 As the comment says upstream won't be releasing any standalone releases
and I've added mechanize to the tree. If noone has any objections this
package will be removed in 30 days.

-- 
ali polatel (hawking)
The telephone is a good way to talk to people without having to offer
them a drink.
-- Fran Lebowitz, Interview


pgpM58JWhCzWi.pgp
Description: PGP signature


Re: [gentoo-dev] Last rites: dev-python/clientcookie

2007-06-30 Thread Ali Polatel
Petteri Räty [EMAIL PROTECTED] yazmış:
 Ali Polatel kirjoitti:
  # Ali Polatel [EMAIL PROTECTED] (30 Jun 2007)
  # This module is now part of dev-python/mechanize.
  # Upstream says there will be no standalone releases.
  # Masked for removal in 30 days. bug 166914
  dev-python/clientcookie
  
   As the comment says upstream won't be releasing any standalone releases
  and I've added mechanize to the tree. If noone has any objections this
  package will be removed in 30 days.
  
 
 You should wait until mechanize has as good keywords as clientcookie
 does before masking it. Now there is no way for !x86 installations to
 install this code without package.unmasking. Please unmask until the
 same keywords are there.
 
 Keywords for dev-python/clientcookie:
 
|   s |
| p p |
| p a   x |
| c r   8 |
| - c   6 | u
| a a m p s -   - | n
| l m   h i m m   a p s   p f   f | u s
| p d a p a 6 i p c c 3   a b x b | s l
| h 6 r p 6 8 p p o 6 9 s r s 8 s | e o
| a 4 m a 4 k s c s 4 0 h c d 6 d | d t
 ---+-+
 0.4.19 | +   |   0
 1.3.0  |   ~ ~ ~ ~   |
 
 
 Keywords for dev-python/mechanize:
 
|   s |
| p p |
| p a   x |
| c r   8 |
| - c   6 | u
| a a m p s -   - | n
| l m   h i m m   a p s   p f   f | u s
| p d a p a 6 i p c c 3   a b x b | s l
| h 6 r p 6 8 p p o 6 9 s r s 8 s | e o
| a 4 m a 4 k s c s 4 0 h c d 6 d | d t
 ---+-+
 0.1.7b | ~   |   0
 

 My bad, sorry. I'll unmask it right away and file a bug to relevant
arch teams.

-- 
ali polatel (hawking)


pgpzzaF6LUdJW.pgp
Description: PGP signature


[gentoo-dev] Last rites: dev-python/pyunit

2007-06-27 Thread Ali Polatel
# Ali Polatel [EMAIL PROTECTED] (28 Jun 2007)
# Included in python standard library with python-2.1.
# See bug #145154 for details.
# Masked for removal in 30 days.
dev-python/pyunit

 Last release was in 2001, older than all python standard library versions
in the tree.

-- 
ali polatel (hawking)
There will always be beer cans rolling on the floor of your car when
the boss asks for a lift home from the office.


pgpgrsNv7jbLj.pgp
Description: PGP signature


[gentoo-dev] Re: New developer: Santiago M. Mola (coldwind)

2007-06-26 Thread Ali Polatel
Denis Dupeyron [EMAIL PROTECTED] yazmış:
  Please everybody welcome our new developer Santiago M. Mola, aka
  coldwind. He is joining us from Alicante, Spain and is studying
  Computer Science in Valencia. His main interests are hanging out with
  friends at obscure pubs, music and reading. I am told he has extensive
  experience with such games^H^H^H^H^Hsimulation software as Gate88,
  Parsec47 and BomberClone.
 
  He will start with working on VOIP stuff, so please give him a warm welcome.
 
  Denis.

  Welcome! :-)
-- 
ali polatel (hawking)
Take me drunk, I'm home again!
-- 
[EMAIL PROTECTED] mailing list



[gentoo-dev] Re: New developer: Ali Polatel (hawking)

2007-06-21 Thread Ali Polatel
Mart Raudsepp [EMAIL PROTECTED] yazmış:
 On K, 2007-06-20 at 19:54 +0300, Petteri Räty wrote:
  It's my usual pleasure to introduce to you Ali hawking Polatel who
  will be joining us to help with the netmon stuff.
 
 Welcome Ali!
 
  Ali hails us from
  Turkey. He is currently a physics engineering stupid in the Istanbul
  Technical University and a real wizard in chess. He is the National
  Master to be more exact. Please give him the usual warm welcome and try
  to beat him in online chess.
 
 Do you appear on FICS too? :)

  yup! my handle is thespiritoftal ;)

-- 
ali polatel (hawking)
Booze is the answer.  I don't remember the question.
-- 
[EMAIL PROTECTED] mailing list



[gentoo-dev] Re: Packages with same name was - Conversion of Emacs virtual packages

2007-05-16 Thread Ali Polatel
Thilo Bangert [EMAIL PROTECTED] yazdı:
   It isn't different.  That's the problem.  If you have two packages
   with the same name, you have the same problem.
 
  On that note I would hope the vim/vi peeps would rename.
  app-vim/ant
 
 and app-vim/sudo
 
  which is soon to be dead...


-- 
Ali Polatel (hawking) [EMAIL PROTECTED]
http://hawking.nonlogic.org/
gpg: 0x8E724EDC fp: DBC2 2BC7 95B8 6D6C 8BC3  37EC CA00 CFC1 8E72 4EDC
()  ascii ribbon campaign - against html mail
/\
-- 
[EMAIL PROTECTED] mailing list



[gentoo-portage-dev] GPG support for mod_mail

2006-10-28 Thread Ali Polatel
Hi everyone,
   I wonder if GPG support for mod_mail would be useful.I wrote some
basic code that works.The user is required to export his public key 
and put the path to PORTAGE_ELOG_MAILGPG.
   Attached is the patch for mod_mail.py.It won't work with armored
key files because gpg can't directly encrypt messages with ascii
armored keys , they need to be --dearmor'ed first.
   Thoughts?
-- 
Ali Polatel [EMAIL PROTECTED] www.rootshell.be/~hawking
gpg: 322FEACE fp: 7738 BAA0 834B 43BF 7C1E  22EA D14C 0688 322F EACE
()  ascii ribbon campaign - against html mail 
/\  
--- mod_mail.py 2006-10-25 14:07:30.0 +0300
+++ mod_mail.py_gpg 2006-10-28 11:14:45.0 +0300
@@ -4,6 +4,10 @@
 # $Id: mod_mail.py 3484 2006-06-10 22:38:44Z genone $
 
 import portage_mail, socket
+import portage_exception
+import os,commands
+from portage_gpg import GPG_BINARY
+GPG_OPTIONS =  --no-default-keyring --primary-keyring '%s' --trust-model 
always -ear '%s' 
 
 def process(mysettings, cpv, logentries, fulltext):
if mysettings.has_key(PORTAGE_ELOG_MAILURI):
@@ -11,6 +15,20 @@
else:
myrecipient = [EMAIL PROTECTED]

+   if mysettings.has_key(PORTAGE_ELOG_MAILGPG):
+   mygpgkey = mysettings[PORTAGE_ELOG_MAILGPG]
+   if not os.path.isfile(mygpgkey):
+   raise portage_exception.FileNotFound, keyfile missing: 
%s % mygpgkey
+   command = /bin/echo '%s' |  % fulltext + GPG_BINARY + 
GPG_OPTIONS % (mygpgkey,myrecipient)
+   result,enc_fulltext = commands.getstatusoutput(command)
+   if result == 0:
+   fulltext = enc_fulltext
+   else: # Public key not found or we have an armored key file 
(result = 512 in these cases)
+ # A dearmor() function could be added to dearmor the key 
which does
+ #   gpg --dearmor  key.asc  key.gpg so that people 
can use ascii armored keys
+   raise portage_exception.InvalidData, Public key not 
found: Armored key file?
+   
+
myfrom = mysettings[PORTAGE_ELOG_MAILFROM]
mysubject = mysettings[PORTAGE_ELOG_MAILSUBJECT]
mysubject = mysubject.replace(${PACKAGE}, cpv)


pgpr7Hp6BB9Y1.pgp
Description: PGP signature


Re: [gentoo-portage-dev] GPG support for mod_mail

2006-10-28 Thread Ali Polatel
On 03:02 Sun 29 Oct , Marius Mauch wrote:
 
 Well, I don't really see a reason why one would want to encrypt those
 mails. The only potentially sensitive information (package
 name/version) is already contained in the subject and therefore
 wouldn't be encrypted. And gpg support can be a bitch to maintain, so
 I'd like to see the benefit before adding that feature.
 
 Marius
 

  You're right.Right now it can only be useful for paranoids using info
in ELOG_CLASSES :) Well this patch can be a starting point if gpg
support is needed some day..

-- 
Ali Polatel [EMAIL PROTECTED] www.rootshell.be/~hawking
gpg: 322FEACE fp: 7738 BAA0 834B 43BF 7C1E  22EA D14C 0688 322F EACE
()  ascii ribbon campaign - against html mail 
/\  


pgpHev1FMRUbW.pgp
Description: PGP signature