You are not logged in.

#1 2013-08-14 11:11:23

zacariaz
Member
Registered: 2012-01-18
Posts: 475
Website

[Solvedish] pacman/pacaur to list available updates in conky

I realize that this is not new idea and that it has been done before, but as always, I want to do it my way.

I've found that pacaur is a great help and since I use it anyway, it's really no bother.

So here is basically what I've done so far:

1. Added "myusername ALL=(ALL) NOPASSWD: /usr/bin/pacman -Sy" to sudoer file.

2. Created a simple script, the gist of which is:

#!/bin/bash
destfile=~/.pacsync.info
sudo pacman -Sy
echo `pacaur -Qu | cut -c4-` >> $destfile

Obviously inspired from something I found at the forum.

It seems to work, though I'm not quite sure if it's able to handle AUR updates, but all in good time.


The out put is almost exactly as I'd like it:

core iputils 20121221-2 -> 20121221-3 (base)

So what's the problem you ask?
Well, I'd like to take it just one step further, that is to compare the results against the news rss feed, so that it may provide a note, should there be issues with a specific upgrade. (I know this isn't foolproof, but would be nice non the less).

However, I'm at a loss as to how I'm supposed to achieve this. I could probably figure something out, and am already in the process of it, but there are so many ways of taking on this challenge, that I'd really like your advice.

Best regards.

Last edited by zacariaz (2013-08-14 14:46:34)

Offline

#2 2013-08-14 11:59:21

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,616
Website

Re: [Solvedish] pacman/pacaur to list available updates in conky

zacariaz wrote:
#!/bin/bash
destfile=~/.pacsync.info
sudo pacman -Sy
echo `pacaur -Qu | cut -c4-` >> $destfile

"pacman -Sy" without "-u" is a bad idea. The explanation can be found in multiple forum threads so I strongly recommend that you do a quick search for them. The proper way to do this is to download the database files to a separate directory. Take a look at how "checkupdates" and "paconky" do it. Obviously I recommend the latter (either on its own or as a starting point), but if you really want to re-invent the wheel then I'm not here to talk out of it.

Offline

#3 2013-08-14 12:22:59

zacariaz
Member
Registered: 2012-01-18
Posts: 475
Website

Re: [Solvedish] pacman/pacaur to list available updates in conky

Xyne wrote:
zacariaz wrote:
#!/bin/bash
destfile=~/.pacsync.info
sudo pacman -Sy
echo `pacaur -Qu | cut -c4-` >> $destfile

"pacman -Sy" without "-u" is a bad idea. The explanation can be found in multiple forum threads so I strongly recommend that you do a quick search for them. The proper way to do this is to download the database files to a separate directory. Take a look at how "checkupdates" and "paconky" do it. Obviously I recommend the latter (either on its own or as a starting point), but if you really want to re-invent the wheel then I'm not here to talk out of it.

I'm at a loos as to why pacman -Sy would be a bad idea, but I'll certainly investigate.

And I'm not trying to reinvent the wheel, I'm trying to learn while achieving a result I can be pleased with, without all the nonsense.
anyway, thanks.

I'll get back to you.

Offline

Board footer

Powered by FluxBB