1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-17 20:15:19 +02:00

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.
This commit is contained in:
Alan Post 2010-09-14 20:49:41 -06:00
parent bb5e73881b
commit b3f79e4824
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ endef
define Package/makfa/install define Package/makfa/install
$(INSTALL_DIR) \ $(INSTALL_DIR) \
$(1)/var/lib/$(PKG_NAME) \ $(1)/usr/share/$(PKG_NAME) \
$(1)/usr/bin $(1)/usr/bin
$(INSTALL_BIN) \ $(INSTALL_BIN) \
@ -48,7 +48,7 @@ define Package/makfa/install
$(INSTALL_DATA) \ $(INSTALL_DATA) \
$(PKG_BUILD_DIR)/makfa.dump \ $(PKG_BUILD_DIR)/makfa.dump \
$(1)/var/lib/$(PKG_NAME)/ $(1)/usr/share/$(PKG_NAME)/
endef endef
$(eval $(call BuildPackage,makfa)) $(eval $(call BuildPackage,makfa))

View File

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