Difference between pages "Emerge" and "Help:Funtoo Editing Guidelines"

From Funtoo
(Difference between pages)
Jump to: navigation, search
 
m (add hierarchy syntax notes. done for the day, have a good week funtoo!)
 
Line 1: Line 1:
== Getting started with emerge ==
+
This guide is meant to serve as a reference for those who are interested in helping improve the Funtoo wiki.  
Emerge is the front-end for funtoo's portage package manager. With emerge it is easy to install, update or remove packages.
+
  
=== Update package database ===
+
= document hierarchy structure =
'''Sync local package database. This will update your local Portage tree with the latest Funtoo ebuilds.'''
+
<pre>= document hierarchy structure =</pre>
<console>
+
== document hierarchy sub structure ==
###i## emerge --sync
+
<pre>== document hierarchy sub structure ==</pre>
</console>
+
this is the primary structure most pages, talk pages will use instead of main heading example above. some pages will call for main heading.
 +
=== document hierarchy sub sub structure ===
 +
<pre>=== document hierarchy sub sub structure ===</pre>
 +
==== document hierarchy sub sub sub structure ====
  
=== Search packages ===
+
<pre>==== document hierarchy sub structure ====</pre>
'''Search packages by name.'''
+
<console>
+
###i## emerge -s firefox
+
###i## emerge --search firefox
+
</console>
+
  
'''Search packages by description.'''
+
to implement pipe {{!}} in documents, wrap with brackets.
<console>
+
<pre>{{!}}</pre>
###i## emerge -S web browser
+
 
###i## emerge --searchdesc web browser
+
{{fancyimportant|below template is not instated yet}}
</console>
+
to use equals signs with out conflicting with document structure wrap with brackets.
 +
<pre>{{=}}</pre>
 +
 
 +
{{=}} http://en.wikipedia.org/wiki/Template:%3D
 +
 
 +
== &#60;console&#62; ==
 +
To display console output, use the <tt>&#60;console&#62;</tt> tag:
  
=== Install packages ===
+
<pre>
'''Install package.'''
+
 
<console>
 
<console>
###i## emerge firefox
+
##g##user $ ##b## test
 
</console>
 
</console>
 +
</pre><br />
  
'''Install multiple packages.'''
 
 
<console>
 
<console>
###i## emerge firefox thunderbird
+
##g##user $ ##b## test
</console>
+
</console><br />
  
'''Install package. Ask for confirmation before performing any changes. Show verbose output.'''
+
<pre>
 
<console>
 
<console>
###i## emerge -av firefox
+
##r##root $ ##b## tube
###i## emerge --ask firefox
+
 
</console>
 
</console>
 +
</pre><br />
  
=== Remove packages ===
 
'''Remove package.'''
 
 
<console>
 
<console>
###i## emerge -C firefox
+
##r##root # ##b## tube
###i## emerge --unmerge firefox
+
 
</console>
 
</console>
  
'''Remove package. Ask for confirmation before performing any changes.'''
+
{{fancynote|consoles below are deprecated syntax}}
 +
 
 +
For a root console:
 +
<pre>
 
<console>
 
<console>
###i## emerge -aC firefox
+
###i## run a command as root
 
</console>
 
</console>
 
+
</pre>
'''Remove orphaned packages. Ask for confirmation before performing any changes.'''
+
Produces:
 
<console>
 
<console>
###i## emerge -a --depclean
+
###i## run a command as root
 
</console>
 
</console>
  
=== Update packages ===
+
{{Fancyimportant|The <tt>##i##</tt> text tags the rest of the line as being ''user input'' ("i" is for "input"). It is then highlighted in a noticeable color so it stands out from text that is not typed in by the user.}}
'''Update all packages.'''
+
 
 +
Examples of usage:
 +
* [[Rootfs over encrypted lvm]]
 +
* [[Boot-Update]]
 +
* [[Fonts]]
 +
For a non-root console:
 +
<pre>
 
<console>
 
<console>
###i## emerge -uDN @world
+
$ ##i##run a command as user
 
</console>
 
</console>
 
+
</pre>
'''Update all packages. Ask for confirmation before performing any changes. Show verbose output.'''
+
Produces:
 
<console>
 
<console>
###i## emerge -uavDN @world
+
$ ##i##run a command as user
 
</console>
 
</console>
  
== Emerge options ==
+
{{fancyimportant|1=
 +
Note that we use a <tt>#</tt> prompt for <tt>root</tt> and a <tt>$</tt> prompt to denote a non-root user.}}
  
; --sync
+
Examples of usage:
: Updates the portage tree that is located in /usr/portage by default.
+
* [[Zope HOWTO]]
 +
* [[Benchmarking]]
  
; --search -s
+
or a more concise syntax
: Searches  for  matches  of  the  supplied  string in the portage tree.
+
  
; --searchdesc -S
+
== Fancy Notes ==
: Matches the search string against the description field as well as the package name.
+
notes, warnings, tips, and important templates will help bring emphasis to articles drawn up.
 +
<pre>{{fancynote|this is a fancy note}}</pre><br />
 +
{{fancynote|this is a fancy note}}<br />
  
; --ask -a
+
<pre>{{fancyimportant|this is a fancy important}}</pre><br />
: Ask for confirmation before performing any changes.
+
{{fancyimportant|this is a fancy important}}<br />
  
; --pretend -p
+
<pre>{{fancywarning|this is a fancy warning}}</pre><br />
: Instead of actually performing the merge, simply display what *would* have been installed if --pretend weren't used.
+
{{fancywarning|this is a fancy warning}}<br />
  
; --unmerge -C
+
<pre>{{fancytip|this is a fancy tip}}</pre><br />
: Removes all matching packages.
+
{{fancytip|this is a fancy tip}}<br />
  
; --update -u
 
: Updates  packages to the best version available, which may not always be the  highest version number due to masking for testing and development.
 
  
; --deep [DEPTH] -D
+
<pre>bridge returns will help you edit articles also <br /> starts a new line</pre><br />
: force  emerge  to  consider  the  entire  dependency tree of packages, instead of checking only the immediate dependencies of the packages.
+
bridge returns will help you edit articles also <br /> starts a new line
  
; --newuse -N
+
== &#123;&#123;Kernelop&#125;&#125; ==
: Tells emerge to include installed packages where USE flags have changed since compilation.
+
To display kernel options, we encourage you to use the <tt>kernelop</tt> template. To use the <tt>kernelop</tt> template, create an entry similar to the following example:
 +
<pre>
 +
{{kernelop|title=foo,bar|desc=
 +
kernel options pasted from "make menuconfig"
 +
<&#47;pre>}}
 +
</pre>
  
; --depclean -c
+
Adding this entry will give you the following output:
: Remove orphaned packages. Cleans the system by removing packages that are not associated with explicitly merged packages.
+
{{kernelop|title=foo,bar|desc=
 +
kernel options
 +
}}
  
; --autounmask-write
+
Here's a more concrete example:
: Automatically write package.use settings as necessary to satisfy dependencies.
+
{{kernelop|title=File systems|desc=
 +
<M> Second extended fs support         
 +
[ ]  Ext2 extended attributes         
 +
[ ]  Ext2 execute in place support   
 +
<M> Ext3 journalling file system support
 +
}}
  
; --resume -r
+
Examples of usage:  
: Resumes  the  most recent merge list that has been aborted due to an error.
+
* [[Fglrx]]
 +
* [[Acpid]]
 +
* [[Microcode]]
  
; --jobs[=JOBS] -j [JOBS]
+
== links ==
: Specifies the number of packages to build simultaneously.
+
  
; --load-average [LOAD]
+
internal:<pre>[[pagename]]</pre><br />
: Specifies  that  no  new  builds should be started if there are other builds running and the load average is at least LOAD (a floating-point number).
+
[[pagename]]<br />
 +
internal with text:<pre>[[pagename|some text]]</pre><br />
 +
[[pagename|some text]]<br />
 +
external: <pre>[http://funtoo.org/ http://funtoo.org/]</pre><br />
 +
[http://funtoo.org/ http://funtoo.org/]<br />
 +
external with text: <pre>[http://funtoo.org/ this is some text]</pre><br />
 +
[http://funtoo.org/ this is some text]
  
== Configuration ==
+
== Displaying Source Code ==
Emerge can be configured with <code>/etc/portage/make.conf</code>
+
 
<console>
+
To display source code, use the <tt>&#60;syntaxhighlight&#62;</tt> tag, which has the ability to perform syntax highlighting on the source code for easier reading:
###i## nano /etc/portage/make.conf
+
<pre>
CFLAGS="-march=native -O2 -pipe"
+
<syntaxhighlight lang="python">
CXXFLAGS="-march=native -O2 -pipe"
+
import system
 +
</syntaxhighlight>
 +
</pre>
 +
 
 +
This will produce the following output:
 +
 
 +
<syntaxhighlight lang="python">
 +
import system
 +
</syntaxhighlight>
 +
 
 +
 
 +
Note that the language should be specified in the <tt>lang</tt> attribute. For a list of supported languages, see [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Supported_languages this list].
 +
 
 +
== Displaying Files ==
 +
To display the contents of a file that is not source code, use the <&#47;pre> tag. The <&#47;pre> tag preserves formatting. Example file contents:
 +
 
 +
<pre>
 +
foo
 +
bar
 +
oni
 +
</pre>
 +
 
 +
 
 +
Examples of usage:
 +
* [[UEFI Install Guide]]
 +
* [[MediaWiki]]
 +
* [[Clang]]
 +
 
 +
== &#60;tt&#62; and &#60;code&#62; ==
 +
To emphasize filenames, commands, and other technical jargon when they appear inline in a paragraph, use the  <tt>&#60;tt&#62;</tt> or <tt>&#60;code&#62;</tt> option. To use these, follow the example below:
 +
<pre>
 +
The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.
 +
</pre>
 +
 
 +
This example produces the following output (notice the difference between the fonts?): <br> The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.
  
MAKEOPTS="-j2"
+
== Collapsible text ==
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 2"
+
INPUT_DEVICES="evdev synaptics"
+
VIDEO_CARDS="intel i965"
+
LINGUAS="en en_US en_GB"
+
ACCEPT_LICENSE="*"
+
  
USE="mmx mmxext sse sse2 sse3 ssse3 threads alsa X gtk xcb dri opengl vaapi udev \
+
<pre><div class="toccolours mw-collapsible"> some text you might want to fold away because its a huge explanation.</div></pre><br />
    svg x264 xvid gstreamer webm vpx icu bash-completion vim-pager \
+
    -gnome -xscreensaver -cups -fortran -deprecated -iptables -ipv6 -geoloc \
+
    -mta -sendmail -kmod -tiff -live -quicktime -real -gpm -themes"</pre>
+
  
Per-package use flags can be configured with /etc/portage/package.use
+
<div class="toccolours mw-collapsible"> some text you might want to fold away because its a huge explanation.</div><br />
<pre>x11-wm/dwm savedconfig
+
media-sound/ncmpcpp visualizer clock taglib</pre>
+
  
If you want to install package that has not been tested on your architecture you need to edit /etc/portage/package.accept_keywords
+
<pre><div class="toccolours mw-collapsible mw-collapsed">pre collapsed text because it is a huge explanation.</div></pre><br />
<pre>=app-misc/screenfetch-9999 **</pre>
+
  
== Further info ==
+
<div class="toccolours mw-collapsible mw-collapsed">pre collapsed text because it is a huge explanation.</div>
For further info see emerge man page.
+
<console>$ man emerge</console>
+
  
[[Category:Portage]]
+
== Screencasting ==
 +
screencasting is an easy method to explain complex tasks.  take for instance youtu.be/5KDei5mBfSg we chop off the id and insert it into the following syntax to produce a video example.<br />
 +
tiny:
 +
<pre>{{#widget:YouTube|id=5KDei5mBfSg|width=320|height=180}}</pre>
 +
standard:
 +
<pre>{{#widget:YouTube|id=5KDei5mBfSg|width=700|height=420}}</pre>
 +
{{#widget:YouTube|id=5KDei5mBfSg|width=700|height=420}}
  
[[Category:HOWTO]]
+
[[Category:Wiki Development]]
[[Category:Tutorial]]
+
[[Category:System]]
+

Revision as of 04:30, 16 March 2014

This guide is meant to serve as a reference for those who are interested in helping improve the Funtoo wiki.

document hierarchy structure

= document hierarchy structure =

document hierarchy sub structure

== document hierarchy sub structure ==

this is the primary structure most pages, talk pages will use instead of main heading example above. some pages will call for main heading.

document hierarchy sub sub structure

=== document hierarchy sub sub structure ===

document hierarchy sub sub sub structure

==== document hierarchy sub structure ====

to implement pipe | in documents, wrap with brackets.

{{!}}
Important: below template is not instated yet

to use equals signs with out conflicting with document structure wrap with brackets.

{{=}}

Template:= http://en.wikipedia.org/wiki/Template:%3D

<console>

To display console output, use the <console> tag:

<console>
##g##user $ ##b## test
</console>

user $  test

<console>
##r##root $ ##b## tube
</console>

root #  tube
Note: consoles below are deprecated syntax

For a root console:

<console>
###i## run a command as root
</console>

Produces:

# run a command as root
Important: The ##i## text tags the rest of the line as being user input ("i" is for "input"). It is then highlighted in a noticeable color so it stands out from text that is not typed in by the user.

Examples of usage:

For a non-root console:

<console>
$ ##i##run a command as user
</console>

Produces:

$ run a command as user
Important: Note that we use a # prompt for root and a $ prompt to denote a non-root user.

Examples of usage:

or a more concise syntax

Fancy Notes

notes, warnings, tips, and important templates will help bring emphasis to articles drawn up.

{{fancynote|this is a fancy note}}

Note: this is a fancy note

{{fancyimportant|this is a fancy important}}

Important: this is a fancy important

{{fancywarning|this is a fancy warning}}

Warning: this is a fancy warning

{{fancytip|this is a fancy tip}}

Tip: this is a fancy tip


bridge returns will help you edit articles also <br /> starts a new line

bridge returns will help you edit articles also
starts a new line

{{Kernelop}}

To display kernel options, we encourage you to use the kernelop template. To use the kernelop template, create an entry similar to the following example:

{{kernelop|title=foo,bar|desc=
kernel options pasted from "make menuconfig"
</pre>}} 

Adding this entry will give you the following output: Under foo-->bar:

kernel options

Here's a more concrete example: Under File systems:

<M> Second extended fs support          
[ ]   Ext2 extended attributes          
[ ]   Ext2 execute in place support     
<M> Ext3 journalling file system support

Examples of usage:

links

internal:
[[pagename]]

pagename

internal with text:
[[pagename|some text]]

some text

external:
[http://funtoo.org/ http://funtoo.org/]

http://funtoo.org/

external with text:
[http://funtoo.org/ this is some text]

this is some text

Displaying Source Code

To display source code, use the <syntaxhighlight> tag, which has the ability to perform syntax highlighting on the source code for easier reading:

<syntaxhighlight lang="python">
import system
</syntaxhighlight>

This will produce the following output:

import system


Note that the language should be specified in the lang attribute. For a list of supported languages, see this list.

Displaying Files

To display the contents of a file that is not source code, use the </pre> tag. The </pre> tag preserves formatting. Example file contents:

foo
bar
oni


Examples of usage:

<tt> and <code>

To emphasize filenames, commands, and other technical jargon when they appear inline in a paragraph, use the <tt> or <code> option. To use these, follow the example below:

The <tt>/etc/fstab</tt> file is an important one. Another important file is <code>/boot/grub/grub.cfg</code>.

This example produces the following output (notice the difference between the fonts?):
The /etc/fstab file is an important one. Another important file is /boot/grub/grub.cfg.

Collapsible text

<div class="toccolours mw-collapsible"> some text you might want to fold away because its a huge explanation.</div>

some text you might want to fold away because its a huge explanation.

<div class="toccolours mw-collapsible mw-collapsed">pre collapsed text because it is a huge explanation.</div>

pre collapsed text because it is a huge explanation.

Screencasting

screencasting is an easy method to explain complex tasks. take for instance youtu.be/5KDei5mBfSg we chop off the id and insert it into the following syntax to produce a video example.
tiny:

{{#widget:YouTube|id=5KDei5mBfSg|width=320|height=180}}

standard:

{{#widget:YouTube|id=5KDei5mBfSg|width=700|height=420}}