LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Why does slackpkg download glibc and elflibs twice? (https://www.linuxquestions.org/questions/slackware-14/why-does-slackpkg-download-glibc-and-elflibs-twice-4175699376/)

hazel 08-19-2021 06:43 AM

Why does slackpkg download glibc and elflibs twice?
 
I noticed it today when I was upgrading current. The second download occurs during the actual install phase. Obviously it has something to do with these packages being essential for the update itself to work, but I still don't understand why.

allend 08-19-2021 09:15 AM

It is a failsafe in case DOWNLOAD_ALL=off has been set in /etc/slackpkg/slackpkg.conf.
From /usr/sbin/slackpkg
Code:

        upgrade-all)
                sanity_check
                makelist $INPUTLIST
                if ! [ -n "${LIST}" ]; then   
                        echo -e "No packages match the pattern for upgrade. Try:"
                        echo -e "\n\t$0 install|reinstall $2\n"
                        POSTINST=off
                else
                        showlist "$LIST" upgrade
                        if [ "$DOWNLOAD_ALL" = "on" ]; then
                                OLDDEL="$DELALL"
                                DELALL="off"
                                for i in $SHOWLIST; do
                                        getpkg $i true
                                done
                                DELALL="$OLDDEL"
                        fi
                        FOUND=""
                        FOUND=$(echo $SHOWLIST | tr -s ' ' "\n" | grep "slackpkg-[0-9]")
                        if [ "$FOUND" != "" ]; then
                                getpkg $FOUND upgradepkg Upgrading
                                echo -e "slackpkg was upgraded - you will need start the upgrade process again...\n"
                                cleanup
                                exit 0
                        fi
                        for i in pkgtools aaa_glibc-solibs glibc-solibs aaa_libraries aaa_elflibs readline sed; do
                                FOUND=""
                                FOUND=$(echo $SHOWLIST | tr -s ' ' "\n" | grep "${i}-[0-9]")
                                if [ "$FOUND" != "" ]; then
                                        getpkg $FOUND upgradepkg Upgrading
                                fi
                        done
                        upgrade_pkg
                fi

There was a time when DOWNLOAD_ALL=on was not the slackpkg default. That caused problems if people did not update the necessary basics.

hazel 08-19-2021 09:25 AM

Ah, that also explains something else that puzzled me: the repeated message that something won't be downloaded because it's already in the cache. Thanks.

allend 08-19-2021 09:32 AM

Now that we count disk size in gigabytes and terrabytes, the DOWNLOAD_ALL=off option seems archaic. When disk space was more limited it was useful.

Chuck56 08-19-2021 10:15 AM

For a contrary opinion, all my current setups have "DOWNLOAD_ALL=off". My 14.2 setups still have "DOWNLOAD_ALL=on".

I use local mirrors for both current & 14.2 so network access is not an issue.

Trouble a year or more ago with slackpkg on large current rebuild, KDE5 upgrade or Plasma upgrade caused me to change.


All times are GMT -5. The time now is 03:29 AM.