On Thu, 2003-12-11 at 19:34, Brett I. Holcomb wrote: > Something is royally messed up. > > I've created the /etc/portage/package.unmask . I put media-sound/alsa-driver > and all the other alsa stuff a media-sound/alsa-driver or whatever the > package is in the file. The format was media-sound/alsa-driver or > media-libs/alsa-lib. I did this for driver, lib, tools, utils. Supposedly > this should unmask the correct?
This should probably be in an FAQ somewhere. Running masked/testing packages on a system with ACCEPT_KEYWORDS=arch First some background: There are essentially three levels of packages in portage a. Masked b. testing c. stable Masked packages are packages that are typically either broken or unmaintained. The developers add the package names to the file /usr/portage/profiles/package.mask. Packages marked for testing are marked in the ebuild using the variable KEYWORDS This variable will have the value <~arch> where arch is the specific architecture in question. Most people run on a x86 architecture, so the variable in that case will be ~x86 Stable packages are also designated using the KEYWORDS variable in the ebuild. For a stable package the variable will have the value <arch> For most people running a x86 system, it would be just x86. Finally, for masked packages, the KEYWORDS variable can be set to either stable or testing. Typically, the broken packages or marked as testing, while the unmaintained packages where marked stable. Stable vs Testing: The ACCEPT_KEYWORDS variable in the file /etc/make.conf can be set to determine if portage will install stable or testing packages when installing packages. If ACCEPT_KEYWORDS is set to ~arch, then portage will consider all ebuilds that have KEYWORDS set to either <arch> or <~arch> and will not look at any packages that are masked. If ACCEPT_KEYWORDS is set to arch, then portage will only consider unmasked packages that have KEYWORDS set to arch. The problem most people have arises when they want to only run a couple of non-stable packages. If you set ACCEPT_KEYWORDS=~arch, then you will be installing all packages marked for testing and are running the risk of having something break. A lot of people prefer to keep the overall system at the stable package level and only run a selected few applications at an unstable/testing level. How to run a masked and/or testing package on a system that has ACCEPT_KEYWORDS=arch 1. The first thing that you have to do is determine what state the package is listed in portage. The best tool for determining that is the etcat command. The following command will list all versions of a package in portage and there stable/testing state. (If you don't have this command on ypur system, run emerge gentoolkit to install the command.) Here is an example of the output: # env ACCEPT_KEYWORDS="~x86" etcat -v ac-sources [ Results for search key : ac-sources ] [ Applications found : 3 ] * sys-kernel/ac-sources : [M ] sys-kernel/ac-sources-2.4.21-r4 (2.4.21-ac4) [M ] sys-kernel/ac-sources-2.4.22-r1 (2.4.22-ac1) [M~ ] sys-kernel/ac-sources-2.4.22-r4 (2.4.22-ac4) [ ] sys-kernel/ac-sources-2.4.22-r5 (2.4.22-ac5) [ ~ ] sys-kernel/ac-sources-2.4.23 (2.4.23-ac0) (I contrived this example to show all possible states, you won't see this on your system) In this case, the entry in the package mask file is "<=sys-kernel/ac-sources-2.4.22-r4" The ebuilds for 2.4.22-r4 and 2.4.23 have KEYWORDS=~x86, all the other ebuilds have KEYWORDS=x86. The characters in the brackets show the state of the ebuild. The letter 'M" in the first column means that the ebuild is masked. The '~' in the second column means that the ebuild is marked for testing with ~arch. In this example, a system with ACCEPT_KEYWORDS=x86 would by default install ac-sources-2.4.22-r5. A system with ACCEPT_KEYWORDS=~x86 would install ac-sources-2.4.23. Assuming that your KEYWORDS is set to "x86". You want to run ac-sources-2.4.23. What you need to do is create a portage overlay directory. The first step is to create a directory somewhere. On my system, I use /usr/local/portage. The second step is to set the variable PORTDIR_OVERLAY in the /etc/make.conf file to point to that directory. In my case, my make.conf entry is PORTDIR_OVERLAY=/usr/local/portage The next step is to copy the desired ebuild(s) into your portage overlay. Using the case above, the commands I would use are: 1. cd /usr/local/portage 2. mkdir sys-kernel 3. cd sys-kernel 4. cp -a /usr/portage/sys-kernel/ac-sources . This copies the ac-sources tree from portage into the overlay. The next step is to remove the unwanted ebuilds from the overlay. 5. rm ac-sources-2.4.21-r4.ebuild rm ac-sources-2.4.22-r1.ebuild rm ac-sources-2.4.22-r4.ebuild rm ac-sources-2.4.22-r5.ebuild You are now left with ac-sources-2.4.23.ebuild. Edit the file and find the KEYWORDS variable and set it to KEYWORDS=x86 Now rerunning the etcat -v command shows the following: # env ACCEPT_KEYWORDS="~x86" etcat -v ac-sources [ Results for search key : ac-sources ] [ Applications found : 3 ] * sys-kernel/ac-sources : [M ] sys-kernel/ac-sources-2.4.21-r4 (2.4.21-ac4) [M ] sys-kernel/ac-sources-2.4.22-r1 (2.4.22-ac1) [M ] sys-kernel/ac-sources-2.4.22-r4 (2.4.22-ac4) [ ] sys-kernel/ac-sources-2.4.22-r5 (2.4.22-ac5) [ ] sys-kernel/ac-sources-2.4.23 (2.4.23-ac0) You can now run emerge ac-sources and portage will install sys-kernel/ac-sources-2.4.23. Finally, if you want to run a package that is masked, the way to unmask the package is to place an entry in the file /etc/portage/package.unmask Since ac-sources is no longer being maintained, ac-sources has been masked. Running the etcat command gives us the following: # env ACCEPT_KEYWORDS="~x86" etcat -v ac-sources [ Results for search key : ac-sources ] [ Applications found : 3 ] * sys-kernel/ac-sources : [M ] sys-kernel/ac-sources-2.4.21-r4 (2.4.21-ac4) [M ] sys-kernel/ac-sources-2.4.22-r1 (2.4.22-ac1) [M ] sys-kernel/ac-sources-2.4.22-r4 (2.4.22-ac4) [M ] sys-kernel/ac-sources-2.4.22-r5 (2.4.22-ac5) [M~ ] sys-kernel/ac-sources-2.4.23 (2.4.23-ac0) This indicates that all packages have been masked. Assuming that we want to run ac-sources-2.4.22-r5. We need to do the following. First make sure that /etc/portage exists as a directory. If it doesn't, create it with mkdir /etc/portage. The next step is to create an entry in /etc/portage/package.unmask. The simplest way is to run echo "=sys-kernel/ac-sources-2.4.22-r5" >> /etc/portage/package.unmask This will append the entry to the end of the file. Now running etcat -v we see: # env ACCEPT_KEYWORDS="~x86" etcat -v ac-sources [ Results for search key : ac-sources ] [ Applications found : 3 ] * sys-kernel/ac-sources : [M ] sys-kernel/ac-sources-2.4.21-r4 (2.4.21-ac4) [M ] sys-kernel/ac-sources-2.4.22-r1 (2.4.22-ac1) [M ] sys-kernel/ac-sources-2.4.22-r4 (2.4.22-ac4) [ ] sys-kernel/ac-sources-2.4.22-r5 (2.4.22-ac5) [M~ ] sys-kernel/ac-sources-2.4.23 (2.4.23-ac0) Running emerge ac-sources will now install ac-sources-2.4.22-r5. If you wanted to run ac-sources-2.4.23, you would need to place sys-kernel/ac-sources-2.4.23 in your /etc/portage/package.unmask file and copy the ebuild to the portage overlay and set the KEYWORDS variable to be stable. Finally, if you want to mask a package to prevent it from being upgraded to a higher version, you can use the file /etc/portage/package.mask to mask the packages locally. The best way to ensure that you are installing what you want to install is to use the env ACCEPT_KEYWORDS="~arch" etcat -v command to verify the state of the package according to portage. Once the etcat command shows the package as unmasked and stable, you can install the package. Hopefully, this overview will help. Feel free to ask me questions for where I may have not been clear in my explanation. Regards, Paul -- My Gentoo stuff: http://varnerfamily.org/pvarner/gentoo -- [EMAIL PROTECTED] mailing list