[SOLVED] slackpkg on current - how to prevent confirmation dialog?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
--- 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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.