You are not logged in.
When I asked Rorschach for a way to deal with packages in IgnorePkg, he added the -c option to archup, but I didn't really figure out a nice way to filter those ignored packages out then and decided against using archup anyway. Now I have things in IgnorePkg again and it forces me to stop using aarchup. Perhaps you could add some option allowing to filter them out to aarchup itself or maybe you have an idea for a (shell) script returning contents of pacman -Qu without ignored packages?
you could use this:
pacman -Qu | grep -Evi "pacman|vlc"
but you would need to write twice the ignoredPkgs one at /etc/pacman.conf and one at the command.
I don't know bash script enough but I could come up with this in python(3):
It will read the packages from /etc/pacman.conf call "pacman -Qu" and filter the packages.
If you don't mind using python of course.
#!/usr/bin/python
# aericson <de.ericson@gmail.com>
import re
import subprocess
ignore = None
with open('/etc/pacman.conf', 'r') as q:
for line in q:
m = re.match('IgnorePkg *=(.*)', line)
if m:
ignore = m.group(1).split()
break
try: # Returns 1
s = subprocess.check_output(['pacman', '-Qu'],
stderr=open('/dev/null')).decode('utf8')
except subprocess.CalledProcessError as e:
s = e.output.decode('utf8')
for i in s.split('\n')[:-1]:
if not ignore or (i.split()[0] not in ignore):
print(i)
make it executable "chmod +x" and pass it to aarchup using -c
Tell me if it does what you want. Also do you need it to consider ignoreGroup too?
Last edited by aericson (2011-06-23 00:14:37)
Offline
Your script seems to be working okay, thanks. I personally have no need for IgnoreGroup.
Offline
Your script seems to be working okay, thanks. I personally have no need for IgnoreGroup.
I'm glad I could help, will think if it's worth implementing that built-in aarchup.
Offline
When I asked Rorschach for a way to deal with packages in IgnorePkg, he added the -c option to archup, but I didn't really figure out a nice way to filter those ignored packages out then and decided against using archup anyway. Now I have things in IgnorePkg again and it forces me to stop using aarchup. Perhaps you could add some option allowing to filter them out to aarchup itself or maybe you have an idea for a (shell) script returning contents of pacman -Qu without ignored packages?
I composed a patch for "pacman" exactly for this case (discussion). I know little about internals of "pacman", so use it at your own risk.
we are not condemned to write ugly code
Offline
Thanks, beroal.
Offline
When I asked Rorschach for a way to deal with packages in IgnorePkg, he added the -c option to archup, but I didn't really figure out a nice way to filter those ignored packages out then and decided against using archup anyway. Now I have things in IgnorePkg again and it forces me to stop using aarchup. Perhaps you could add some option allowing to filter them out to aarchup itself or maybe you have an idea for a (shell) script returning contents of pacman -Qu without ignored packages?
Version 1.6.2 should ignore those packages by default, could you see if it works fine?
Also it should work for AUR pkgs if you use --aur as long as you have the packages in IgnorePkg.
Last edited by aericson (2011-07-09 20:36:37)
Offline
It doesn't work for me.
Offline
It doesn't work for me.
Could you paste the part of IgnorePkg from pacman.conf?
Offline
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
HoldPkg = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/curl -C - -f %u > %o
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
IgnorePkg = libssh2 zsh
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options (all disabled by default)
#UseSyslog
ShowSize
#UseDelta
TotalDownload
#CheckSpace
ILoveCandy
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
[pfkernel]
Server = http://dl.dropbox.com/u/11734958/i686
#[testing]
#Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#Server = file:///home/custompkgs
$ aarchup -d
DEBUG(info): debug on
DEBUG(info): /etc/aarchup.conf was not found using args instead.
DEBUG(info): running command: /usr/bin/pacman -Qu
DEBUG(info): Reading /etc/pacman.conf for IgnorePkg list.
DEBUG(error): Impossible to open /etc/pacman.conf
Error(1): Key file contains line 'ShowSize' which is not a key-value pair, group, or comment
DEBUG(info): Found update libssh2 1.2.7-1
DEBUG(info): Found update zsh 4.3.11-2
DEBUG(info): Got updates will show notification
DEBUG(info): Notification was shown with success.
If I comment out ShowSize, the error mentions TotalDownload.
Offline
I should had seen that comming, anyway use the --pkg-no-ignore flag
and keep using that script, I will try to figure something out.
Last edited by aericson (2011-07-10 02:16:18)
Offline
It doesn't work for me.
Please forgive me for this bug, I made the mistake of doing some wrong assumptions about pacman.conf syntax.
Could you please update it to 1.6.3 and give me your feedback?
thanks
Offline
With both libssh2 and zsh in IgnorePkg, notification doesn't show. With only one of them there, the notification shows both of them.
Offline
With both libssh2 and zsh in IgnorePkg, notification doesn't show. With only one of them there, the notification shows both of them.
Could you please update and check again? Sorry for the trouble and thanks for testing and reporting.
Offline
Now it works properly.
Offline
Now it works properly.
glad it works.
Offline
Works perfectly, even with yaourt -Qyu. AUR-packages are also shown via cower.
But I want a tray-icon, just like the notification in debian/ubuntu that changes its icon when packages are available and will send a notification-popup, but just once. Would also be nice to add a default action maybe via right-click-menu or as a button on the popup.
Last edited by hasufell (2011-08-12 14:29:55)
Offline
Works perfectly, even with yaourt -Qyu. AUR-packages are also shown via cower.
But I want a tray-icon, just like the notification in debian/ubuntu that changes its icon when packages are available and will send a notification-popup, but just once. Would also be nice to add a default action maybe via right-click-menu or as a button on the popup.
I appreciate your feedback but aarchup is supposed to be as less intrusive as possible and I myself hate having a lot of stuff in tray area.
The point is just to notify when there are updates available if the icon is not there, it probably means that there aren't new updates.
It's supposed to be just a notifier and not a tray icon with notifications.
You probably could try pacman-notifier or Yapan but I don't know if they support AUR.
Sorry about that : /
Offline
Hi, I try to run aarchup like this
/usr/bin/aarchup --loop-time 2 --icon /usr/share/aarchup/archlogo.svg &
and get:
(process:1670): libnotify-CRITICAL **: notify_notification_show: assertion `error == NULL || *error == NULL' failed
What am I doing wrong?
Offline
Hi, I try to run aarchup like this
/usr/bin/aarchup --loop-time 2 --icon /usr/share/aarchup/archlogo.svg &
and get:
(process:1670): libnotify-CRITICAL **: notify_notification_show: assertion `error == NULL || *error == NULL' failed
What am I doing wrong?
Could you recompile(reinstall) aarchup, also "pacman -Q libnotify", Whats the version of it?
Whats your DE?
also run the aarchup with --debug and post the output
Last edited by aericson (2011-09-02 15:29:24)
Offline
I've recompiled, installed and run it like so
/usr/bin/aarchup --debug --loop-time 60 --icon /usr/share/aarchup/archlogo.svg &
the message is
sh: cower: comandă negăsită
DEBUG(error): It could have been caused by an enviroment restart.
DEBUG(error): Trying to work around it by reinitin libnotify.
(process:1127): libnotify-CRITICAL **: notify_notification_show: assertion `error == NULL || *error == NULL' failed
also, tried to run it by putting inside .icewm/startup (that's what I use no DE) like this:
#!/bin/bash
if [ -z "$(pgrep 'aarchup$')" ];then
/usr/bin/aarchup --loop-time 30 --icon /usr/share/aarchup/archlogo.svg &
fi
nothing happens.
and libnotify is 0.7.4-1
Offline
does
notify-send "hello"
show a notification?
Offline
does
notify-send "hello"
show a notification?
I just installed icewm and it didn't work for me either,
but just figured out what you had to do,
make sure dbus is running
# rc.d start dbus
you will need the package notification-daemon
and for notifications to be shown you are going to need it to be running you can run it with
$ /usr/lib/notification-daemon-1.0/notification-daemon
of course you might want to add it to autostartup or something
good luck
Offline
does
notify-send "hello"
show a notification?
no, it doesn't
I have dbus running, I installed notification-daemon , started this
/usr/lib/notification-daemon-1.0/notification-daemon
then
/usr/bin/aarchup --debug --loop-time 10 --icon /usr/share/aarchup/archlogo.svg &
and now I get
sh: cower: comandă negăsită
** (notification-daemon:1562): DEBUG: Adding id 1
Gdk-CRITICAL **: gdk_visual_get_red_pixel_details: assertion `GDK_IS_VISUAL (visual)' failed
aborting...
it seems to be working for you, I don't really know what I am doing wrong
since it's working for you on icewm I guess the culprit is most probably me, I will try also on my part to ditch icewm in favor of openbox , I'm curious if it will work
Last edited by innn (2011-09-05 09:33:30)
Offline
yes, it works for me now using openbox and having this two lines in ~/.config/openbox/autostart
/usr/lib/notification-daemon-1.0/notification-daemon &
/usr/bin/aarchup --debug --loop-time 10 --icon /usr/share/aarchup/archlogo.svg &
thanks and sorry to bother you with icewm, that thing is old enough
Offline
yes, it works for me now using openbox and having this two lines in ~/.config/openbox/autostart
/usr/lib/notification-daemon-1.0/notification-daemon & /usr/bin/aarchup --debug --loop-time 10 --icon /usr/share/aarchup/archlogo.svg &
thanks and sorry to bother you with icewm, that thing is old enough
oh, don't worry, glad it works : )
Offline