[SOLVED] 1. Expunge new install of all kde; & 2.exclude kde from further updates & upgrades
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
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.
1. Expunge new install of all kde; & 2.exclude kde from further updates & upgrades
Hi folks,
Linux noob here.
My subject line asks my question.
I would greatly appreciate some code to execute these 2 operations.
Thx,
Tex
A quotation that is exercising my imagination today, from Sam Johnson, 18thCentury lexicographer, latinist, conversationalist and great contrarian:
"There are two types of knowledge in the world: that which one finds in books and that concerning where those books can be found"
I thought: how apt this is when applied -mutatis mutandis- to the process of acquiring a rough-n-ready took-kit for linux, and for slackware in particular.
Last edited by textillis; 05-17-2013 at 01:11 AM.
Reason: punctuational neurosis
1) Go to the "slackware64/kde" directory in your Slackware DVD (or other installation media):
Code:
# cd /path/to/SlackDVD/slackware64/kde
# for i in $(cat tagfile); do removepkg ${i%%:*}; done
The tagfile contains a list of all KDE packages that setup installs (all of them, not only the ones with "kde" in their name). The for line invokes removepkg with each package name.
2) Nothing to do. Since KDE is no longer in the system, slackpkg won't upgrade it (when using slackpkg upgrade-all).
But if you upgrade the system to a new Slackware stable or -current, the slackpkg install-new command will put the KDE packages back. In that case you need to blacklist the KDE packages:
Code:
# cd /path/to/SlackDVD/slackware64/kde
# for i in $(cat tagfile); do echo ${i%%:*} >> /etc/slackpkg/blacklist; done
The command above adds all KDE package names to the blacklist file. But this blacklist would work only if there are no new or renamed KDE packages in the new Slackware stable or -current, otherwise some unwanted packages might get installed in the upgrade process. In this case, it would be necessary to manually add the package names to /etc/slackpkg/blacklist.
If you want KDE back, either use
Code:
# slackpkg install-new
to install it from a mirror, or
Code:
# cd /path/to/SlackDVD/slackware64/kde
# installpkg *txz
to install KDE from your Slackware DVD.
Suggestion: Read the manpages for slackpkg, installpkg, removepkg and upgradepkg so you get acquainted with these tools.
Important: Be extra careful whenever you're removing stuff. Make backups of your data. RTFM.
1) Go to the "slackware64/kde" directory in your Slackware DVD (or other installation media):
Code:
# cd /path/to/SlackDVD/slackware64/kde
# for i in $(cat tagfile); do removepkg ${i%%:*}; done
The tagfile contains a list of all KDE packages that setup installs (all of them, not only the ones with "kde" in their name). The for line invokes removepkg with each package name.
2) Nothing to do. Since KDE is no longer in the system, slackpkg won't upgrade it (when using slackpkg upgrade-all).
But if you upgrade the system to a new Slackware stable or -current, the slackpkg install-new command will put the KDE packages back. In that case you need to blacklist the KDE packages:
Code:
# cd /path/to/SlackDVD/slackware64/kde
# for i in $(cat tagfile); do echo ${i%%:*} >> /etc/slackpkg/blacklist; done
The command above adds all KDE package names to the blacklist file. But this blacklist would work only if there are no new or renamed KDE packages in the new Slackware stable or -current, otherwise some unwanted packages might get installed in the upgrade process. In this case, it would be necessary to manually add the package names to /etc/slackpkg/blacklist.
If you want KDE back, either use
Code:
# slackpkg install-new
to install it from a mirror, or
Code:
# cd /path/to/SlackDVD/slackware64/kde
# installpkg *txz
to install KDE from your Slackware DVD.
Suggestion: Read the manpages for slackpkg, installpkg, removepkg and upgradepkg so you get acquainted with these tools.
Important: Be extra careful whenever you're removing stuff. Make backups of your data. RTFM.
Hope that's clear. Ask, if in doubt.
I really appreciate posts like this. Thanks for your time here.
1) Go to the "slackware64/kde" directory in your Slackware DVD (or other installation media):
Code:
# cd /path/to/SlackDVD/slackware64/kde
# for i in $(cat tagfile); do removepkg ${i%%:*}; done
This was an excellent post. I have one question: in the 'for' line above, what does the ${i%%:*} do? I am not familiar with that construction, particularly what the %%:* does to modify ${i}.
I have one question: in the 'for' line above, what does the ${i%%:*} do? I am not familiar with that construction, particularly what the %%:* does to modify ${i}.
The ${string%%substring} is a bash construct that removes the longest match of substring from the back of string.
In the tagfile, the packages have a keyword that indicates if the package is installed automatically or not, or if the user is prompted to install it. For example, from the KDE tagfile:
Code:
amarok:OPT
ark:REC
kdelibs:ADD
The ${i%%:*} removes characters from the back of $i, from ':' to the end of the string, indicated by '*'. So we get the packages names without the ':*' at the end:
Code:
amarok
ark
kdelibs
You can read more about the tagfiles in the SlackBook, and the Advanced Bash Scripting book has details about string manipulation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.