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 03-15-2021, 08:54 PM   #1
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Rep: Reputation: Disabled
slackware-current+slackpkg: even with DEFAULT_ANSWER=y , This happens .


Hello all ,

"2021-03-15 01:20:02 (94.3 MB/s) - '/tmp/slackpkg.gLVCx0/CHECKSUMS.md5.asc' saved [163/163]


No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)? ^[[?25h^[[?0c

Looking for NEW packages to install. Please wait... DONE

No packages match the pattern for install. Try:"

All I want is for the script(s) to continue & download the other files instead (Why do) I get freaking escape codes , What option am I missing to allow (Which used to work flawlessly with out it) this script to funtcion in an automated manner ?

It "might" be nice to have a tad more Documentation on the slackpkg "[options]" as there isn't any descriptions of what the options do in the man pages , Some aren't even there . Please help .

Hold off till tomorrow all , I may have found the config option I'll know more tomorrow . ie: BATCH=

Tia , JimL

Last edited by babydr; 03-15-2021 at 08:59 PM. Reason: Re-Scanned the slackpkg.conf file & noticed batch=
 
Old 03-16-2021, 12:41 AM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware -current 32bit!
Posts: 564

Rep: Reputation: 217Reputation: 217Reputation: 217
Let's get this clear.
When you see this:
Code:
No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)?
...and then you press the Enter key, you see this:
Code:
^[[?25h^[[?0c
is that correct? Because that's pretty weird.
Have you made some changes to the slackpkg config file?
 
Old 03-16-2021, 01:34 AM   #3
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,786

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
It would help to see the command line you are using.

Do a "slackpkg help | grep version" and post the result.
 
Old 03-16-2021, 04:57 PM   #4
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
Hello All , The script (slackpkg) ran well last night with the "BATCH=on" entered into the slackpkg.conf file .
except Now there's new output relating to .new files .

The slackpkg.conf (prior to adding the BATCH=on) & the update script , did not until moving to the new slackpkg produce any warnings or Errors , I have been running them from 9.1 thru to slackware-current's latest slackpkg update .

The command line is used from a crontab , Incased in a bash script . AND slackpkg.conf .

Which I Tried to attach for your info ... The Manage attachments function is not allowing me to browse for the files .

To NOTE: this is for a "Automated daily update & install new" of slackware-current , Please see the files below after Tia .


# New message after adding 'BATCH=on' to config file ...

"Searching for NEW configuration files

Some packages had new configuration files installed (12 new files):

stty: 'standard input': Inappropriate ioctl for device
/etc/ca-certificates.conf.new

Press SPACE for more, ENTER to skip"


Tia , JimL


# Crontab entry ...

#MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# nightly: slackpkg for updates at 1:20 every day .
20 1 * * * /root/bin/do-slackpkg-for-updates.sh 2>&1


# Below which will produce all the non-defaults (I hope) .
# cat slackpkg.conf | egrep -v '^(#|$|[[:space:]]*$)'

TEMP=/var/cache/packages
WORKDIR=/var/lib/slackpkg
WGETFLAGS="--passive-ftp --limit-rate=512k --bind-address=xxx.yyy.zzz.aaa"
DELALL=on
CHECKMD5=on
CHECKGPG=on
CHECKSIZE=off
PRIORITY=( patches %PKGMAIN extra pasture testing )
POSTINST=on
ONLY_NEW_DOTNEW=off
ORIG_BACKUPS=on
ONOFF=on
DOWNLOAD_ALL=on
DIALOG=on
BATCH=on
DEFAULT_ANSWER=y
USE_INCLUDES=on
SPINNING=off
DIALOG_MAXARGS=139000



# cat do-slackpkg-for-updates.sh.txt

# Tell us what version of slackware/slamd64 we are running
#
echo -en "\n`cat /etc/slackware-version`\n\n"
#
# Update the program database .
#
slackpkg update
#
# Install any NEW programs and update all installed ones .
#
slackpkg -batch=on -default_answer=y install-new
slackpkg -batch=on -default_answer=y upgrade-all
#
# Remove all old packages from the cache .
#
#rm -f /var/cache/packages/*.tgz*
rm -rf /var/cache/packages/*
 
Old 03-17-2021, 03:13 AM   #5
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,786

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by babydr View Post
Hello all ,

"2021-03-15 01:20:02 (94.3 MB/s) - '/tmp/slackpkg.gLVCx0/CHECKSUMS.md5.asc' saved [163/163]


No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)? ^[[?25h^[[?0c
You shouldn't be seeing those escape codes. Is this a full install? Did you answer "y"?
The "[163/163]" shouldn't be there either.

Quote:
Looking for NEW packages to install. Please wait... DONE

No packages match the pattern for install. Try:"
This look to be from 'slackpkg install-new'. This action will only look in ChangeLog.txt for "Added." pacakges and install them if not already installed.

Quote:
It "might" be nice to have a tad more Documentation on the slackpkg "[options]" as there isn't any descriptions of what the options do in the man pages , Some aren't even there . Please help .
In addition to man slackpkg, there is man slackpkg.conf and the slackpkg.conf is self is loaded with comments on each option.

Last edited by chrisretusn; 03-17-2021 at 05:36 AM.
 
Old 03-17-2021, 06:14 PM   #6
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
Hello All , And not to just pick on @chrisretusn , But how many of you actually read the Whole documents that have been posted ? Some of you Must as you'd not reach a level of "Senior Member" .

The response of Yesterday @13:57 from me in response to chrisretusn has not to my sight been noticed .
In there is a Wide Eye opening ...

stty: 'standard input': Inappropriate ioctl for device

Which is also not supposed to be seen .

And TO NOTE: that this is from a Cron AUTOMATED script that was functioning BEFORE the slackpkg-15.0-noarch-3 install on "Feb 15" to my system . Feb 15 was Patch Sunday .

The only change I made was to the slackpkg.conf file by adding "BATCH=on" , Which was already part of the shell script (ie: slackpkg -batch=on -default_answer=y upgrade-all) , Which is just boggling my mind .

I still have not run up against the condition that started this thread which is that there are "No changes in ChangeLog.txt between your last update and now." , In order to see if the present config file & scripting will still produce the "... files (y/N)? ^[[?25h^[[?0c" and skipping BOTH the "-default_answer=y" & "DEFAULT_ANSWER=y" .

Sorry for my TARTness . But I'd not expect so much beating around the bush .
AND I Do THANK ALL who have responed .

Tia , JimL
 
Old 03-17-2021, 09:40 PM   #7
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,786

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I have read your post several times. Until you posted the script, I was not sure what your were getting at. You never answered my questions. You finally mentioned the version of slackpkg you are using in the post above.

I don't have a fix for your issues. I don't see what you are seeing. I tried what you are doing, I don't see those things you are seeing. I suspect you are missing something in slackware -current; which is why I asked if this is a full install.

You script does not include 'slackpkg clean-system', unless you are running that separately from the script. Not running this "clean-system" will leave packages that have been removed on your system that have been removed from slackware -current. This could cause issues. To be picky, your script does not need the "rm -rf /var/cache/packages/*", your have "DELALL=on" in slackpkg.conf, so those files should be deleted after the update is compete.

I mentioned that automating the updating of slackware -current is not a good idea because there have been a lot of things changes and comments on the ChangeLog.txt that need to be read before updating. Perhaps you are doing this. Then good. That said I still think automated upgraded to current is not a good idea. Kind of hard to pin point an issue if several updates have gone by. That is my opinion, take it or leave it, it is your system, do as you want.

slackpkg 2.83.0 was upgraded to 15.0 on Mon Feb 8 05:13:26 UTC 2021 here is that ChangeLog.txt entry:
Code:
ap/slackpkg-15.0-noarch-1.txz: Upgraded.
       These are some of the important changes (see the ChangeLog for more):
       Note that this slackpkg release contains a backwards-incompatible change to
       the blacklisting syntax (e.g. glibc ---> glibc-*). This changes the prior
       behavior of the blacklist function; previously, adding "glibc" to the
       blacklist would cause glibc, glibc-profile, glibc-zoneinfo, et al to be
       ignored by slackpkg. The new behavior is that *only* the glibc package is
       ignored. If you want to blacklist all packages whose names begin with glibc,
       you would need to add "glibc.*" to the blacklist now. Also note that any
       special characters, e.g. "+", will need to be escaped in the blacklist file.
       To blacklist entire package sets, a trailing slash is now required: e.g. kde/
       Another backwards-incompatibility warning: check-updates will now return 1 if
       there are updates available - this will make it easier to use this feature
       with cron (thanks to Peter Hyman).
       Added support for Slackware-AArch64 (thanks to Stuart Winter).
       Added aaa_glibc-solibs and aaa_libraries to the "do these first" routine.
       Thanks to Robby Workman for the new slackpkg release!
I am currently running your script on one of my test machines, that is a bit behind in updates, I am logging it to see if any of your issues come up.

Last edited by chrisretusn; 03-17-2021 at 09:43 PM.
 
Old 03-18-2021, 01:43 AM   #8
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 623

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
Quote:
Originally Posted by babydr View Post
stty: 'standard input': Inappropriate ioctl for device
There is now 'stty size' in /usr/libexec/slackpkg/functions.d/post-functions.sh checking the size of the terminal, but your input is not connected to the terminal when running from cron.
 
1 members found this post helpful.
Old 03-18-2021, 05:23 PM   #9
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
@chrisretusn , Thank you , For your insights & comments .

Now to answer the one remaining question ...

YES this was a FULL install WELL BEFORE the change to slackpkg .

I had not noticed the additional command of "clean-system"
I do notice that the manpage says ,
"This action removes all of the packages that don't belong to a standard Slackware installation. With this option, you can clean up your system, removing third-party packages as well as any packages that were removed from the official Slackware package set.
If you have some third party (or custom built) packages that you would like to keep, you can temporarily add them to the list of blacklisted packages before you run the 'clean-system' action."

So OUCH , If one adds "third party" pkgs . Which I do , Regularly .

I had read the Change.log for slackpkg & at the time I read it there were no changes that should have effected the configuration nor the script as presently executing . And at this moment with the config as posted there is none of the cavaets that should create either of my posted Warnings or Errors .

Fyi , I did post all the requested information , Except the FULL install method , Now corrected above , In my note dated "2021-03-16 13:57" , But your response only mentions the partial details from the first message of "2021-03-15 17:54" . Which lead to further confusion on my part as too why the updated information as requested was not being discussed in Your Conversation dated "Yesterday 00:13" (ie: 2021-03-17 00:13) .

Again I apologise for my tirade .

@"Petri Kaukasoina" , My biggest question concerning the 'stty size' , Is why is it being run even if the scripting above it are being run in headless Cron ? The running from cron is relatively easy to determine during execution . Not asking of you why this is so Hoping that the maintainers will !-)

@"Slackpkg Maintainers" , I Hoping that there will be a '-n' option to slackpkg to show what would be done but NOT actually doing it . Just to verify what I doing won't lose some package I am interested in . Because at this moment there isn't such an option . Thank you for this tool and all the work done maintaining it , For it has until recently been without issues through out many versions of Slackware .

Thank you , Both of You for your insights !-)
 
Old 03-18-2021, 09:04 PM   #10
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,786

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by babydr View Post
@chrisretusn , Thank you , For your insights & comments .

Now to answer the one remaining question ...

YES this was a FULL install WELL BEFORE the change to slackpkg .

I had not noticed the additional command of "clean-system"
I do notice that the manpage says ,
"This action removes all of the packages that don't belong to a standard Slackware installation. With this option, you can clean up your system, removing third-party packages as well as any packages that were removed from the official Slackware package set.
If you have some third party (or custom built) packages that you would like to keep, you can temporarily add them to the list of blacklisted packages before you run the 'clean-system' action."

So OUCH , If one adds "third party" pkgs . Which I do , Regularly .
Add those third party packages to /etc/slackpkg/blacklist and leave them there. I does not have to be temporarily. This is my blacklist.
Code:
#### My stuff starts here.
kernel-generic
kernel-huge
kernel-modules
kernel-headers
kernel-source
# My nonslack packages
[0-9]+cgs
[0-9]+aliencompat32
# Alien Bob and multilib packages
[0-9]+alien
[0-9]+compat32
# Other
slackpkg\+
slackpkg
[0-9]+mt
steam-launcher-1.0.0.68-i386-1cgs
# Temporary listed until a proper SlackBuild is created.
dmg2img
I plan to try your script as a cron job later. The test I ran earlier worked out fine, no issues.
 
Old 03-30-2021, 05:36 PM   #11
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
@chrisretusn , Thank You , Sorry for taking so long to respond but I was waiting for an instance from a cron run of the script that CHECKSUMS.md5.asc was NOT changed . That happened this morning AND FYI: that run that I was waiting for ran WITHOUT the mentioned errors or garbage as shown below .

I am in the process of trying to see how I can enable the 'blacklist' to be used with hand compiled installed tools . Which is of more concern (mostly) than with any 3rd party pkg's . Your provided blacklist was greatly appreciated .

In doing a on command line execute of my script & it completed fully and correctly . None of the output from below was issued into that runs log file . And the CHECKSUMS.md5.asc was NOT changed .

So I setup a run thru crontab . The CHECKSUMS.md5.asc was STILL NOT changed and it went thru per the 'Y' response in BOTH slackpkg.conf & command line option in the script , ie: -default_answer=y(script) & DEFAULT_ANSWER=Y(.conf) .

And this produces , With cavaets noted below ...

Code:
2021-03-30 13:20:02 (80.4 MB/s) - '/tmp/slackpkg.AMvIFV/CHECKSUMS.md5.asc' saved [163/163]


                No changes in ChangeLog.txt between your last update and now.
                Do you really want to download all other files (y/N)? y
And wouldn't you know it , There was an update in progress and the below was captured by the Cron run ...


Code:
http://mirrors.slackware.com/slackwa...6_64-1.txz.asc...
URL transformed to HTTPS due to an HSTS policy
--2021-03-30 13:21:00--
https://mirrors.slackware.com/slackw...6_64-1.txz.asc
Resolving mirrors.slackware.com (mirrors.slackware.com)... 207.223.116.213
Connecting to mirrors.slackware.com (mirrors.slackware.com)|207.223.116.213|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-03-30 13:21:00 ERROR 404: Not Found.

        ERROR - Package not installed! md5sum error!
... And Just after that ...

Code:
Searching for NEW configuration files...
stty: 'standard input': Inappropriate ioctl for device
Some packages had new configuration files installed (22 new files):

/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 36: unary operator expected
/etc/ca-certificates.conf.new
^[[1A^[[K^[[1A^[[K
What do you want (K/O/R/P)?
There are still the non-supposed to be output errors/warnings ...


The ...

"stty: 'standard input': Inappropriate ioctl for device"

Which "Petri Kaukasoina" mentioned) is still being ejected .


And a NEW one (because of the actual lack of updates ie: (packages) , Which seems to be relating to the check for *.new files ...

/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 36: unary operator expected

. . . ie: ...

Code:
   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...'
And the escape sequences we are NOT supposed to be seeing when the "BATCH=on" or "-batch=on" are configured , I think may still be associated with the check of .new files . I am unable to ascertain if this suppostion is a fact .

"^[[1A^[[K^[[1A^[[K"

Tia , JimL

Last edited by babydr; 03-30-2021 at 05:40 PM. Reason: Didn't mention that the run I was waiting for ran WITHOUT the mentioned errors of garbage . chg a word
 
Old 03-30-2021, 09:16 PM   #12
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,586

Rep: Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165Reputation: 2165
As @Petri Kaukasoina has pointed out, the errors are caused by the lack of a tty when running from a cron job. Based on the last answer here, I propose this patch to post-functions.sh
Code:
--- post-functions.sh.orig      2021-03-31 13:04:57.775808845 +1100
+++ post-functions.sh   2021-03-31 13:08:48.626805418 +1100
@@ -154,7 +154,11 @@
 
        if [ -n "$FILES" ]; then
                newcount=$( echo "$FILES" | wc -l )
-               SIZE=$( stty size )
+                if [ "$(tty)" != "not a tty" ]; then
+                  SIZE=$( stty size )
+                else
+                  SIZE="40 80"
+                fi
                ROWS=${SIZE% *}
 
                # Set here so we can count the No. of lines
 
1 members found this post helpful.
Old 04-01-2021, 06:27 PM   #13
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
@allend , Thank You . I have processed your patch & will report back (hopefully) tomorrow with the result . tnx , JimL
 
Old 04-03-2021, 05:43 PM   #14
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2+
Posts: 47

Original Poster
Rep: Reputation: Disabled
@allend , Thank You , That did in fact remove the "/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 36: unary operator expected" And "stty: 'standard input': Inappropriate ioctl for device" and "^[[1A^[[K^[[1A^[[K" .

@ALL

I would still like to understand why the (From my original message) ...

Code:
"No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)? ^[[?25h^[[?0c"
was occuring while the script (show below) was confgiured with ,

Code:
slackpkg -batch=on -default_answer=y upgrade-all
BUT did not return after putting BATCH=ON into the .conf file .

Thank you all for your comments & Suggestions .
JimL
 
Old 04-03-2021, 09:17 PM   #15
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 1,786

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by babydr View Post
@allend , Thank You , That did in fact remove the "/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 36: unary operator expected" And "stty: 'standard input': Inappropriate ioctl for device" and "^[[1A^[[K^[[1A^[[K" .

@ALL

I would still like to understand why the (From my original message) ...

Code:
"No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)? ^[[?25h^[[?0c"
was occuring while the script (show below) was confgiured with ,

Code:
slackpkg -batch=on -default_answer=y upgrade-all
BUT did not return after putting BATCH=ON into the .conf file .

Thank you all for your comments & Suggestions .
JimL
Your script:
Quote:
Originally Posted by babydr View Post
# cat do-slackpkg-for-updates.sh.txt

# Tell us what version of slackware/slamd64 we are running
#
echo -en "\n`cat /etc/slackware-version`\n\n"
#
# Update the program database .
#
slackpkg update
#
# Install any NEW programs and update all installed ones .
#
slackpkg -batch=on -default_answer=y install-new
slackpkg -batch=on -default_answer=y upgrade-all
#
# Remove all old packages from the cache .
#
#rm -f /var/cache/packages/*.tgz*
rm -rf /var/cache/packages/*[/code]
Simple: 'slackpkg update' should have been 'slackpkg batch=on -default_answer=y update'

Setting BATCH=on in slackpkg.conf removed the need for that.
 
  


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
No updates shown in -current with slackpkg/slackpkg+ rpedrica Slackware 12 03-04-2021 12:20 PM
[SOLVED] slackpkg is not able to update due to a certificate error. Post install, slackpkg running for 1st time (Slackware 14.2). fighter_fish Slackware - Installation 2 02-07-2021 09:27 PM
having trouble after upgrading 14.1 slackware using slackpkg and slackpkg+ [solved] slackartist Slackware 1 12-28-2015 07:28 AM
[SOLVED] Slackpkg, Slackpkg Plus, Slackware 14.1 x86_64 install.log delay or slow to write bamunds Slackware 7 04-22-2014 11:12 AM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/dialog-functions.sh michelino Slackware 4 03-20-2007 12:22 PM

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

All times are GMT -5. The time now is 09:24 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