LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-06-2018, 05:46 PM   #1
moesasji
Member
 
Registered: May 2008
Distribution: Slackware 14.1, MLED
Posts: 285

Rep: Reputation: 95
slackpkg on current - how to prevent confirmation dialog?


I'm trying to automate getting slackware current up and running using ansible.

In doing so I am hitting that slackpkg requires me to confirm that I indeed want to use a current mirror on slackware current. The problem here is that current != 14.2+ according to slackpkg, yet /etc/slackware-version reports 14.2+ for current.

Code:
ok: [192.168.1.18] => {
    "out.stdout_lines": [
        "", 
        "You have selected a mirror for Slackware -current in /etc/slackpkg/mirrors,", 
        "but Slackware version 14.2+ appears to be installed.", 
        "", 
        "Slackware -current is the development (i.e. unstable) tree.", 
        "", 
        "Is this really what you want?", 
        "", 
        "To confirm your choice, press Y, else press N. Then, press Enter: "
    ]
}
Any thoughts how I can get around that prompt as the following doesn't do the trick?

Code:
slackpkg -batch=on -default_answer=y update gpg
 
Old 08-07-2018, 11:26 AM   #2
phenixia2003
Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 831

Rep: Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701Reputation: 701
Hello,

This patch should do the trick :

Code:
--- core-functions.sh.orig	2018-08-07 17:20:01.144303289 +0200
+++ core-functions.sh	2018-08-07 17:22:24.578309689 +0200
@@ -273,8 +273,10 @@
 Is this really what you want?
 
 To confirm your choice, press Y, else press N. Then, press Enter: "
-		read current
-		if [ "$current" = "Y" ] || [ "$current" = "y" ]; then
+		#read current
+		#if [ "$current" = "Y" ] || [ "$current" = "y" ]; then
+	        answer
+    	        if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" ]; then
 			touch ${ROOT}/${WORKDIR}/current
 			echo -n  "
 Slackpkg will not show this warning again unless you remove the
When applied, you should get this :
Code:
$ slackpkg -batch=on -default_anwser=n update gpg

You have selected a mirror for Slackware -current in /etc/slackpkg/mirrors,
but Slackware version 14.2+ appears to be installed.

Slackware -current is the development (i.e. unstable) tree.

Is this really what you want?

To confirm your choice, press Y, else press N. Then, press Enter: n

$ slackpkg -batch=on -default_anwser=y update gpg

You have selected a mirror for Slackware -current in /etc/slackpkg/mirrors,
but Slackware version 14.2+ appears to be installed.

Slackware -current is the development (i.e. unstable) tree.

Is this really what you want?

To confirm your choice, press Y, else press N. Then, press Enter: y

Slackpkg will not show this warning again unless you remove the
/var/lib/slackpkg/current file. 

			Downloading https://mirrors.slackware.com/slackware/slackware64-current/GPG-KEY...
			Slackware Linux Project's GPG key added
--
SeB
 
Old 08-07-2018, 12:24 PM   #3
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,471

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Quote:
Originally Posted by moesasji View Post
In doing so I am hitting that slackpkg requires me to confirm that I indeed want to use a current mirror on slackware current.
[...]
Any thoughts how I can get around that prompt
you can also run these commands manually and it won't ask the question at all
Code:
mkdir -p ${ROOT}/var/lib/slackpkg
touch ${ROOT}/var/lib/slackpkg/current
because the whole subroutine that does that check must satisfy this condition first
Code:
if [ "$MIRROR_VERSION" = "current" ] && [ ! -f ${ROOT}/${WORKDIR}/current ]; then

Last edited by ponce; 08-07-2018 at 12:34 PM.
 
1 members found this post helpful.
Old 08-08-2018, 01:41 AM   #4
moesasji
Member
 
Registered: May 2008
Distribution: Slackware 14.1, MLED
Posts: 285

Original Poster
Rep: Reputation: 95
Thanks for that line of thinking Ponce, as creating the /var/lib/slackpkg/current file does the job. The directory already exists in a clean install, so that step is not needed.
 
  


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
KDE 4.2 Shutdown without confirmation dialog netimen Linux - Newbie 6 05-24-2009 05:26 PM
Disable execute confirmation dialog? Ken_C Linux - Newbie 5 04-16-2009 07:44 PM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/dialog-functions.sh michelino Slackware 4 03-20-2007 01:22 PM
Problems with installation on disc1 (confirmation dialog) NEED HELP!!! SRneXus Fedora 5 02-23-2007 04:51 AM
shutdown - confirmation dialog needed in fluxbox linuxfond Linux - Newbie 0 07-09-2004 08:38 AM

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

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration