[pacman-dev] Little question regarding alpm
I'm currently trying to write a front end in python and a python wrapper to alpm and I'm running into some problems. I can't seem to be able to install a package twice. All goes well the first time, but then I get this: DEBUG: closing database 'extra' DEBUG: freeing package cache for repository 'extra' Then I tought I might have to re-open the 'extra' db, so I close it and then I re-open it and get this: FLOW2: target 'alsaplayer' not found -- looking for provisions or sometimes I get : RuntimeError: transaction not initialized or sometimes it works. I guess my question is this. Why does alpm close the db and free the pkg cache when one installs some package(s)? Couldn't it refresh the db and the pkg cache? Thanks in advance and please correct me if I'm wrong. Joao -- A mind all logic is like a knife all blade. It makes the hand bleed that uses it. -- Rabindranath Tagore (1861-1941)
Joao Estevao wrote:
I'm currently trying to write a front end in python and a python wrapper to alpm and I'm running into some problems.
I can't seem to be able to install a package twice. All goes well the first time, but then I get this:
DEBUG: closing database 'extra' DEBUG: freeing package cache for repository 'extra'
Then I tought I might have to re-open the 'extra' db, so I close it and then I re-open it and get this:
FLOW2: target 'alsaplayer' not found -- looking for provisions
or sometimes I get :
RuntimeError: transaction not initialized
or sometimes it works.
I guess my question is this. Why does alpm close the db and free the pkg cache when one installs some package(s)? Couldn't it refresh the db and the pkg cache?
Thanks in advance and please correct me if I'm wrong.
To answer your question, the library is updating the cache each time a package is installed or removed. A database can only be closed if the frontend requested it (alpm_db_unregister), or if the library resources are released (alpm_release). It would help to get the whole set of debug logs (set the PM_OPT_LOGMASK option to 0xFF) to have a better idea of what's happening. -- Aurelien
To answer your question, the library is updating the cache each time a package is installed or removed. A database can only be closed if the frontend requested it (alpm_db_unregister), or if the library resources are released (alpm_release).
It would help to get the whole set of debug logs (set the PM_OPT_LOGMASK option to 0xFF) to have a better idea of what's happening.
-- Aurelien
Thanks for the tip. Just to let you know the bug was in the python wrapper :) Missed a ref count. Thanks for the tip. Now it works fine.
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
-- A mind all logic is like a knife all blade. It makes the hand bleed that uses it. -- Rabindranath Tagore (1861-1941)
participants (2)
-
Aurelien Foret
-
Joao Estevao