You are not logged in.

#26 2010-01-29 02:28:13

xandry
Member
From: Russian Federation
Registered: 2010-01-29
Posts: 6

Re: pacmatic: No more surprises!

If in the directory /etc are no files *.pacnew, then pacmatic all the same suggests something to compare. It's a bug?

$ sudo pacmatic -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
xyne-any is up to date
:: Starting full system upgrade...
warning: udev: local (149-1) is newer than core (146-2)
local database is up to date

0 pacnew files found (0 added).  Update files now? (Y/n)

Offline

#27 2010-01-29 04:14:35

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

Yes, that is a bug.

It is fixed now.

Offline

#28 2010-01-29 15:44:37

xandry
Member
From: Russian Federation
Registered: 2010-01-29
Posts: 6

Re: pacmatic: No more surprises!

thanks

Offline

#29 2010-07-31 21:45:06

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

Fooling around with a new feature to add: rebuilds.

No AUR helper will tell you "Oh, libjpeg got an update, you should probably rebuild everything."  But they should!  This will tell you about such events.  However it is extremely paranoid.  For example, I have 873 packages (pacman -Q | wc) and 174 are foreign (pacman -Qm | wc).  This script suggest I rebuild 126 of them.  I am pretty sure all of these are false positives.

It works by comparing the build date of a foreign package to the install date of all its deps.  If any were installed after the build, it complains.

Sample python script here: http://kmkeen.com/pacmatic/rebuild.py.txt

Thoughts?  Anyway to bring the number down?  Maybe only check against packages that were updated in the current -Syu.  Maybe it will break with renames.

If I can get it to act less stupid and can make it faster and can port the whole thing to bash, it'll become part of pacmatic.

Offline

#30 2011-03-20 23:41:44

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

New feature!  Pacmatic will summarize the arch-general ML and tell you if people have been talking about the packages you have installed.  This runs surprisingly fast.

Also is a new dep, Expac.  A tiny and all around great utility from Falconindy.

Last edited by keenerd (2011-03-20 23:42:48)

Offline

#31 2011-03-21 05:14:15

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: pacmatic: No more surprises!

nice looking project. i'll look more into using it soon, but just wondered if pacmatic could respect pacman.conf in terms of LogFile = ..  reminds me a little of gentoo's `emerge' as far as notifying about new configs and news at updates. good deal :}

Offline

#32 2011-03-21 13:33:46

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

Done, sort of.  Set the $pacman_log variable before launching Pacmatic.

Offline

#33 2011-04-30 03:14:37

Triquetra
Member
Registered: 2011-04-30
Posts: 3

Re: pacmatic: No more surprises!

I'm a gui guy.  I don't want to use vimdiff (in fact I don't have it installed), but I can't figure out how to get pacmatic to use kdiff3.

I've set the pacdiff_program env variable to "kdiff3" and "/usr/bin/kdiff3" (confirmed by running pacmatic without arguments), but neither work.

When I select "v" to view changes I get the following error: /usr/bin/pacdiff: line 69: vimdiff: command not found

Any idea how I can get this to work with kdiff3?

Must vimdiff be installed even if it is not used?

Offline

#34 2011-05-06 03:37:11

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

How exactly are you setting the variable and calling pacmatic?  Are you exporting the variable (in the same shell) beforehand?

Offline

#35 2011-06-04 17:32:55

Triquetra
Member
Registered: 2011-04-30
Posts: 3

Re: pacmatic: No more surprises!

I'm setting the environment variable by putting:

export pacdiff_program=kdiff3

in my .bashrc file

If I call pacmatic with "pacmatic -Syu" then I get a bunch of permission denied errors followed by the "X pacnew files found.  Update files now?" prompt.  If I enter "y", then kdiff3 opens with nothing in the window.

If I call pacmatic with "sudo pacmatic -Syu" then the update works, but when trying to update the pacnew files, I get the same "/usr/bin/pacdiff: line 69: vimdiff: command not found"

Offline

#36 2011-06-04 18:21:11

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

Pacmatic needs root permissions to update the log files (arch-news.log and pacman.log) and run pacman and edit the files in /etc.  So Pacmatic will be running as root and your diff program needs to be exported in root's bashrc.

Offline

#37 2011-06-04 18:23:38

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: pacmatic: No more surprises!

Alternatively, use sudoers to preserve the var.

Offline

#38 2011-06-11 20:20:21

Triquetra
Member
Registered: 2011-04-30
Posts: 3

Re: pacmatic: No more surprises!

Thanks for the sudoers tip.  I've successfully used Defaults env_keep +=pacdiff_program to tranfer the variable to root.  But now I'm having problems with X and kde.  With the environment variable set (and properly transferred through sudoers), I get the following error:

4 pacnew files found (0 added).  Update files now? (Y/n) y
Error: "/var/tmp/kdecache-david" is owned by uid 1000 instead of uid 0.
kdiff3(1871): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)

KCrash: Application 'kdiff3' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/david/.kde4/socket-dpclaptop/kdeinit4__0

export $(dbus-launch)
produces the same result.

export pacdiff_program="dbus-launch kdiff3" Produces:

4 pacnew files found (0 added).  Update files now? (Y/n) y
Error: "/var/tmp/kdecache-david" is owned by uid 1000 instead of uid 0.

Altough in this instance, Kdiff3 does launch, but there are no files in it.

The recommended way to launch KDE programs with sudo is through kdesu or kdesudo.  Both of which work on my system to launch kdiff3.  However, this does not work with pacmatic. Both of the following hang: kdesudo pacmatic -Syu or export pacdiff_program="kdesudo kdiff3"  followed by sudo pacmatic -Syu

Starting a new shell with su, and then running pacmatic produces the same problems with KDE.

I've also tried sudo -H pacmatic -Syu or entering the following in sudoers:

Defaults env_keep += "HOME"
Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
Defaults env_keep += "XDG_SESSION_COOKIE"

Both of which produce the following:

4 pacnew files found (0 added).  Update files now? (Y/n) y
No protocol specified
kdiff3: cannot connect to X server :0

I'm stumped.  Has anyone actually gotten this to work with a gui diff program in KDE?  What am I missing?

Last edited by Triquetra (2011-06-11 20:52:33)

Offline

#39 2011-08-11 12:25:04

duquesnc
Member
Registered: 2008-12-10
Posts: 94
Website

Re: pacmatic: No more surprises!

Being inspired by pacmatic and safepac, I just forked pacmatic in order to add a cron-pacmatic command.

What it does: it downloads all the updates without installing them (pacman -Suyw). Then, using the handy functions in pacmatic, it sends you an email containing a digest of rss feed/mails/available updates.

After receiving such a mail, you know you just have to log in you box and run pacmatic to update safely.

If you are interested in adding it in your package, the fork is here:
https://github.com/chmduquesne/pacmatic

Offline

#40 2011-08-12 14:16:09

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: pacmatic: No more surprises!

I like parts of this more than others.  The email updates are great.  But two parts of the backend should be fixed:

Running pacman -Sy in cron is something that I will never support.  A better way is
https://bbs.archlinux.org/viewtopic.php … 14#p906314
Of course, the alternate DB path will need to be used throughout Pacmatic too.  An environmental var is probably the best way to get the information in.

Splitting it into two files is silly.  Wrap the main body in a function.  Then call main() after a source check (see http://stackoverflow.com/questions/2683279/ ) or (simpler, more reliable, preferred solution) add a --lib flag that disables main().

Offline

#41 2012-07-20 22:33:06

mikkie
Member
Registered: 2009-11-10
Posts: 52

Re: pacmatic: No more surprises!

When I run "sudo pacmatic -Syu", I get stuck and get the following error: "sed: -e expression #1, char 0: no previous regular expression".

Edit: Dont't know what happened but it works now.

Last edited by mikkie (2012-07-21 07:20:56)

Offline

#42 2012-12-25 09:49:11

jrussell
Member
From: Cape Town, South Africa
Registered: 2012-08-16
Posts: 510

Re: pacmatic: No more surprises!

keenerd wrote:

Fooling around with a new feature to add: rebuilds.

No AUR helper will tell you "Oh, libjpeg got an update, you should probably rebuild everything."  But they should!  This will tell you about such events.  However it is extremely paranoid.  For example, I have 873 packages (pacman -Q | wc) and 174 are foreign (pacman -Qm | wc).  This script suggest I rebuild 126 of them.  I am pretty sure all of these are false positives.

It works by comparing the build date of a foreign package to the install date of all its deps.  If any were installed after the build, it complains.

Sample python script here: http://kmkeen.com/pacmatic/rebuild.py.txt

Thoughts?  Anyway to bring the number down?  Maybe only check against packages that were updated in the current -Syu.  Maybe it will break with renames.

If I can get it to act less stupid and can make it faster and can port the whole thing to bash, it'll become part of pacmatic.

Is this part of pacmatic currently?


bitcoin: 1G62YGRFkMDwhGr5T5YGovfsxLx44eZo7U

Offline

#43 2013-06-01 06:06:12

laite
Member
Registered: 2011-06-05
Posts: 33

Re: pacmatic: No more surprises!

mikkie wrote:

When I run "sudo pacmatic -Syu", I get stuck and get the following error:

sed: -e expression #1, char 0: no previous regular expression.

I have this same error, but it doesn't seem to affect anything (I don't have any packages to update currently, though).

It appeared when I for the first time had a .pacnew (/etc/pacman.d/mirrorlist.pacnew), compared it and removed it through pacmatic. After that, running pacmatic -Syu always prints this exact error on first line.

Offline

#44 2013-09-22 21:04:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacmatic: No more surprises!

pacnew_count()  # none : int
{
    find /etc/ \( -name \*.pacnew -o -name \*.pacorig -o -name \*.pacsave \) 2> /dev/null | wc -l
}

The problem is e.g. /usr/share/config/kdm/kdmrc is not in /etc , but it's in kdebase-workspace's backup array.

pacdiff utility that's shipped with pacman let's you override the default search path:

$ pacdiff usage
pacdiff : a simple pacnew/pacorig/pacsave updater
Usage : pacdiff [-l]
  -l/--locate makes pacdiff use locate rather than find
  DIFFPROG variable allows to override the default vimdiff
  DIFFSEARCHPATH allows to override the default /etc path
Example : DIFFPROG=meld DIFFSEARCHPATH="/boot /etc /usr" pacdiff

Offline

#45 2016-02-18 16:45:25

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: pacmatic: No more surprises!

I think I've discovered a bug.

I uninstalled libreoffice-fresh and installed libreoffice-still.

Now whenever I issue sudo pacmatic-Syu I get:

2 pacnew files found (0 added).  Update files now? (Y/n)

If I answer Y, nothing happens; the program just exits.

If I run

locate -e --regex "\.pac(new|orig|save)$"

I get

/etc/profile.d/libreoffice-fresh.csh.pacsave
/etc/profile.d/libreoffice-fresh.sh.pacsave

So there are no .pacnew files but 2 .pacsave ones, which pacmatic doesn't handle.

Offline

#46 2016-02-18 17:06:02

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: pacmatic: No more surprises!

pacmatic doesn't handle them at all, it simply calls $pacdiff_program, which by default is pacdiff (which does handle pacsave files). Have you overridden $pacdiff_program with a different utility?

What do you get if you run 'pacdiff' manually?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#47 2016-02-18 17:48:05

entodoays
Member
From: Malta
Registered: 2014-10-25
Posts: 118

Re: pacmatic: No more surprises!

I have not overwritten the $pacdiff_program explicitly.

Running pacdiff without any parameters or with the -p command returns no results.
Running pacdiff -l returns the two .pacsave files and offers to delete them since the original files related to libreoffice-fresh no longer exists.

Offline

Board footer

Powered by FluxBB