Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

HOWTO Prevent KDE4 packages from installing, without masking

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
23 posts • Page 1 of 1
Author
Message
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

HOWTO Prevent KDE4 packages from installing, without masking

  • Quote

Post by Etal » Mon Oct 13, 2008 3:24 am

What is this about?

If you have KDE 3 installed and you're running ~arch, you have probably been confronted with KDE4 trying to get installed. Perhaps this has been something you've been waiting for for months, and you're happy to install it. However, many people don't want to run KDE4 just yet - maybe you find KDE 3.5 good enough and don't want to bother spending the time compiling 4.1 when you know you won't be using it and want to wait until 4.2 or for 4.3 ... Or maybe like me, you just want to install only certain parts of KDE but not every 4.1 variant of the KDE 3.5 application that you installed.

Your first idea would be to mask all the KDE4 packages. You could either acquire the whole list of packages from somewhere and put them into package.mask, or you could put packages one-by-one until no updates show up, which could be tedious especially if you were picky as to what KDE 3.5 apps get installed. However, masking has disadvantages. If you suddenly have an urge to install a certain app that's in your masked list, you have to unmask it and all on its dependencies.

You may ask yourself why KDE4 is getting pulled in in the first place. The reason is that in your world file, you have that package name, so as soon is as it sees that there's a new version of that package, ignoring that it will be in a different slot.

In this guide, we will use sets, a new Portage 2.2 feature, to prevent KDE4 from wanting to be installed. Unlike masking, nothing will prevent you from installing anything; rather, nothing will pull KDE4 in. As an added added bonus, it will make it easier for you to uninstall KDE 3.5 when that inevitable day eventually comes.

Step 1: Move things out of your world file

Let's begin. The first step is to move all the stuff from the world that is related to KDE to a separate file. It is located at /var/lib/portage/world If you don't trust yourself (or me), you may want to back it up.

Code: Select all

cp /var/lib/portage/world /root/world
Now, create a new, temporary file file somewhere: We'll refer to it as /tmp/kde-3.5. Now, cut and paste anything starting with "kde-base/" into it. Next, scan through the rest of the world file and move anything else that's KDE3-related (including anything in kde-misc) into a different file, /tmp/kde-extras.

Step 2: Create a set

Now that we have the list of packages, we can create a set. Make sure you have a directory called /etc/portage/sets/:

Code: Select all

mkdir -p /etc/portage/sets/
before putting it in a set we need to indicate that all these packages should be from KDE 3.5. The best way to do this is by specifying the slot they're in since all KDE3 packages are in the "3.5" slot. So all you have to do now is to append ":3.5" after the package name. Let's use bash to help us with this:

Code: Select all

cat /tmp/kde-3.5 | while read line; do
     echo "$line:3.5" >> /etc/portage/sets/kde-3.5;
done
You can just paste the above into the terminal, or type it in in one line, if you want. Now do the same thing for the kde-optional file we created, except that those files have slot "0" instead of "3.5". All the new KDE4 programs introduced are in the slot "4.1".

Code: Select all

cat /tmp/kde-extras | while read line; do
     echo "$line:0" >> /etc/portage/sets/kde-3.5;
done
Step 3: Make sure your set works

Let's try it out:

Code: Select all

emerge -pv @kde-3.5
If you get no errors, you may skip to the next step.

If you do, it's probably a slot issue. Either change the package's slot to the correct one (if you know it) or remove the slot requirement altogether for that package.

Step 4: Finish up

Now all that is left to do is to emerge the set. Since we do not want to reemerge KDE, simply run:

Code: Select all

emerge --noreplace @kde-3.5
Now, let's try it out:

Code: Select all

emerge -ptuvD world
You should now only get updates to packages unrelated to KDE. If you do, then you're done! You may now delete /tmp/kde-4.1 and /var/kde-extras.

If for some reason there's something pulling KDE4 in, you probably missed it. Remove it from world and put it into your set with the appropriate slot dependency, and try again.

Now what?

Now, you can do anything you want without KDE4 getting in. If you decide you want to try KDE4, just emerge it as you would normally. If you just want to take a peek at it, you can emerge kdebase-meta, and that's all you'll get installed! No need to mess with mask files. And once it's time for the old kde to go, you can just unmerge the set and let depclean handle everything else.


If you have any questions, problems or suggestions, please post!

Errata

I confused my /tmp with /var. Wherever I wrote /var/kde-3.5, I meant /tmp/kde-3.5. Sorry about the confusion.
I also forgot to mention that you can delete those files once you're done. (Oct 13, 2008)
Last edited by Etal on Mon Oct 13, 2008 6:24 pm, edited 3 times in total.
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Top
d2_racing
Bodhisattva
Bodhisattva
User avatar
Posts: 13047
Joined: Mon Apr 25, 2005 2:25 pm
Location: Ste-Foy,Canada
Contact:
Contact d2_racing
Website

  • Quote

Post by d2_racing » Mon Oct 13, 2008 3:35 am

I will test that in a near future :P

Thanks for this info.
Top
rjw8703
Apprentice
Apprentice
Posts: 246
Joined: Sat Aug 14, 2004 5:27 pm
Location: Auburn, Al

  • Quote

Post by rjw8703 » Mon Oct 13, 2008 5:17 am

I have no directory called /var/kde-3.5

What should I do?
Top
Geralt
Apprentice
Apprentice
Posts: 150
Joined: Sat Jun 14, 2008 10:33 pm

  • Quote

Post by Geralt » Mon Oct 13, 2008 5:51 am

rjw8703 wrote:I have no directory called /var/kde-3.5

What should I do?
What do you mean by this? There should be no /var/kde-3.5 directory, unless you create it of course.
Top
ToeiRei
Veteran
Veteran
User avatar
Posts: 1191
Joined: Mon Jan 03, 2005 10:50 am
Location: Austria
Contact:
Contact ToeiRei
Website

  • Quote

Post by ToeiRei » Mon Oct 13, 2008 6:57 am

Code: Select all

cat /var/kde-3.5 | while read line; do 
      echo "$line:3.5" >> /etc/portage/sets/kde-3.5; 
 done
gives

Code: Select all

cat: /var/kde-3.5: No such file or directory
Please stand by - The mailer daemon is busy burning your messages in hell...
Top
Geralt
Apprentice
Apprentice
Posts: 150
Joined: Sat Jun 14, 2008 10:33 pm

  • Quote

Post by Geralt » Mon Oct 13, 2008 7:04 am

ToeiRei wrote:

Code: Select all

cat /var/kde-3.5 | while read line; do 
      echo "$line:3.5" >> /etc/portage/sets/kde-3.5; 
 done
gives

Code: Select all

cat: /var/kde-3.5: No such file or directory
This seems to be a typo, it should be /tmp/kde-3.5 or wherever you stored kde-3.5 (I don't think /tmp is a good idea).
Top
michel7
Guru
Guru
Posts: 461
Joined: Thu May 04, 2006 8:01 pm
Location: localhost

  • Quote

Post by michel7 » Mon Oct 13, 2008 10:56 am

well, i expect some troubles with updating kde if kde3-5 updates will be released in the near feature
Software is like sex. It's better when it's free
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Mon Oct 13, 2008 1:40 pm

I tried it and it left severeal (6 or7) packages that needed to be masked. It's not a catchall.
http://forums.gentoo.org/viewtopic-t-708282.html wrote:KDE 4.1 in Portage - FAQ

Q: Why there are no sets for KDE 4.1?

A: KDE-4.1.2 so far is NOT making use of sets but sets are expected to arrive in near future - the reason is - the naming convention for sets is not yet established.
Top
rjw8703
Apprentice
Apprentice
Posts: 246
Joined: Sat Aug 14, 2004 5:27 pm
Location: Auburn, Al

  • Quote

Post by rjw8703 » Mon Oct 13, 2008 2:14 pm

I've found that putting these packages in package.mask works better:

>=kde-base/kdelibs-4.0.0
>=kde-base/kdesu-4.0.0
>=kde-base/kdebase-meta-4.0.0
>=kde-base/kde-meta-4.0.0

These 4 packages stopped all kde-4 from being installed. This isn't much.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Mon Oct 13, 2008 5:53 pm

On my box I only need this line in package.mask to prevent the installation of all of KDE-4

Code: Select all

>media-sound/amarok-1.4.10-r1
And this line in /var/lib/portage/world

Code: Select all

kde-base/kde-meta:3.5
8)
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

  • Quote

Post by Etal » Mon Oct 13, 2008 6:27 pm

Geralt wrote:
ToeiRei wrote:

Code: Select all

cat /var/kde-3.5 | while read line; do 
      echo "$line:3.5" >> /etc/portage/sets/kde-3.5; 
 done
gives

Code: Select all

cat: /var/kde-3.5: No such file or directory
This seems to be a typo, it should be /tmp/kde-3.5 or wherever you stored kde-3.5 (I don't think /tmp is a good idea).
You're correct, I confused the /tmp with /var. Sorry about that. :oops:
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

  • Quote

Post by Etal » Mon Oct 13, 2008 6:40 pm

michel7 wrote:well, i expect some troubles with updating kde if kde3-5 updates will be released in the near feature
From what I know, there will never be a KDE 3.6, so since we did this by the "3.5" slot, there will be no problems with updates.
notHerbert wrote:I tried it and it left severeal (6 or7) packages that needed to be masked. It's not a catchall.
Could you share which packages gave problems?
rjw8703 wrote:These 4 packages stopped all kde-4 from being installed. This isn't much.
Maybe for you it's 4 packages, but for me it's 37 :wink:
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Mon Oct 13, 2008 9:37 pm

AM088 wrote:
notHerbert wrote:I tried it and it left severeal (6 or7) packages that needed to be masked. It's not a catchall.
Could you share which packages gave problems?
Certainly

Code: Select all

# grep kde /var/lib/portage/world
# grep kde /var/lib/portage/world_sets 
@kde-3.5
# grep kde /etc/portage/sets/kde-3.5 
kde-base/kde-meta:3.5
# grep kde /etc/portage/package.mask
# emerge -uDNpv @system @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-cpp/clucene-0.9.20  USE="-debug -doc -threads" 1,513 kB
[ebuild  N    ] kde-base/automoc-0.9.84  8 kB
[ebuild  N    ] kde-base/qimageblitz-0.0.4  USE="3dnow mmx (-altivec) -debug -sse -sse2" 55 kB
[ebuild  N    ] media-sound/phonon-4.2.0  USE="gstreamer -debug" 392 kB
[ebuild  N    ] dev-util/boost-build-1.35.0-r1  USE="python -examples" 22,868 kB
[ebuild  N    ] dev-libs/boost-1.35.0-r2  USE="-debug -doc -expat -icu -mpi -tools" 5 kB
[ebuild  N    ] app-misc/strigi-0.5.11  USE="clucene dbus fam qt4 -debug -exif -hyperestraier -inotify -log -test" 857 kB
[ebuild  N    ] media-libs/raptor-1.4.18  USE="curl unicode xml" 1,619 kB
[ebuild  N    ] app-office/akonadi-server-1.0.0  USE="-mysql" 120 kB
[ebuild  N    ] dev-libs/soprano-2.1  USE="clucene sesame2 -debug -doc -redland" 1,789 kB
[ebuild  NS   ] kde-base/kdelibs-4.1.2-r1 [3.5.10-r2] USE="3dnow acl alsa bzip2 fam kerberos mmx nls opengl semantic-desktop spell ssl (-altivec) -bindist -debug -doc -htmlhandbook -jpeg2k -kdeprefix -openexr -sse -sse2 -test -zeroconf" 8,899 kB
[ebuild  N    ] kde-base/kdepimlibs-4.1.2  USE="ldap sasl -debug -htmlhandbook -kdeprefix -test" 1,844 kB
[ebuild  N    ] kde-base/libtaskmanager-4.1.2  USE="xcomposite -debug -kdeprefix" 46,387 kB
[ebuild  N    ] kde-base/libkworkspace-4.1.2  USE="-debug -kdeprefix" 0 kB
[ebuild  N    ] kde-base/libplasma-4.1.2  USE="opengl -debug -kdeprefix -test -xinerama" 0 kB
[ebuild  NS   ] media-sound/amarok-1.90-r1 [1.4.10-r1] USE="opengl -cdaudio -daap -debug -ifp -ipod -kdeprefix -mp3tunes -mp4 -mtp -mysql -njb -visualization" 3,306 kB

Total: 16 packages (14 new, 2 in new slots), Size of downloads: 89,657 kB
Of course I could mask all the rest, but the other way is easier

Code: Select all

# grep kde /var/lib/portage/world
kde-base/kde-meta:3.5
# grep amarok /etc/portage/package.mask
>media-sound/amarok-1.4.10-r1
# emerge -uDNpv @system @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 kB
:P
Top
Edweirdo
Guru
Guru
User avatar
Posts: 353
Joined: Tue Jan 28, 2003 5:27 pm
Location: Boston, Mass, USA

  • Quote

Post by Edweirdo » Tue Oct 14, 2008 4:44 pm

I installed kde4 and like it but it has some problems with my multiple monitors. I want to be able to start kde3 now with kde4 still installed. I can't find the information on how to do that. kdm has a kde-4 but not kde-3 selection to log in from.

I'd like to be able to choose between the two.

Any help would be appreciated.
Life is too short and too important to { take seriously | use Windows }.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Tue Oct 14, 2008 8:16 pm

This should work (unless KDE-4 completely changed how kdm works)

Code: Select all

# cat /usr/share/xsessions/kde-3.5.desktop 
[Desktop Entry]
Encoding=UTF-8
Type=XSession
Exec=/usr/kde/3.5/bin/startkde
TryExec=/usr/kde/3.5/bin/startkde
Name=KDE 3.5
Top
Edweirdo
Guru
Guru
User avatar
Posts: 353
Joined: Tue Jan 28, 2003 5:27 pm
Location: Boston, Mass, USA

  • Quote

Post by Edweirdo » Tue Oct 14, 2008 10:04 pm

notHerbert

That sounds reasonable, except startkde is gone becuase there was a conflict between 3.5 and 4.1 so it uninstalled startkde. That could cause me issues trying to switch between the two.
Life is too short and too important to { take seriously | use Windows }.
Top
Edweirdo
Guru
Guru
User avatar
Posts: 353
Joined: Tue Jan 28, 2003 5:27 pm
Location: Boston, Mass, USA

  • Quote

Post by Edweirdo » Tue Oct 14, 2008 10:11 pm

I resynced today and it now allows me to have both kdestart-3.5 and kdestart-4.1. Once I emerged kdestart-3.5 the kde-3.5 showed up in the session list.

Thanks for the help.
Life is too short and too important to { take seriously | use Windows }.
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Wed Oct 15, 2008 12:00 am

No problem :P
Top
Randy Andy
Veteran
Veteran
User avatar
Posts: 1152
Joined: Tue Jun 19, 2007 7:39 pm
Location: /dev/koelsch

AM088's Procedure does not work for me...

  • Quote

Post by Randy Andy » Thu Oct 16, 2008 6:36 pm

Hi AM088,

i've tried out your procedure until i came to the step:

Code: Select all

emerge -ptuvD world
Now emerge tells me one blocked package cause circular dependeny. It was kde-base/kdebase-startkde-3.5.10-r2 and r3, pulled by differnt packages i coudn't name now exactly, cause i went on, trying to solve this, maybe not in a clever way.
As far as i remember, i cleared the kdebase-startkde and reinstalled it without saying explizit the version. So portage installed version 4.1.2-r1 with all the other new depending packages.
Next time i do the pretend option at first - ok.

So ich changed my strategy and masked the packages too, as some others did.
But i had to mask the following packages to get success.

Code: Select all

>=kde-base/kdelibs-4.0.0
>=kde-base/kdesu-4.0.0
>=kde-base/kdebase-meta-4.0.0
>=kde-base/kde-meta-4.0.0
>=media-sound/amarok-1.90
>=kde-base/kopete-4.0.0
So it seems not to work under all conditions for me. One important hint for some others, when doing:

Code: Select all

cat /tmp/kde-3.5 | while read line; do echo "$line:3.5" >> /etc/portage/sets/kde-3.5; done 
you have to delete the maybe doubled :3.5 lines, cause some packages just contain this information. E.g. in my case the kde-base/kdemultimedia-arts:3.5 into the world file.

P.S. I tried the KDE 4.1.2 Desktop for three days, but went back today, cause to much pain and confusion and malfunctions.
Give it a try when its as stable and intuitive as the testing KDE-3.5 Version - my opinion, Andy.
If you want to see a Distro done right, compile it yourself!
Top
Smart1
n00b
n00b
Posts: 66
Joined: Wed May 16, 2007 11:31 am

  • Quote

Post by Smart1 » Fri Nov 14, 2008 7:25 pm

I have make all of this but

emerge -a kdelibs

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild NS ] kde-base/kdelibs-4.1.3-r1 [3.5.10-r2] USE="3dnow acl alsa bzip2 fam jpeg2k kerberos mmx nls opengl semantic-desktop spell sse sse2 ssl (-altivec) -bindist -debug -doc -htmlhandbook -kdeprefix -openexr -test -zeroconf"

Would you like to merge these packages? [Yes/No] n

emerge -ptuvD world

These are the packages that would be merged, in reverse order:

Calculating dependencies \--- WARNING: Package 'dev-java/gnu-crypto-2.1.0' uses '-*' keyword.
--- WARNING: Package 'dev-java/gnu-crypto-2.1.0' uses '-*' keyword.
--- WARNING: Package 'dev-java/gnu-crypto-2.1.0' uses '-*' keyword.
... done!

!!! Ebuilds for the following packages are either all
!!! masked or don't exist:
kde-base/kde-meta:3.5:3.5

!!! All ebuilds that could satisfy ">=kde-base/kdesu-4.1.3:4.1" have been masked.
!!! One of the following masked packages is required to complete your request:
- kde-base/kdesu-4.1.3 (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.
(dependency required by "kde-base/kdebase-kioslaves-4.1.3" [ebuild])
(dependency required by "@world" [argument])

I wish to remove KDE 4 and only use KDE 3.5

notHerbert wrote at

http://forums.gentoo.org/viewtopic-t-71 ... f7120f24cc

There is a thread here about preventing KDE4 from being installed.

To remove kde4 this should work fine
Code:
emerge -Ca $(qlist -IC | grep "kde.*4.1" | sed 's/^/=/' | tr '\n' ' ')
emerge --depclean -av
revdep-rebuild -- --ask


emerge -Ca $(qlist -IC | grep "kde.*4.1" | sed 's/^/=/' | tr '\n' ' ')

emerge unmerge can only be used with specific package names
http://www.gentoo.org/ http://www.sysresccd.org/ http://www.linuxquestions.org/

Registered Linux user: #130654 http://counter.li.org
Top
notHerbert
Advocate
Advocate
User avatar
Posts: 2228
Joined: Tue Mar 11, 2008 11:55 pm
Location: 45N 73W

  • Quote

Post by notHerbert » Mon Nov 17, 2008 4:41 pm

There was a follow up post where I corrected the command to remove KDE4

I had forgotten to add the v option in qlist -IC so the correct command is

Code: Select all

emerge -Ca $(qlist -ICv | grep "kde.*4.1" | sed 's/^/=/' | tr '\n' ' ')
:P 8)
Top
Martux
Veteran
Veteran
User avatar
Posts: 1917
Joined: Fri Feb 04, 2005 9:09 pm

  • Quote

Post by Martux » Fri Aug 07, 2009 5:49 pm

Just stumbled upon this due to kde-4.3 masking madness.
Thanks to the OP!
"Coincidence is God's way of remaining anonymous."
Albert Einstein
"The road to success is always under construction"
Top
freifunk_connewitz
Apprentice
Apprentice
Posts: 243
Joined: Wed Feb 08, 2006 6:54 pm
Contact:
Contact freifunk_connewitz
Website

  • Quote

Post by freifunk_connewitz » Mon Oct 26, 2009 6:50 pm

since the portage maintainers have removed the functionality of user defined sets from portage, the HOWTO doesn't work with the current emerge command. but for me it worked by extracting the kde-lines from the world file like OP wrote, then appending to all of them the suggested :3.5 or :0 slot definitions and then pasting them back to the world file.
by doing so, I was able to update world without kde-3.5.10 being "updated" to kde4.

(surely - this is nothing to live with very long if upstream really has stopped maintaining kde-3.5. but I've read somewhere (wikipedia I think) that it will be updated for a further while because quite a few administration and public service offices rely on it).
Top
Post Reply

23 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy