Re: [Cooker] AutoInstall: 'rpm -i ....' within 'postInstall' hangs

2002-09-12 Thread Nora Etukudo

On Tue, Sep 10, 2002 at 05:39:38PM +0200, Pixel wrote:

> fred, any idea?

I've put a

  strace -o /tmp/rpm-trace rpm -i 

in my 'postInstall' script. I looks like the RPM database ist locked:


open("/var/lib/rpm/__db.002", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
_llseek(3, 0, [0], SEEK_END)= 0
_llseek(3, 647168, [647168], SEEK_CUR)  = 0
write(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192) = 8192
mmap2(NULL, 655360, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x4016e000
close(3)= 0
open("/var/lib/rpm/Packages", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0644) = -1 EEXIST 
(File exists)
open("/var/lib/rpm/Packages", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=7639040, ...}) = 0
_llseek(3, 0, [0], SEEK_SET)= 0
read(3, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 256) = 256
close(3)= 0
open("/var/lib/rpm/Packages", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=7639040, ...}) = 0
brk(0)  = 0x8252000
brk(0x8254000)  = 0x8254000
pread(3, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 4096, 0) = 4096
fcntl64(3, F_SETLK, {type=F_WRLCK, whence=SEEK_SET, start=0, len=0}) = -1 EAGAIN 
(Resource temporarily unavailable)


Liebe Grüße, Nora.
-- 
[EMAIL PROTECTED]
 IM-NETZ Neue Medien, Berlin   http://www.im-netz.de/
 WWW von Frauen für Frauen, Hamburghttp://www.w4w.net/
 Lesbian Computer Networks, Helsinki   http://www.sappho.net/




Re: [Cooker] AutoInstall: 'rpm -i ....' within 'postInstall' hangs

2002-09-11 Thread Nora Etukudo

On Tue, Sep 10, 2002 at 09:43:30PM +0200, Frederic Lepied wrote:

> DURING_INSTALL isn't used by rpm directly. It's used by ldconfig and
> update-menus iirc. You can probably debug by issueing a pstree in
> console 2 to see what process is hanging.

1010 [calypso:/share/8x/ks] =cat tmp/nora.log 

 PID   RSS %CPU CMD
   1 0  0.2 (swapper)
   2 0  0.0 (keventd)
   3 0  0.0 (ksoftirqd_CPU0)
   4 0  0.2 (kswapd)
   5 0  0.2 (bdflush)
   6 0  0.3 (kupdated)
   7 4  0.0 linuxrc
   816  0.0 linuxrc
   9 24260  4.9 /usr/bin/perl /usr/bin/runinstall2 --method nfs
  11 0  1.2 (rpciod)
  1280  0.0 /bin/sh
  18 0  0.0 (khubd)
2635  2016  0.1 cupsd
2665   300  0.0 minilogd
3022  1268  0.0 bash -c \"
3027  1276  0.0 sh scripts/extra_rpms
3028  1232  0.0 rpm -i /share/8x/ks/rpms/msfonts-0.2-3ne.i586.rpm --n
3048  3948 99.0 /usr/bin/perl /usr/bin/ps

   swapper-+-bdflush
   |-cupsd
   |-keventd
   |-khubd
   |-ksoftirqd_CPU0
   |-kswapd
   |-kupdated
   |-linuxrc-+-linuxrc
   | `-runinstall2-+-bash---sh---rpm
   |   |-busybox---pstree
   |   `-rpciod
   `-minilogd

I'm unable to interpret the output from 'pstree'. After I killed '3028'
(rpm -i /share/8x/...) the installation went on.

The whole 'rpm' line reads

   rpm -i /share/8x/ks/rpms/msfonts-0.2-3ne.i586.rpm --nopost

I added the '--nopost' because I thought the script

1012 [calypso:/share/8x/ks] =rpm -qp --scripts rpms/msfonts-0.2-3ne.i586.rpm 
   preinstall program: /bin/sh
   postinstall scriptlet (through /bin/sh):
   perl -pi \
   -e 'print "\t/usr/X11R6/lib/X11/fonts/ms,\n" if m/Speedo,$/;' \
   /usr/X11R6/lib/X11/fs/config
   if [ -z "$DURING_INSTALL" ]; then
   cd /usr/X11R6/lib/X11/fonts/ms
   chkfontpath --add /usr/X11R6/lib/X11/fonts/ms
   /etc/rc.d/init.d/xfs restart
   if [ $DISPLAY'f' != 'f' ]; then
   set fb rehash
   fi
   fi
   preuninstall program: /bin/sh

does something very odd, but this doesn't help. I didn't change this RPM
since about a year and about a week ago it worked.

Hhum, you might ask: '/share/8x' is properly mounted whithin the chroot
environment (all my other stuff works).

One further thing: I wonder why 'cupsd' is running during installation!?

Liebe Grüße, Nora.
-- 
[EMAIL PROTECTED]
 IM-NETZ Neue Medien, Berlin   http://www.im-netz.de/
 WWW von Frauen für Frauen, Hamburghttp://www.w4w.net/
 Lesbian Computer Networks, Helsinki   http://www.sappho.net/




Re: [Cooker] AutoInstall: 'rpm -i ....' within 'postInstall' hangs

2002-09-10 Thread Frederic Lepied

Pixel <[EMAIL PROTECTED]> writes:

> Nora Etukudo <[EMAIL PROTECTED]> writes:
> 
> > I used to install some of my own RPM's within the 'postInstall'-script
> > of Mandrake AutoInstall. Since a few days this doesn't work anymore.
> > 
> > A 'rpm -i ' hangs silently and I have to kill it manually and then
> > the installation goes further.
> > 
> > Within the 'postInstall'-script I used to have
> > 
> >export DURING_INSTALL="YES"
> > 
> > If I comment this out, the 'rpm -i ' works again, but then in some
> > RPM's there where things started which shouldn't during installation
> > (eg. restarting font server).
> > 
> > What I'm doing wrong?
> 
> fred, any idea?

DURING_INSTALL isn't used by rpm directly. It's used by ldconfig and
update-menus iirc. You can probably debug by issueing a pstree in
console 2 to see what process is hanging.
-- 
Fred - May the source be with you




Re: [Cooker] AutoInstall: 'rpm -i ....' within 'postInstall' hangs

2002-09-10 Thread Nora Etukudo

On Tue, Sep 10, 2002 at 01:56:43PM +0200, Nora Etukudo wrote:

>export DURING_INSTALL="YES"
> 
> If I comment this out, the 'rpm -i ' works again, but then in some

Sorry, I was lying. Above 'DURING_INSTALL' doesn't matter at all.
And, 'rpm -e ' is hanging either.

What is the correct way to do RPM install/erase operations within the
'postInstall'-script nowadays?

Liebe Grüße, Nora.
-- 
[EMAIL PROTECTED]
 IM-NETZ Neue Medien, Berlin   http://www.im-netz.de/
 WWW von Frauen für Frauen, Hamburghttp://www.w4w.net/
 Lesbian Computer Networks, Helsinki   http://www.sappho.net/




[Cooker] AutoInstall: 'rpm -i ....' within 'postInstall' hangs

2002-09-10 Thread Nora Etukudo

I used to install some of my own RPM's within the 'postInstall'-script
of Mandrake AutoInstall. Since a few days this doesn't work anymore.

A 'rpm -i ' hangs silently and I have to kill it manually and then
the installation goes further.

Within the 'postInstall'-script I used to have

   export DURING_INSTALL="YES"

If I comment this out, the 'rpm -i ' works again, but then in some
RPM's there where things started which shouldn't during installation
(eg. restarting font server).

What I'm doing wrong?

Liebe Grüße, Nora.
-- 
[EMAIL PROTECTED]
 IM-NETZ Neue Medien, Berlin   http://www.im-netz.de/
 WWW von Frauen für Frauen, Hamburghttp://www.w4w.net/
 Lesbian Computer Networks, Helsinki   http://www.sappho.net/