Porting

GNU libtool 和 FreeBSD 10

FreeBSD 开始用 10 以上的版本号有一段时间了。这个变动立刻导致了大量 ports 无法编译,多数情况下是因为开发者采用了较早版本的 libtool 导致的,具体来说,是类似下面的代码:

阅读全文…( 本文约 198 字,阅读大致需要 1 分钟 )

PlanetPlanet vs Python 2.6

On Python 2.6 we have a new ‘hashlib’ module, which superseded older ‘md5’ ‘sha1’ modules.

Therefore, importing ‘md5’ would give the following warnings:

DeprecationWarning: the md5 module is deprecated; use hashlib instead

This is quite annoying if you run PlanetPlanet in a cron(8) job and receive e-mail reports. In order to solve that, we can do some simple sed(1) replace over PlanetPlanet’s __init__.py:

s/import md5/import hashlib/g

s/md5\.new/hashlib.md5/g

That’s it! And PlanetPlanet will now happily work with Python 2.6.

参与评论