LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-06-2021, 06:39 PM   #1
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 75

Rep: Reputation: Disabled
slackpkg - version 15.0.2; post-functions.sh: line 182: [: 41: unary operator expected & more screen control garbage .


Hello ALL , Here we go again (I beleive , Maybe the previous culprit was from the "upgrade-all" area ).

This line in my script (Yes run from CRON) ...

slackpkg -batch=on -default_answer=y install-new

Why should the below be output when run from a script ?
Being Run from cron I thought we had this nuked a couple of months ago ?

Code:
Installing package libgnt-2.14.1-x86_64-1.txz:
PACKAGE DESCRIPTION:
# libgnt (The GLib Ncurses Toolkit)
#
# GNT is an ncurses toolkit for creating text-mode graphical user
# interfaces in a fast and easy way. It is based on GLib and ncurses.
# It was born out of the console-based UI, Finch, for the libpurple
# project, but has now been split into its own independent repository.
#
# Homepage: https://keep.imfreedom.org/libgnt/libgnt
#
Executing install script for libgnt-2.14.1-x86_64-1.txz.
Package libgnt-2.14.1-x86_64-1.txz installed.
Searching for NEW configuration files...
stty: 'standard input': Inappropriate ioctl for device
Some packages had new configuration files installed (27 new files):

/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 41: unary operator expected
/etc/default/sshd.new
^[[1A^[[K^[[1A^[[K
What do you want (K/O/R/P)?

        (K)eep the old files and consider .new files later

        (O)verwrite all old files with the new ones. The
           old files will be stored with the suffix .orig

        (R)emove all .new files

        (P)rompt K, O, R selection for every single file
ie:

Code:
   179                  # No. of prompt etc. lines to print.
   180                  TEXTLINES=$(( $( printf %b "$PROMPTTEXT" | wc -l ) + 3 ))
   181  
X  182                  if [ $(( newcount + TEXTLINES )) -lt $ROWS ]; then
   183                          # All files will fit on screen.
   184                          printf "%s\n" "$FILES"
   185                  else
   186                          # Won't all fit, so scroll a screenfull at a time.
   187                          # No. of lines minus 'Searching for' + 'Press SPACE...'
   188                          MAXROWS=$(( ROWS - 5 ))
Tnx , ALL for looking into this . JimL

ps: @chrisretusn , This is still using the old script interation atm . Will plce it in test run at home soon . Twyl .

pps: @@allend , This is very simular to the one you patched the other day that I had reported on "2021-03-15, 17:54" . Twys .
 
Old 05-07-2021, 10:26 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,627

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
Quote:
stty: 'standard input': Inappropriate ioctl for device
This is a re-occurence of the message in your previous post.
As the error occurs in line 182, it looks like you have lost the patch, causing $ROWS to be unset, which triggers the error.

To preserve the patch across slackpkg upgrades, copy the looknew() function from /usr/libexec/slackpkg/functions.d/post-functions.sh to a file, say /usr/libexec/slackpkg/functions.d/xx_looknew.sh, put the patch in that and make it executable.

Last edited by allend; 05-07-2021 at 10:37 AM.
 
1 members found this post helpful.
Old 06-10-2021, 07:23 PM   #3
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 75

Original Poster
Rep: Reputation: Disabled
@ Allend , Yes is is a duplicate , Which is still unfixed as of slackpkg-15.0.5-noarch-1 . Please see ...

https://www.linuxquestions.org/quest...2/#post6258077
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix throwing error /etc/init.d/postfix: line 73: [: =: unary operator expected Mackhand Linux - General 6 03-14-2015 12:55 PM
[SOLVED] /mnt/sda1/blogrss_chroot.sh: line 2: [: ==: unary operator expected ted_chou12 Programming 2 04-02-2011 12:51 AM
unary operator expected error! Lynda_M Programming 3 11-29-2008 12:04 PM
unary operator expected MONKEYJUDO Linux - Newbie 1 07-13-2008 06:05 AM
Unary Operator expected. Bash script Blackout_08 Programming 2 06-22-2006 02:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration