LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-08-2021, 09:35 AM   #1
villeph
LQ Newbie
 
Registered: Oct 2021
Posts: 11

Rep: Reputation: Disabled
slackpkg and wget2


Hi.

My first post here.

Since wget2 has been added to -current. I decided to try modifying slackpkg to use wget2.

If anyone wants to give it a shot, it's pretty simple:

/usr/libexec/slackpkg/core-functions.sh
around the line 62
Code:
function system_setup() {

        # Create $WORKDIR just in case
        mkdir -p "${WORKDIR}"

        # Select the command to fetch files and packages from network sources
        if [ "$DOWNLOADER" = "curl" ]; then
                DOWNLOADER="curl ${CURLFLAGS} -o"
        else
                DOWNLOADER="wget ${WGETFLAGS} -O"
        fi
just change wget to wget2.

Code:
function system_setup() {

        # Create $WORKDIR just in case
        mkdir -p "${WORKDIR}"

        # Select the command to fetch files and packages from network sources
        if [ "$DOWNLOADER" = "curl" ]; then
                DOWNLOADER="curl ${CURLFLAGS} -o"
        else
                DOWNLOADER="wget2 ${WGETFLAGS} -O"
        fi
You'll also need to edit slackpkg.conf (/etc/slackpkg/) because --passive-ftp isn't a supported argument in wget2 and it will error out.
Code:
WGETFLAGS="--passive-ftp"
Either set it to blank (WGETFLAGS="") or if (for example) you like progress bars from the original wget, set it to WGETFLAGS="--progress=bar".

What do you think? Something to consider for new versions of slackpkg?
 
Old 10-09-2021, 01:34 PM   #2
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,915

Rep: Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558Reputation: 1558
Did you try to download from an ftp mirror?
 
Old 10-09-2021, 02:47 PM   #3
villeph
LQ Newbie
 
Registered: Oct 2021
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
Did you try to download from an ftp mirror?
I'm using HTTP mirrors. I just looked it up and noticed wget2 doesn't support FTP yet. Apparently they're planning to add it, though.
 
Old 10-14-2021, 09:30 PM   #4
biker_rat
Member
 
Registered: Feb 2010
Posts: 372

Rep: Reputation: 220Reputation: 220Reputation: 220
I did this too. If you have a lot of cpu threads and good broadband wget2 is much much faster than wget.
 
  


Reply



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
[SOLVED] wget2 OCSP response too old and stapled OCSP failed walecha Slackware 7 01-05-2022 03:02 AM
LXer: GNU Wget2 Was Released as the Successor of the Original Wget App LXer Syndicated Linux News 0 09-27-2021 07:00 PM
[SOLVED] [ENCHANCEMENT] slackpkg+: do not show the notices "pkglist is older than 24h..." and "remember to re-run 'slackpkg update''..."... yars Slackware 1 01-09-2016 09:56 AM
having trouble after upgrading 14.1 slackware using slackpkg and slackpkg+ [solved] slackartist Slackware 1 12-28-2015 07:28 AM

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

All times are GMT -5. The time now is 09:39 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
Open Source Consulting | Domain Registration