1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-05 08:33:08 +02:00
openwrt-packages/makfa/patches/01-path.patch
Alan Post b3f79e4824 move makfa.dump from /var/lib/makfa to /usr/share/makfa
I originally choose /var/lib/... because makfa.dump can be updated by
the makfa program.  /usr/share/... is for read-only data, which this
most certainly is not.

The best solution for this problem would be to have some kind of
/ovelay/var/... directory that is copied at boot to /var/...  This
would allow files that need to be persistent in /var/... to be so,
but would permit the flexibility currently seen for I/O heavy uses
of /var/...

Ater a discussion with xiangfu, we decided that modifying the
base-package to support an overlay on /var is too much work to do
right now, and that we would use /usr/share/... for the time being.
2010-09-14 20:49:41 -06:00

23 lines
778 B
Diff

diff --git a/makfa b/makfa
index 488007e..a19a5c8 100755
--- a/makfa
+++ b/makfa
@@ -485,7 +485,7 @@ class Type(Command):
class Updater(object):
- def __init__(self, lang='en', filename=os.path.expanduser('~/makfa.dump')):
+ def __init__(self, lang='en', filename='/usr/share/makfa/makfa.dump'):
self.db = {'order': [], 'entries': {}}
url = 'http://jbovlaste.lojban.org/export/xml-export.html?lang=%s'
tree = etree.parse(urllib.urlopen(url % lang))
@@ -615,7 +615,7 @@ class Filter(object):
class Dictionary(object):
- def __init__(self, filename=os.path.expanduser('~/makfa.dump')):
+ def __init__(self, filename='/usr/share/makfa/makfa.dump'):
try:
self._db = pickle.load(open(filename))
except: