[arch-general] Check for update in script
Hi I can't find a good way to check for available upgrades without touching the database, as running `pacman -Sy` without `u` isn't supported. Any idea ? Maybe a new pacman switch like "--upstreamdbpath" to toggle change the location of sync/ without touching local/ ? Why I need it : https://github.com/XavierBerger/RPi-Monitor/pull/57#issuecomment-55248969 Yamakaky
On Thu, Sep 11, 2014 at 10:31 PM, Yamakaky <yamakaky@yamaworld.fr> wrote:
Hi
I can't find a good way to check for available upgrades without touching the database, as running `pacman -Sy` without `u` isn't supported. Any idea ? Maybe a new pacman switch like "--upstreamdbpath" to toggle change the location of sync/ without touching local/ ?
Why I need it : https://github.com/XavierBerger/RPi-Monitor/pull/57#issuecomment-55248969
Yamakaky
It can certainly be done. You can always do a "pacman -Su" later, if you want. In your use case, you can probably specify an alternative db path using the --dbpath switch in pacman. In this case, I believe RTFM is an appropiate response. :) Hope it helps. -- Savyasachee Jha *"Aerodynamics is for people whodon't know how to build engines."*
On 11.09.14 at 19:01, Yamakaky wrote:
Hi
I can't find a good way to check for available upgrades without touching the database, as running `pacman -Sy` without `u` isn't supported. Any idea ? Maybe a new pacman switch like "--upstreamdbpath" to toggle change the location of sync/ without touching local/ ?
Why I need it : https://github.com/XavierBerger/RPi-Monitor/pull/57#issuecomment-55248969
Yamakaky
pacman provides a `checkupdates` script, see /usr/bin/checkupdates for how it works. -- jlk
pacman provides a `checkupdates` script, see /usr/bin/checkupdates for how it works.
Wow, I didn't know this one, thanks !
It can certainly be done. You can always do a "pacman -Su" later, if you want.
The problem is that I want to check for updates in a script. 'pacman -Sy' without upgrade can cause problems.
In your use case, you can probably specify an alternative db path using the --dbpath switch in pacman.
That's what I wanted to do, but dbpath countains the local and upstream databases, so I thought it might cause problems.
On Fri, Sep 12, 2014 at 1:36 AM, Yamakaky <yamakaky@yamaworld.fr> wrote: In your use case, you can probably specify an alternative db path
using the --dbpath switch in pacman.
That's what I wanted to do, but dbpath countains the local and upstream databases, so I thought it might cause problems.
If I understand it right, and correct me if I do not, you can use pacman -Syy --dbpath /tmp/pacman-update/, right? That way, if you want to check the local databases (currently installed and active), you can use pacman -Si <package-name> and if you want to check the latest ones, you can use pacman -Si --dbpath /tmp/pacman-update/ <package-name>. I think that this is the same mechanism as used by the check-updates script. That script just cleans up a bit more, but fundamentally uses this same switch. -- Savyasachee Jha *"Aerodynamics is for people whodon't know how to build engines."*
On 11/09/14 at 10:06pm, Yamakaky wrote:
pacman provides a `checkupdates` script, see /usr/bin/checkupdates for how it works.
Wow, I didn't know this one, thanks !
pacman -Ql pacman | awk -F/ '/bin/ {print $4}' /J -- http://jasonwryan.com/ [GnuPG Key: B1BD4E40]
Le 12/09/2014 20:15, Jason Ryan a écrit :
On 11/09/14 at 10:06pm, Yamakaky wrote:
pacman provides a `checkupdates` script, see /usr/bin/checkupdates for how it works.
Wow, I didn't know this one, thanks !
pacman -Ql pacman | awk -F/ '/bin/ {print $4}'
/J
Yes, I know, but I never used this one.
participants (4)
-
Jakub Klinkovský
-
Jason Ryan
-
Savyasachee Jha
-
Yamakaky