You are not logged in.

#1 2016-11-30 14:04:02

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

How do you log new optional dependencies for full system update?

This has been discussed before. I did not find anything really beautiful.

I make system updates rather seldom. Almost every package gets updated when I finally do. This takes long and results in big amount of output on the screen. I just realised that the output for optional dependencies is not logged in /var/log/pacman.log. It took some searching in the forums to find out that I gtk3-print-backends is now required for printing. I had not seen the message mentioning the optional dependency for gtk3 as I do not usually like to stare at the terminal during the whole system update.

I guess everything gets captured and I can also see the output on the screen if I enter:

(pacman -Syu 2>&1) | tee pacman2.log

I wonder how others deal with these non-logged dependency messages?

Offline

#2 2016-11-30 14:09:02

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How do you log new optional dependencies for full system update?

Update more often and pay attention to pacman's output.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2016-11-30 14:17:41

ayekat
Member
Registered: 2011-01-17
Posts: 1,590

Re: How do you log new optional dependencies for full system update?

I agree that it would be nice to have that information logged, though.
If you're running pacman from a TTY, the scrollback buffer is rather limited, and often gets discarded when you change to a different TTY.
For things like .pacnew files, there is always `pacdiff` (or simply `find`), so losing that output isn't too tragic (but it's logged anyway).
For things like directory permissions changing, there is `pacman -Qkk` (although it's a little verbose - but it's logged anyway).


pkgshackscfgblag

Offline

#4 2016-11-30 14:37:28

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How do you log new optional dependencies for full system update?

You could try to run pacman within script, see 'man script'.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2016-11-30 15:05:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,535
Website

Re: How do you log new optional dependencies for full system update?

You can also list all the currently-not-installed opt deps of all of your packages (even with some formatting):

#!/bin/bash

pacman -Qi | awk -F: '
   function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s; }
   /^Name/ { pkg=ltrim($2); }
   /^Optional Deps/ && $2 != " None" {
      n = 0;
      while (1) {
         if ($NF !~ /\[installed\]/) {
            if (++n == 1) printf "\033[34;1m%s\033[0m\n", pkg;
            printf "\t\033[1m%s:\033[0m %s\n", ltrim($(NF-1)), ltrim($NF);
         }
         getline;
         if ($1 ~ /^Required/) break;
      }
   }
'

EDIT: oops, the first version didn't quite work perfectly, this one should.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2016-12-01 07:54:45

qwertypoke
Member
Registered: 2011-09-06
Posts: 28

Re: How do you log new optional dependencies for full system update?

Lots of useful information here that I will need sooner or later. Thank you.

Offline

#7 2016-12-01 08:42:05

smirky
Member
From: Bulgaria
Registered: 2013-02-23
Posts: 277
Website

Re: How do you log new optional dependencies for full system update?

This version prints a lot of misplaced strings all over the shell. Perhaps it's because I'm using zsh?


Personal spot  ::  https://www.smirky.net/  ::  Try not to get lost!

Offline

#8 2016-12-01 12:10:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,535
Website

Re: How do you log new optional dependencies for full system update?

Sorry about that.  One of the escape codes for bold did get a stray tab inserted somehow.  Fixed.  I don't actually use this myself (though I might now in the future) - I just threw it together for this thread.

Depending on one's actual goals, you may want to add an 'e' to the pacman flags too in order to show not-installed opt-deps only for packages you've explicitly installed.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB