| 1 | Portage Differences |
|---|
| 2 | +++++++++++++++++++ |
|---|
| 3 | |
|---|
| 4 | Currently portage handles all actions primarily through one script; emerge. |
|---|
| 5 | pkgcore breaks this functionality down into 3 scripts: pmerge, pmaint, and |
|---|
| 6 | pquery. |
|---|
| 7 | |
|---|
| 8 | Pmerge |
|---|
| 9 | ====== |
|---|
| 10 | |
|---|
| 11 | pmerge is fairly similar to emerge in most usage instances: |
|---|
| 12 | |
|---|
| 13 | Basic Usage |
|---|
| 14 | ----------- |
|---|
| 15 | |
|---|
| 16 | ``pmerge -us world`` |
|---|
| 17 | Update world |
|---|
| 18 | ``pmerge -uDs world`` |
|---|
| 19 | Update world deeply - the resolver will check the |
|---|
| 20 | dependencies of each package's dependencies. |
|---|
| 21 | ``pmerge -p dev-util/bzrtools`` |
|---|
| 22 | Pretend to install bzrtools |
|---|
| 23 | ``pmerge -C \<sys-kernel/gentoo-sources-2.6.19`` |
|---|
| 24 | Remove gentoo-sources less than 2.6.19 |
|---|
| 25 | ``pmerge --clean`` |
|---|
| 26 | Remove unused packages. |
|---|
| 27 | |
|---|
| 28 | **Warning:** This can break your system if |
|---|
| 29 | incorrectly used. Check with --pretend before running it. |
|---|
| 30 | |
|---|
| 31 | Sets |
|---|
| 32 | ---- |
|---|
| 33 | |
|---|
| 34 | There are five default sets: |
|---|
| 35 | system, world, installed, version-installed, vuln |
|---|
| 36 | |
|---|
| 37 | system: |
|---|
| 38 | |
|---|
| 39 | world: |
|---|
| 40 | |
|---|
| 41 | These two are the same as in portage. |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | version-installed: |
|---|
| 45 | |
|---|
| 46 | versioned-installed is a set of all cpv's from the vdb. This is useful for |
|---|
| 47 | --emptytree. |
|---|
| 48 | |
|---|
| 49 | Example: |
|---|
| 50 | If you have app/foo-1 and bar/dar-2 installed (and just those), |
|---|
| 51 | versioned-installed would be a set containing -app/foo-1 and -bar/dar-2. |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | installed: |
|---|
| 55 | |
|---|
| 56 | installed is an unversioned set, but is slotted. Unlike version-installed, |
|---|
| 57 | installed can be used for "system update". Using ``pmerge -us installed`` |
|---|
| 58 | over ``pmerge -u -s system -s`` world also has the advantage that |
|---|
| 59 | dependency-orphaned packages are updated. |
|---|
| 60 | |
|---|
| 61 | Example: |
|---|
| 62 | If you had app/foo-1 slot 1, app/foo-2 slot 2, installed would be a set |
|---|
| 63 | containing would be app/foo:1 app/foo:2. |
|---|
| 64 | |
|---|
| 65 | |
|---|
| 66 | vuln: |
|---|
| 67 | |
|---|
| 68 | Packages that are vulnerable to security bugs. |
|---|
| 69 | |
|---|
| 70 | Custom Sets |
|---|
| 71 | ----------- |
|---|
| 72 | |
|---|
| 73 | Doing this for a make.conf configuration is pretty simple. Just add a file |
|---|
| 74 | to /etc/portage/sets, containing a list of atoms. The set name is the filename. |
|---|
| 75 | |
|---|
| 76 | Example: Making a kde set: |
|---|
| 77 | ``pquery 'kde-*/*' --no-version > /etc/portage/sets/kde-set`` |
|---|
| 78 | ``pmerge -uDs kde-set`` |
|---|
| 79 | |
|---|
| 80 | Portage Equivalents |
|---|
| 81 | ------------------- |
|---|
| 82 | |
|---|
| 83 | ~~~~~~~~~~~~~~~ |
|---|
| 84 | New in pkgcore: |
|---|
| 85 | ~~~~~~~~~~~~~~~ |
|---|
| 86 | |
|---|
| 87 | --ignore-failures: |
|---|
| 88 | |
|---|
| 89 | ignore resolution failures |
|---|
| 90 | |
|---|
| 91 | |
|---|
| 92 | --preload-vdb-state: |
|---|
| 93 | |
|---|
| 94 | This preloads the installed packages database causing the resolver to work |
|---|
| 95 | with a complete graph, disallowing actions that confict with installed |
|---|
| 96 | packages. If it's disabled, it's possible for the requested action to |
|---|
| 97 | conflict with already installed dependencies that aren't involved in the |
|---|
| 98 | graph of the requested operation. |
|---|
| 99 | |
|---|
| 100 | ~~~~~~~~~~~~~~~~~ |
|---|
| 101 | Moved, in pmerge: |
|---|
| 102 | ~~~~~~~~~~~~~~~~~ |
|---|
| 103 | |
|---|
| 104 | --depclean: |
|---|
| 105 | |
|---|
| 106 | --clean |
|---|
| 107 | |
|---|
| 108 | |
|---|
| 109 | --with-bdeps: |
|---|
| 110 | |
|---|
| 111 | --with-built-depends |
|---|
| 112 | |
|---|
| 113 | ~~~~~~~~~~~~~~~~~~~~ |
|---|
| 114 | Moved out of pmerge: |
|---|
| 115 | ~~~~~~~~~~~~~~~~~~~~ |
|---|
| 116 | |
|---|
| 117 | --regen: |
|---|
| 118 | |
|---|
| 119 | See regen_ |
|---|
| 120 | |
|---|
| 121 | ~~~~~~~~~~~~~~~ |
|---|
| 122 | No equivalents: |
|---|
| 123 | ~~~~~~~~~~~~~~~ |
|---|
| 124 | |
|---|
| 125 | |
|---|
| 126 | --info: |
|---|
| 127 | |
|---|
| 128 | pconfig is the closest equivalent. |
|---|
| 129 | |
|---|
| 130 | --config: |
|---|
| 131 | |
|---|
| 132 | This may be implemented in pmaint in the future, possible 0.3. |
|---|
| 133 | |
|---|
| 134 | --clean: |
|---|
| 135 | |
|---|
| 136 | --prune: |
|---|
| 137 | |
|---|
| 138 | These aren't yet implemented, use pmerge --clean to get a depclean |
|---|
| 139 | equivalent. |
|---|
| 140 | |
|---|
| 141 | --resume: |
|---|
| 142 | |
|---|
| 143 | --skipfirst: |
|---|
| 144 | |
|---|
| 145 | Not yet implemented. |
|---|
| 146 | |
|---|
| 147 | --metadata: |
|---|
| 148 | |
|---|
| 149 | Not implemented - we don't do cache transferance as we don't need it. |
|---|
| 150 | |
|---|
| 151 | |
|---|
| 152 | --fetch-all-uri: |
|---|
| 153 | |
|---|
| 154 | Not yet implemented. |
|---|
| 155 | |
|---|
| 156 | --buildpkg: |
|---|
| 157 | |
|---|
| 158 | Not yet implemented. |
|---|
| 159 | |
|---|
| 160 | --getbinpkg: |
|---|
| 161 | |
|---|
| 162 | --getbinpkgonly: |
|---|
| 163 | |
|---|
| 164 | This is binhost version 1 specific, which won't be implemented in pkgcore. |
|---|
| 165 | |
|---|
| 166 | --tree: |
|---|
| 167 | |
|---|
| 168 | This is formatter dependant, it may be included in 0.3. |
|---|
| 169 | |
|---|
| 170 | --alphabetical: |
|---|
| 171 | |
|---|
| 172 | --changelog: |
|---|
| 173 | |
|---|
| 174 | --columns: |
|---|
| 175 | |
|---|
| 176 | These won't be implemented in pkgcore. |
|---|
| 177 | |
|---|
| 178 | Regen |
|---|
| 179 | ----- |
|---|
| 180 | |
|---|
| 181 | To regenerate run ``pregen.py <repo-name> -j <# of processors>``, which scales |
|---|
| 182 | around .9x linear per proc, at least through 4x for testing. This will |
|---|
| 183 | probably be folded into pmaint by 0.3. |
|---|
| 184 | |
|---|
| 185 | Searching |
|---|
| 186 | ========= |
|---|
| 187 | |
|---|
| 188 | All search in pkgcore is done through pquery. See |
|---|
| 189 | pquery-usage_ for how to use pquery. |
|---|
| 190 | |
|---|
| 191 | Syncing |
|---|
| 192 | ======= |
|---|
| 193 | |
|---|
| 194 | ``pmaint sync <reponame>`` will sync a repository. See config doc for syncing |
|---|
| 195 | info. |
|---|
| 196 | |
|---|
| 197 | Note: You should look at pmaint --help, because at some point, the 'commands' |
|---|
| 198 | for pmaint will be variable and dependant upon the repositories available, |
|---|
| 199 | akin to how bzr's command set changes dependant on what plugins you've enabled |
|---|
| 200 | (commonly bzrtools). |
|---|
| 201 | |
|---|
| 202 | Quickpkg |
|---|
| 203 | ======== |
|---|
| 204 | |
|---|
| 205 | ``pmaint copy -s vdb -t binpkg sys-apps/portage --force`` will make a binpkg |
|---|
| 206 | (like quickpkg). |
|---|
| 207 | |
|---|
| 208 | Note: this is not a --buildpkg equiv, as buildpkg grabs a package prior to |
|---|
| 209 | any preinst mangling, so a quickpkg'ed binpkg's contents can differ from a |
|---|
| 210 | binpkg built with --buildpkg. |
|---|
| 211 | |
|---|
| 212 | .. _pquery-usage: pquery-usage.rst |
|---|