You are not logged in.
Pages: 1
I've decided to create a small app using Python that will query the pacman mirrors, say 3 times a day.
If there are upgrades an Icon on the task bar will go red (need to upgrade), if there are none will go green (up to date). Clicking the icon when red will start a "pacman -Syu".
As you can see, it is nothing "too complicated", but from the get go I realize I need to better understand how pacman internals work.
Where can I find such information? Also, any advise, ideas, etc. before I get going are welcome.
Thanks in advance.
R.
Last edited by ralvez (2007-05-06 02:10:23)
Offline
Maybe take a look at the source.
Offline
i think there's one already, but i can't remember it's name. check the AUR.
Offline
http://bbs.archlinux.org/viewtopic.php?t=14849
One of them has the features you plan.
Ability is nothing without opportunity.
Offline
Xerxes2 made a nice python reimplementation called libpypac. I don't believe he kept it up to date, but it might be a starting point. There's a project page on GNA.
Dusty
Offline
Thank you all for all your input.
I've got to the point in which the program is functional and I get info about what packages are available for upgrade.
I've looked at the other projects but I have taken a somehow different approach. Mind you I'm a programmer by choice and an engineer by trade and I cannot see anything go to waste so this is what I did.
I used pacman, which is a necessary package anyways, and using python's subprocess I piped data right out of the pacman -Syu screen, sending a "n" (no answer to the question of upgrade y/n) and then re-piped the data output to (at least for now) the screen.
At this point in time I can display the data in conky, but as I indicated before, my goal is to have an icon on the tray turn red when upgrades are detected and by touching the icon (probably with a too-tip ) I should be able to see the available upgrades.
Then by clicking the icon the upgrade should be preformed and the icon should then turn green.
I'll report on the progress and when the software is ready I'll share, it if there is interest on such tray tool, with the community.
Thanks again
R.
Offline
I used pacman, which is a necessary package anyways, and using python's subprocess I piped data right out of the pacman -Syu screen, sending a "n" (no answer to the question of upgrade y/n) and then re-piped the data output to (at least for now) the screen.
For what it's worth, pacman 3 has a way to simply view the packages that will be upgraded (without it prompting you about installing, replaces, etc).
pacman -Sy && pacman -Qu
I am a gated community.
Offline
Pages: 1