LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   sth wrong in slackpkg (http://www.linuxquestions.org/questions/slackware-14/sth-wrong-in-slackpkg-4175481986/)

oxsard 10-24-2013 07:37 AM

sth wrong in slackpkg
 
hello everyone,

slackpkg give me "grep write error" in the stdout every time when I am trying to slackpkg {install sth, upgrade-all,...}.

I have tried to analysis /usr/sbin/slackpkg, but failed....

Can anyone tell me how to find the answer nextstep?

# type grep
grep is /usr/bin/grep

slackpkg 's version is 2.81.1

slackware-current 2013-10-23

Alien Bob 10-25-2013 04:00 AM

Something is not wrong with slackpkg.... something is wrong with your computer.
Start with copy/pasting the exact output into this thread so that other people can try to think of a cause.

What you also must mention is the output of these commands:
Code:

uname -a
Code:

cat /etc/slackware-version
Code:

ls -la /var/log/packages/slackpkg*
Code:

ls -la /var/log/packages/pkgtool*
Code:

ls -la /var/log/packages/grep*
Eric

kkady32 10-26-2013 01:38 AM

same here in 14.1 RC2:
Code:

2013-10-26 08:26:45 (11.6 MB/s) - '/var/cache/packages/./slackware64/x/xterm-297-x86_64-1.txz.asc' saved [198]

grep: write error: Broken pipe
grep: write error: Broken pipe
        Package scim-1.4.14-x86_64-4.txz is already in cache - not downloading
grep: write error: Broken pipe
grep: write error: Broken pipe
        Package xterm-297-x86_64-1.txz is already in cache - not downloading
grep: write error: Broken pipe
grep: write error: Broken pipe

Code:

Linux s3 3.10.17 #1 SMP Wed Oct 23 16:28:33 CDT 2013 x86_64 AMD FX(tm)-6300 Six-Core Processor AuthenticAMD GNU/Linux
Code:

Slackware 14.1
Code:

-rw-r--r-- 1 root root 1658 Oct 21 12:26 /var/log/packages/slackpkg-2.82.0-noarch-12
Code:

-rw-r--r-- 1 root root 1372 Oct 18 21:56 /var/log/packages/pkgtools-14.1-noarch-2
Code:

-rw-r--r-- 1 root root 5128 Oct 18 21:54 /var/log/packages/grep-2.14-x86_64-1

oxsard 11-04-2013 06:47 AM

Quote:

Originally Posted by Alien Bob (Post 5051983)
Something is not wrong with slackpkg.... something is wrong with your computer.
Start with copy/pasting the exact output into this thread so that other people can try to think of a cause.

What you also must mention is the output of these commands:
Code:

uname -a
Code:

cat /etc/slackware-version
Code:

ls -la /var/log/packages/slackpkg*
Code:

ls -la /var/log/packages/pkgtool*
Code:

ls -la /var/log/packages/grep*
Eric

Code:

uname -a
Linux beethoven 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 Intel(R) Core(TM)2 Duo CPU    T8300  @ 2.40GHz GenuineIntel GNU/Linux

Code:

cat /etc/slackware-version
Slackware 14.1

Code:

ls -la /var/log/packages/slackpkg*
-rw-r--r-- 1 root root 1658 10月 22 21:42 /var/log/packages/slackpkg-2.82.0-noarch-12

Code:

ls -la /var/log/packages/pkgtool*
-rw-r--r-- 1 root root 1333 10月 20 09:50 /var/log/packages/pkgtools-14.1-noarch-2

Code:

ls -la /var/log/packages/grep*
-rw-r--r-- 1 root root 5118 1月  29  2013 /var/log/packages/grep-2.14-x86_64-1


hba 11-05-2013 10:17 PM

"Broken pipe" is a well know issue while piping commands [1] and slackpkg makes use of it with grep [2]

I'm in -current and have been using slackpkg without any issue related with "broken pipes" but just trying to give you a guess, are you executing slackpkg with sudo or with a root login shell (su -)?. sudo could be the problem [3].


[1] http://unix.stackexchange.com/a/60228
[2] grep -E 'grep .* \|' /usr/libexec/slackpkg/core-functions.sh
[3] http://lists.freebsd.org/pipermail/f...ry/022397.html

Drakeo 11-06-2013 12:29 AM

yes I had the same thing on my latest still works. seems it is caching them all before the install. grep error I figure it is some feed back.

slackpkg works so no problem here.
There is nothing wrong with this computer or the fresh install from current to rc1 rc 2 rc3 and I keep an updated mirror on the hard drive.
No biggy to me Slackpkg still works fine. just spews the grep error

j_v 11-06-2013 07:46 PM

Quote:

Originally Posted by Drakeo (Post 5059079)
No biggy to me Slackpkg still works fine. just spews the grep error

Same here. It seems it would be possible to trap the SIGPIPE, but I'm more familiar with sighandlers in C code than in SHELL code. Probably overkill, since it ain't really broke, so no use fixin' it. Or adding `2>/dev/null` to the grep commands would quiet it maybe. I'll play around with it when I get time.

j_v 11-06-2013 08:28 PM

The signal handler doesn't seem to work, since the shell doesn't seem to catch the sig in time or because the shell doesn't run the signal handler function until after the current process completes.
That's all I have time for right now. Like I said before, I don't see slackpkg as broken, so I may not go further with this. My system updates and upgrades have been good, just a little noisy.


All times are GMT -5. The time now is 04:11 AM.