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.
I prefer to keep an updated /var/cache/packages in case some package has to be reinstalled and the internet is not available. This script helps in removing old packages in -current since slackpkg does not remove them automagically.
I would like some suggestions regarding this script
This script helps in removing old packages in -current since slackpkg does not remove them automagically.
Not to dismiss what your script does, but have you tried the DELALL option in your /etc/slackpkg/slackpkg.conf? I don't have any files remaining in /var/cache/packages/ (I do have folders, just no files in them).
Code:
# If DELALL is "on", all downloaded files will be removed after install.
DELALL=on
I also like having a local copy of the set of packages and files comprising Slackware 14.2, primarily so I can download them once and then use the local copy to update the several computers which I maintain. I intend to minimize the network traffic I cause to the mirrors.
I have a script for the downloading, but the script has only one important command:
Code:
#! /bin/bash
# filename: update_slackware.sh
echo ""
echo "-- Get the: 64 bit version of Slackware 14.2. --"
# This command gets all but: kdei, and testing.
rsync -ahv --stats --progress --partial --fuzzy --delete-after \
--exclude='kdei' --exclude='testing' \
mirror.slackbuilds.org::slackware/slackware64-14.2/ \
/home/software/slackware64-14.2
The above rsync command deletes of all the files which do not exist on the mirror, after downloading the new files.
Not to dismiss what your script does, but have you tried the DELALL option in your /etc/slackpkg/slackpkg.conf? I don't have any files remaining in /var/cache/packages/ (I do have folders, just no files in them).
Code:
# If DELALL is "on", all downloaded files will be removed after install.
DELALL=on
I want to keep the latest packages while removing the old packages.
The DELALL removes the downloaded files which I don't want to do.
I also like having a local copy of the set of packages and files comprising Slackware 14.2, primarily so I can download them once and then use the local copy to update the several computers which I maintain. I intend to minimize the network traffic I cause to the mirrors.
The above rsync command deletes of all the files which do not exist on the mirror, after downloading the new files.
My script is for -current only.
=================================================
Any stable version of Slackware has its own frozen package set.
All updates are downloaded into /var/cache/packages/patches/
I want to keep the latest packages while removing the old packages.
The DELALL removes the downloaded files which I don't want to do.
Ah, that makes more sense. I just keep a local mirror, which I point slackpkg to, but I guess that requires slackpkg to "download" (in reality, copy) the packages to its directory and then remove them afterwards.
I include "--preallocate" in the rsync command. Filesystems that support defragmentation operations automatically allocate minimally-fragmented file space in the destination.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.