注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

User:Happy/funtoo-overlay

From Funtoo
Jump to navigation Jump to search

Setup

If you're on a version of portage that supports repos.conf, you can add funtoo-overlay for testing purposes (to use updated ebuilds not yet synced to the funtoo portage tree) or to use ebuilds from the overlay itself (for other reasons). Here's how.

Assuming /etc/portage/repos.conf is a directory, create a file called /etc/portage/repos.conf/funtoo-overlay with the following contents.

   /etc/portage/repos.conf/funtoo-overlay - adding funtoo-overlay to repos.conf
[funtoo-overlay]
location = /var/portage/funtoo-overlay
sync-type = git
sync-uri = https://github.com/funtoo/funtoo-overlay.git
auto-sync = yes

The location of the overlay can be anywhere you'd like, ensure that the top level directory above the overlay directory exists. In this case /var/portage must exist when creating this configuration. Again it does not have to specifically be in /var/portage, location may be edited to a location of your choosing. Just ensure that the top level directory exists.

If /etc/portage/repos.conf is a file instead of a directory on your system, you may add the above as a block to the file. The same statement about location applies.

After the configuration is saved, you may emerge --sync, and it will clone the repository and make the overlay available for you to use.


Masking/Unmasking packages

You may want to mask packages from the overlay or temporarily mask all packages from the overlay entirely. You can do so with a /etc/portage/package.mask file.

   /etc/portage/package.mask - masking packages from funtoo-overlay
# mask a specific atom and version from funtoo-overlay
=category/package-1.2.3.4::funtoo-overlay

# mask all versions of a specific atom from funtoo-overlay
category/package::funtoo-overlay

# mask an entire category from funtoo-overlay
category/*::funtoo-overlay

# mask all of funtoo-overlay
*/*::funtoo-overlay

You may also use relational operators to mask a range of versions. For more information see portage(5).

In some cases your profile may be masking newer versions available on funtoo-overlay. In this case you'd need to unmask whatever you desire to install with emerge(1). This is possible with a /etc/portage/package.unmask file. The syntax is the same as the file for masking.

   /etc/portage/package.unmask - unmasking packages from funtoo-overlay
# unmask a specific atom and version from funtoo-overlay
=category/package-1.2.3.4::funtoo-overlay

# unmask all versions of a specific atom from funtoo-overlay
category/package::funtoo-overlay

# unmask an entire category from funtoo-overlay
category/*::funtoo-overlay

# unmask all of funtoo-overlay
*/*::funtoo-overlay

Relational operators are also supported, again see portage(5) for more information.

   Note

If you have a preexisting /etc/portage/package.mask or /etc/portage/package.unmask directory that you want to use instead of file(s), you can just create a /etc/portage/package.mask/funtoo-overlay file or a /etc/portage/package.unmask/funtoo-overlay file with the same syntax for what you may desire to mask or unmask respectively.


Removal

While masking the overlay prevents usage of any ebuilds from it, you may want to just completely remove it at one point. Here's how.

  • Remove the overlay configuration by removing the file /etc/portage/repos.conf/funtoo-overlay or removing the configuration block from a /etc/portage/repos.conf file if that is how your setup is. (Make sure to remember where you set the repository directory location)
  • Remove any masks/unmasks from the respective file or directory (depending on how your setup is)
  • Lastly, remove the overlay repository directory. In the above example, it would be the directory /var/portage/funtoo-overlay, which was set as the location. But be sure to remove it according to what you set as the location.

After that, it will be gone.