You are not logged in.

#1 2007-02-23 10:22:58

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Where does the recommendations of pacman log?

When I upgrade the system, there is some recommendation to edit files in order the system work normally.

Where these recommendation save?

the log at /var/log/pacman.log only log the packages which installed, but It isn't include those recommendation.

Last edited by nadavvin (2007-03-03 19:32:48)

Offline

#2 2007-02-23 11:07:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Where does the recommendations of pacman log?

Currently, install messages are not saved anywhere. You can review them by doing

cat /var/lib/pacman/local/<pkgname>-<pkgver>-<pkgrel>/install

or you can create your own log by piping pacman's output into a file.

pacman3 will log install messages.

Offline

#3 2007-02-23 11:17:49

dienadel
Member
Registered: 2005-12-23
Posts: 179

Re: Where does the recommendations of pacman log?

tomk wrote:

pacman3 will log install messages.

Nice!! :-)

Offline

#4 2007-02-23 12:19:16

Yazcon
Member
From: Netherlands
Registered: 2007-01-04
Posts: 31

Re: Where does the recommendations of pacman log?

tomk wrote:

Currently, install messages are not saved anywhere. You can review them by doing

cat /var/lib/pacman/local/<pkgname>-<pkgver>-<pkgrel>/install

or you can create your own log by piping pacman's output into a file.

pacman3 will log install messages.

New user here,

How do you pipe pacman's output into a file?

Thanks smile Yaz

Offline

#5 2007-02-23 13:50:18

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Where does the recommendations of pacman log?

You could use tee.

pacman -S package | tee filename

Offline

#6 2007-02-24 18:19:56

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Re: Where does the recommendations of pacman log?

tomk wrote:

Currently, install messages are not saved anywhere. You can review them by doing

cat /var/lib/pacman/local/<pkgname>-<pkgver>-<pkgrel>/install

or you can create your own log by piping pacman's output into a file.

pacman3 will log install messages.

$ find -name ="install"
[nadav@myhost local]$ pwd
/var/lib/pacman/local

I want to upgrade my system when the computer start in background so It is not help me much if it was working.

I will pipe it to a file but it a little wasted since the is a log of the install packages and I only need the special instructions if something will go wrong.

Does "      --noconfirm     do not ask for any confirmation " will chouse yes when pacman ask the user questions?

Offline

#7 2007-02-24 18:31:03

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: Where does the recommendations of pacman log?

You need to use find -name install, not find -name ="install".

From pacman's man page:

--noconfirm
              Bypass any and all "Are you sure?" messages.  It's not a good idea to do this unless you want to run pacman from a script.

So, yes, it will assume yes on all questions smile

Offline

#8 2007-02-24 18:43:39

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Re: Where does the recommendations of pacman log?

thanks.

so to pipe pacman is not necessary since I can check these files on those packages which installs last which may cause a problem.

Offline

#9 2007-02-24 20:31:21

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Re: Where does the recommendations of pacman log?

I create a script with name pacman in /etc/rc.d/

#!/bin/bash
#
pacman -Syu --noconfirm |tee /home/nadav/pacman.log
chown nadav /home/nadav/pacman.log

and add it to the demons in rc.conf:

DAEMONS=(syslog-ng firwall network netfs crond alsa @pacman )

The problem is that it work also when Linux reboot and not in background.

When the computer started I didn't see it in boot time so it work in background or not work at all.

How do I set that it only work when the computer start in background but not when it reboot?

Offline

#10 2007-02-25 00:19:11

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Where does the recommendations of pacman log?

It's not recommended to run pacman in a daemon script like that. Some updates are non-trivial and requires extra steps so you risk broking your system and you wouldn't know the reason.  If you want some automation, add the -w switch to the pacman line so pacman will just download the packages and won't install/upgrade anything. That way when you'll be at your computer, everything will be ready for the upgrade.

Offline

#11 2007-03-03 15:59:54

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Re: Where does the recommendations of pacman log?

Snowman wrote:

It's not recommended to run pacman in a daemon script like that. Some updates are non-trivial and requires extra steps so you risk broking your system and you wouldn't know the reason.  If you want some automation, add the -w switch to the pacman line so pacman will just download the packages and won't install/upgrade anything. That way when you'll be at your computer, everything will be ready for the upgrade.

Why not?

It is work good from then.

What could go wrong that can not prevent in the regular way?

I guess that there will be no message like "this package could break the system", since if It like that, It will not added to the current repo.

The last time I say no, was when it ask me if to upgrade NVIDIA, and then the Xorg didn't start.
After upgrade it  it worked.

So the conclusion is always say yes, and if so, why the computer do it.

This is my rc script:

$ cat /etc/rc.d/pacman 
#!/bin/bash
#

case "$1" in
  start)
        pacman -Syuw --noconfirm |tee -a /home/nadav/pacman.log
        chown nadav /home/nadav/pacman.log
  ;;
  stop)
        pacman -Syu --noconfirm |tee -a /home/nadav/pacman.log
        pacman -Sc
        chown nadav /home/nadav/pacman.log
  ;;
  *)
    echo "usage: $0 {start|stop}"  
esac
exit 0

It only download them when computer start, since I don't want that it replace files while it need to load them and installed them when the computer turn off and clean the old packages cache.

Last edited by nadavvin (2007-03-03 16:01:18)

Offline

#12 2007-03-03 17:35:03

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: Where does the recommendations of pacman log?

You will probably want to add --noprogressbar to the pacman command that you log the output from. Otherwise the log will be full of #'s wink I have something similar* to what you do here, and I found that out a few days ago.



_____________________
* I have a cron job that regularly checks if I'm logged on to the system. If I am, the script will sync the pacman db and ask me whether I want to install or download the updates, or if I'll do it later. After the install or download the script shows me the output from pacman so that I know what happened.

Offline

#13 2007-03-03 17:50:24

nadavvin
Member
Registered: 2006-11-29
Posts: 105

Re: Where does the recommendations of pacman log?

Bebo wrote:

You will probably want to add --noprogressbar to the pacman command that you log the output from. Otherwise the log will be full of #'s wink I have something similar* to what you do here, and I found that out a few days ago.



_____________________
* I have a cron job that regularly checks if I'm logged on to the system. If I am, the script will sync the pacman db and ask me whether I want to install or download the updates, or if I'll do it later. After the install or download the script shows me the output from pacman so that I know what happened.

thanks smile

Last edited by nadavvin (2007-03-03 17:54:46)

Offline

#14 2007-03-03 19:17:59

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Where does the recommendations of pacman log?

nadavvin wrote:
Snowman wrote:

It's not recommended to run pacman in a daemon script like that. Some updates are non-trivial and requires extra steps so you risk broking your system and you wouldn't know the reason.  If you want some automation, add the -w switch to the pacman line so pacman will just download the packages and won't install/upgrade anything. That way when you'll be at your computer, everything will be ready for the upgrade.

Why not?

It is work good from then.

What could go wrong that can not prevent in the regular way?

I guess that there will be no message like "this package could break the system", since if It like that, It will not added to the current repo.

Because as I mentionned sometime extra steps are required. For example, when we switched from devfs to udev or from initrd to initcpio, you needed to change your fstab and lilo.conf/menu.lst.  If you would had done your updates in the background, you would have missed the warning messages as I don't think you would check the message log every day. So you would have ended up with an unbootable system. Other examples: if you use lilo, you need to run it each time the kernel/lilo is updated. Another one:  when we went to the modularized xorg 7, paths in xorg.conf needed to be changed.

If it's the confirmation that you don't like, use the --noconfirm switch. Start pacman in a terminal then check it back later to see what packages it has installed and if there were important post-install messages.

If you really want to run pacman as a daemon, I can't force you to not do it.  I'm just warning you that potential problems can happen with this method.

Offline

#15 2007-03-03 20:18:48

tlaloc
Member
From: Lower Saxony
Registered: 2006-05-12
Posts: 359

Re: Where does the recommendations of pacman log?

tomk wrote:

pacman3 will log install messages.

Where exactly will it do so? /var/log/pacman.log seems to be the logical place. But even though I have an RC installed, I am too much of a coward/technical idiot to use it for complex issues. tongue

Offline

Board footer

Powered by FluxBB