You are not logged in.
Pacmatic is a little wrapper for pacman. It adds some much needed introspection and information to the installation process. If the devs have news for you, you'll see it before updating your system. If people have been talking about your apps on the ML, you will see it. It will also throw a warning before letting you "pacman -Sy break-everything". Finally, it will inform you about any pacnew files that popped up, and prod you to take care of them.
Treat it just like normal pacman, as all the arguments are passed through transparently. So "pacman -Syu" becomes "pacmatic -Syu". You might need to add it to your sudo config, too.
Homepage:
http://kmkeen.com/pacmatic/
It is in the AUR:
http://aur.archlinux.org/packages.php?ID=29541
And on GitHub:
http://github.com/keenerd/pacmatic/
There are a few known issues that I am stuck on. The RSS parser is very brittle. It can not tell if you aborted an update partway through.
Last edited by keenerd (2011-03-20 23:44:13)
Offline
Sounds interesting. Could you please explain in further detail? Your site page for it is down
Offline
Interesting project, but so far it only checks the news and checks whether the last time syncing wasn't too long ago. I was kinda hoping that arch users are wise enough to remember and do these things themselves...
Offline
edit: place holder webpage is up.
bender02, Are slackware users more wise because they figure out dependencies by themselves? It might sound like a silly example, but pacman is supposed to be an awesome package manager, and these are two areas where it falls flat. Besides, it is very easy for Archers to forget to do these things. (And simple for the computer to do them automatically.) Heck, I was an Archer for three years before I even heard about doing them! These are the only things it does because these are the only (known) holes in pacman's otherwise flawless interface.
So, a little more about what it does.
Right now: not much and poorly. It still misses a lot of dangerous edge cases (it will say everything is okay when it's not) but it works in the general sense and doesn't produce false positives.
Specifically, it checks to make sure you are following two unwritten rules.
First, always check the Arch homepage before updating. It's got a very crude RSS parser in a dozen lines of bash. (30 real lines, what with functions and comments.) The news is also recorded to "/var/log/arch-news.log". Since the news is saved to the log file, you will only see each new item once. If you run pacmatic again in a few seconds, your output will be empty and normal.
Second, don't let your sync get ahead of your local install. This is the dreaded "-Sy" issue. It is not perfect, and I am trying to figure out how to coax important (but unlogged) information from pacman. It parses pacman.log for the last sync and the last complete upgrade. If the sync is more than an hour ahead of the upgrade, it will throw a warning.
If you know any other common ways to shoot yourself in the foot, could you tell me?
Last edited by keenerd (2009-08-22 18:09:57)
Offline
Another common way to shoot yourself in the sensitive area is by ignoring .pacnew and .pacsave config files. Although pacman emits a warning each time these are created, users still ignore them...
Offline
Ah, yeah. Pacnew files. I am guilty of that, too. Someone (Brisbin? Xyne?) has made an app for dealing with them. Maybe something simple, like the intersection of pacnew files from the logs with pacnew files on the drive. Or call their app automatically from pacmann.
Lets see: pacman-contrib has pacdiff, yaourt has pacdiffviewer, Brisbin has pacnews, dotpac from a few years ago. I think I will go with pacdiff. It's the lightest on deps.
Wasn't there also a horrible bug involving free hard drive space? Something like if you ran out of drive space while extracting the core/extra/community lists, pacman would not be able to sync properly again. Silly bug tracker is down...
Offline
Updated! It calls out to the excellent pacdiff when you've got pacnew files floating around.
I would like to try to make the whole experience slicker, but I imagine this will require a bit of dogfooding.
Random thing I just found out while testing pacdiff: our vi package (which is not really vi but a cut down vim) has vimdiff support. But not the vimdiff command. You can alias "vi -d" and it works as a perfectly functional vimdiff.
Offline
Random thing I just found out while testing pacdiff: our vi package (which is not really vi but a cut down vim) has vimdiff support. But not the vimdiff command. You can alias "vi -d" and it works as a perfectly functional vimdiff.
This was changed some while ago, but the package is still in testing. So don't be surprised if the next vi update breaks your setup.
Offline
sweet app. Thanks. Changed my upgrade alias ('pyu') from 'sudo pacman-color -Syu' to 'sudo pacmatic -Syu' for upgrades now.
Offline
New release!
Very minor changes, mostly cosmetic and related to removing an excess of newlines in the output.
Offline
nice release... running into some issues with the updating from the pacnew files...
35 pacnew files found (0 added). Update files now? (Y/n) y
File: /etc/fam/fam.conf
/etc/fam/fam.conf does not exist
rm: remove regular file `/etc/fam/fam.conf.pacsave'? y
File: /etc/logrotate.d/slim
Files are identical, removing...
File: /etc/php/php.ini
File differences found. (V)iew, (S)kip, (R)emove: [v/s/r] v
2 files to editCannot execute shell zsh
Error detected while processing /usr/share/vim/vim72/ftplugin/man.vim:
line 47:
E484: Can't open file /tmp/v888042/0
Cannot execute shell zshError detected while processing /home/geota/.vim/plugin/c.vim:
line 85:
E484: Can't open file /tmp/v888042/1
Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
Offline
It looks like your issue is with pacdiff (part of pacman_contrib), somewhere between prompting you and running vimdiff.
First question, do you have vimdiff?
Second question: what do you have $DIFFPROG set to?
Third question: any bash experts around? Relevant part of Aaron's code:
echo -n " File differences found. (V)iew, (S)kip, (R)emove: [v/s/r] "
while read c; do
case $c in
r|R) rm "$pacfile"; break ;;
v|V)
$diffprog "$pacfile" "$file"
rm -i "$pacfile"; break ;;
s|S) break ;;
*) echo -n " Invalid answer. Try again: [v/s/r] "; continue ;;
esac
done
Offline
I have already made something similar to this:
Safepac: http://bbs.archlinux.org/viewtopic.php?id=66822
It reads the news and can automatically update your system while not touching anything that is mentioned in the news. It's designed for autoupdating, but you can easily use it manually (just don't use the silent option).
I've been using it on two boxes for months now without problems.
btw: I don't use an rss parser but simply curl to parse the news page it works!
Last edited by Shapeshifter (2009-09-02 10:14:56)
Offline
Interesting and clever. From what I gather, Safepac is designed so that the computer can update everything automatically. For comparison, Pacmatic is designed to bring information to humans so they can make smarter choices. Safepac certainly is ambitious, but it was not quite what I was looking for.
Offline
It looks like your issue is with pacdiff (part of pacman_contrib), somewhere between prompting you and running vimdiff.
First question, do you have vimdiff?
Second question: what do you have $DIFFPROG set to?
when I run vimdiff from the console I get the exact same error...
Cannot execute shell zsh
Error detected while processing /usr/share/vim/vim72/ftplugin/man.vim:
line 47:
E484: Can't open file /tmp/v946889/0
Cannot execute shell zshError detected while processing /home/geota/.vim/plugin/c.vim:
line 85:
E484: Can't open file /tmp/v946889/1
Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
Press ENTER or type command to continue
I am not sure how to check what $DIFFPROF is set to... I did an echo $DIFFPROF and it returned nothing/a blank line.
Offline
Third question: any bash experts around? Relevant part of Aaron's code:
echo -n " File differences found. (V)iew, (S)kip, (R)emove: [v/s/r] " while read c; do case $c in r|R) rm "$pacfile"; break ;; v|V) $diffprog "$pacfile" "$file" rm -i "$pacfile"; break ;; s|S) break ;; *) echo -n " Invalid answer. Try again: [v/s/r] "; continue ;; esac done
It's just so if you type r or R it removes the file, if you type v or V is diffs the file, and if you type s or S is skips the file. Anything else says invalid answer.
Offline
when I run vimdiff from the console I get the exact same error...
Looks like you found the problem. Does "vim -d file1 file2" cause the same error? Anyway, this is something to bring to the attention of the vim maintainer.
Offline
Does "vim -d file1 file2" cause the same error?
Yup it does... guess I will try and get in contact with the vim maintainer.
Offline
Hrm. That is really no good.
You can get around this by setting/exporting $DIFFPROG to something else. If you need console diff, emacs has a diff mode. If gui is acceptable, there are more options (kdiff, meld [my favorite], fldiff).
Offline
nice release... running into some issues with the updating from the pacnew files...
35 pacnew files found (0 added). Update files now? (Y/n) y
File: /etc/fam/fam.conf
/etc/fam/fam.conf does not exist
rm: remove regular file `/etc/fam/fam.conf.pacsave'? y
File: /etc/logrotate.d/slim
Files are identical, removing...
File: /etc/php/php.ini
File differences found. (V)iew, (S)kip, (R)emove: [v/s/r] v
2 files to editCannot execute shell zsh
Error detected while processing /usr/share/vim/vim72/ftplugin/man.vim:
line 47:
E484: Can't open file /tmp/v888042/0
Cannot execute shell zshError detected while processing /home/geota/.vim/plugin/c.vim:
line 85:
E484: Can't open file /tmp/v888042/1
Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
can you run vim and zsh from your shell ?
are you using zsh as a shell ?
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
can you run vim and zsh from your shell ?
are you using zsh as a shell ?
I think I figured it out... it was an error in .vimrc that I had grabbed from some persons config package... After removing the lines that are causing the rror from my vimrc everything works great... I was getting the following error but installing ctags fixed it right up.
Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
Press ENTER or type command to continue
I am not using zsh as a shell although I do have it installed... I tried using it as my default shell but could not get my PS1 converted properly... and I am rather attached to it
Last edited by ugkbunb (2009-09-04 05:00:31)
Offline
How hard would it be to add support for meld in editing / viewing the differences?
Offline
New version. More pacman option lines are detected.
Did I get them all? For example, ways to sync and update:
-Syu -Suy -Syyu -Syuy -Suyy
Offline
ugkbunb,
Sorry about missing your question. Meld is certainly doable. The "pacdiff" script checks for an environment variable "$diffprog". Normally this is set to vimdiff, but you can export meld to it. Naturally, don't do that outside of X.
Offline
I fixed my silly little bash based RSS parser. Now you will never miss another feed update again. It prints a bit more nicely, too.
Offline