Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Can't emerge, how to do it ?

Can't emerge, how to do it ?

emerge のヘルパーツールの使い方

Yasuhiro Asaka

July 05, 2014
Tweet

More Decks by Yasuhiro Asaka

Other Decks in Programming

Transcript

  1. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ emerge ͷϔϧύʔπʔϧͷ࢖͍ํ Yasuhiro Asaka @grauwoelfchen

    Gentoo ษڧձ #4 2014-07-05 Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  2. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ࣗݾ঺հ Yasuhiro Asaka ϓϩάϥϚ (ϑϦʔϥϯε) Gentoo, Funtoo

    StumpWM, Xterm Vim Dvorak, Kinesis Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  3. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ emerge շదͰ޾ͤ portage ͷ৺஍Α͞ ... ! Ϛγϯ΍ࣗ෼ͷ΄͍͠ঢ়ଶʹ߹Θͤͯࡉ͔͘ௐ੔Ͱ͖Δ

    portage πϦʔʹ৘ใ͕ຬࡌ (ࣗ෼Ͱௐ΂ΒΕΔ) ˡ Πϯετʔϧͨ͠ঢ়ଶ͕೺Ѳ͠΍͍͢ slot Λ࢖ͬͯෳ਺ͷύοέʔδ͕ೖΕΒΕΔ emerge ͕໰୊ͷղܾํ๏Λڭ͑ͯ͘ΕΔ ˡ ґଘղܾͷݡ͍࢓૊Έ͕͋Δ ϩά΍ϑοΫͷ࢓૊Έ͕͋Δ ύον͕؆୯ʹ͋ͯΒΕΔ Overlay ͕࢖͑Δ Announce ΍ QA, News ͕ಡΊΔ ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  4. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ͏·͘ emerge Ͱ͖ͳ͍࣌ ... Ϛγϯͷঢ়ଶ΍ઃఆɺύοέʔδʹΑͬͯݪҼ͸͍Ζ͍Ζ ͳΜ͔ mask

    ͞Ε͍ͯΔ ґଘ͍ͯ͠Δόʔδϣϯ΍ϑϥά͕ ίϯϑϦΫτ ͍ͯ͠Δ ґଘؔ܎͕Ұपͯ͠Δ (Πϯετʔϧ͢Δॱং͕͋Γͦ͏) ґଘͯ͠Δύοέʔδ͕଍Γͳ͍ͬΆ͍ ԿΛͲ͏΍ͬͯௐ΂Δʁ ͳΜͰ mask ͞Ε͍ͯΔ͔Λௐ΂Δ ґଘ͢Δύοέʔδ ͷৄࡉ (Description, URL) Λௐ΂Δ USE ϑϥά ͷ಺༰Λௐ΂Δ, ม͑Δ ґଘ͢ΔύοέʔδΛௐ΂Δɺ֎ͤΔ͔ݕ౼͢Δ ҧ͏όʔδϣϯ͕࢖͑Δ͔ௐ΂Δ ঢ়ଶΛ֬ೝ͠ɺUSE ΍ΦϓγϣϯΛม͑ͯγϛϡϨʔγϣϯ Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  5. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ emerge ΍ͦͷϔϧύʔπʔϧ πʔϧ΍ํ๏ɺΦϓγϣϯ͕ͨ͘͞Μ͋Δ gentoolkit (equery ...) ͷίϚϯυͱΦϓγϣϯ

    portage-utils (qsearch, qlist ...) eix (લʑճ @aliceinwire ͞Μ͕঺հͯͩͬͨ͘͠͞) ͦͷ΄͔ esearch, flaggie ͳͲͷπʔϧ package.* ΍ /usr/share/portage, distfiles Λ௚઀ௐ΂Δ ͍Ζ͍Ζָ͍͋ͬͯ͠ʂͰ΋ɺ࠷ॳ͸ͳ͔ͳ͔͖֮͑Εͳ͍ େ͖͘෼ྨ͢Δͱ ... ύοέʔδ΍ґଘΛ ௐ΂Δɺݕࡧ͢Δ (Ωϟ ογϡΛ࢖ͬͨΓ) ৄࡉͳઆ໌΍ঢ়ଶΛ ֬ೝ͢Δ (ͳΜͷͨΊͷ USE ϑϥά͔) ઃఆΛ มߋ͢Δ Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  6. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ gentoolkit python Ͱॻ͔Ε͍ͯΔ ;; Πϯετʔϧ͞ΕͨίϚϯυΛΈΔ $ equery

    f gentoolkit | grep bin/ /usr/bin/eclean /usr/bin/eclean-dist /usr/bin/eclean-pkg /usr/bin/enalyze /usr/bin/epkginfo ˡ /usr/bin/equery ˡ /usr/bin/eread /usr/bin/eshowkw /usr/bin/euse ˡ /usr/bin/glsa-check /usr/bin/revdep-rebuild /usr/bin/revdep-rebuild.py /usr/bin/revdep-rebuild.sh Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  7. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ portage-utils C Ͱॻ͔Ε͍ͯΔ (଎͍ɺcache ࢖͏, q -r)

    ;; Πϯετʔϧ͞ΕͨίϚϯυΛΈΔ % equery f portage-utils | grep usr/bin/ /usr/bin/q ... /usr/bin/qcheck /usr/bin/qdepends ˡ /usr/bin/qfile ˡ /usr/bin/qgrep /usr/bin/qlist /usr/bin/qlop ... /usr/bin/qsearch /usr/bin/qsize /usr/bin/quse ˡ ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  8. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ Πϯετʔϧ͍ͨ͠ύοέʔδ΍όʔδϣϯ͕ͳ͍ʁ ΠϯετʔϧͰ͖ΔόʔδϣϯͷҰཡΛ֬ೝ͢Δ gentoolkit ;; equery (l)ist Ͱ

    emerge ՄೳͳόʔδϣϯΛௐ΂ͯΈΔ ;; -p : portage tree ͔Β୳͢ ;; -o : overlay tree ͔Β୳͢ $ equery l -po vim * Searching for vim ... [-P-] [ ] app-editors/vim-7.3.1214:0 [-P-] [ ] app-editors/vim-7.4.52:0 ... [IP-] [ ] app-editors/vim-7.4.326:0 [-P-] [ -] app-editors/vim-9999:0 Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  9. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ͳΜͰͦͷύοέʔδ΋ඞཁͳͷʁ ґଘͷछྨ΋֬ೝ͍ͨ͠ portage-utils ;; ґଘ (DEPEND, RDEPEND,

    PDEPEND) Λௐ΂ͯΈΔ $ qdepends -r glibc sys-libs/glibc-2.15-r4: !sys-kernel/ps3-sources \ !sys-libs/nss-db sys-libs/timezone-data $ qdepends -d glibc sys-libs/glibc-2.15-r4: >=sys-devel/gcc-3.4.4 >=sys-devel/binutils-2.19 ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  10. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ The following installed packages are masked mask

    ͞Εͯͨ gentoolkit ;; equery ͷ (l)ist Ͱ mask reason ΋දࣔ͢Δ ;; -m : mask reason Λදࣔ $ equery l -mop cvs ... [IP-] [ ] dev-vcs/cvs-1.12.12-r10:0 [-P-] [M ] dev-vcs/cvs-1.12.13-r1:0 * Masked by u’package.mask’ * /usr/portage/profiles/package.mask/00-gentoo: * Robin H. Johnson <[email protected]> (11 Feb 2006) * zlib interaction is badly broken. See bug #124733. ;; ϑΝΠϧΛ௚઀Έͯཧ༝Λ֬ೝ͢Δ (·ͨ͸ whymask) $ vim /usr/portage/profiles/package.mask/* Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  11. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ΠϯετʔϧࡁΈͷଞͷύοέʔδͱґଘ͕ίϯϑϦΫ τͨ͠ ଞͷύοέʔδ͕Πϯετʔϧ͠Α͏ͱ͍ͯ͠Δ΋ͷͱ͸ผ ͳόʔδϣϯ΁ͷґଘΛ΋͍ͬͯΔ Ұॹʹ emerge ͯ͠ΞοϓάϨʔυͪ͠Ό͑͹͍͍͔ͳʁ

    gentoolkit ;; equery dep(g)raph Ͱ ;; ґଘ͍ͯ͠ΔύοέʔδͷπϦʔΛਂ͞Λࢦఆͯ֬͠ೝ͢Δ % equery g --depth=2 htop * Searching for htop ... * dependency graph for sys-process/htop-1.0.1 ‘-- sys-process/htop-1.0.1 amd64 ‘-- sys-libs/ncurses-5.9-r3 (sys-libs/ncurses) ~amd64 [unicode] ‘-- sys-libs/gpm-1.20.7-r2 (sys-libs/gpm) ~amd64 [ sys-process/htop-1.0.1 stats: packages (3), max depth (2) ] ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  12. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ΠϯετʔϧࡁΈͷଞͷύοέʔδͱґଘ͕ίϯϑϦΫ τͨ͠ ଞͷύοέʔδ͕Πϯετʔϧ͠Α͏ͱ͍ͯ͠Δ΋ͷͱ͸ผ ͳόʔδϣϯ΁ͷґଘΛ΋͍ͬͯΔ ͜Εόʔδϣϯ͋͛ͪΌ ͍͍͔ͬͯͳʁ gentoolkit

    ;; equery (d)pends Ͱ ;; ύοέʔδʹґଘͷ͋ΔύοέʔδͷҰཡΛ֬ೝ͢Δ % equery d --depth=2 git * These packages depend on git: app-portage/layman-2.0.0-r3 (git ? dev-vcs/git) dev-vcs/git-extras-9999 (dev-vcs/git) sys-devel/gettext-0.18.1.1-r3 (dev-vcs/git) Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  13. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ͋Δ USE ϑϥά͕ඞཁ͔Ͳ͏͔൑அͰ͖ͳ͍ ґଘͯ͠Δύοέʔδͷ USE ϑϥάɺ͜ΕԿʁ gentoolkit

    ;; Θ͔Βͳ͍ USE ϑϥά͕͋Δ ;; epkginfo -u Ͱ΋ͦͷύοέʔδͷ USE ϑϥάͷઆ໌͕֬ೝͰ͖Δ % equery u freetype [ Legend : U - final flag setting for installation] [ : I - package is installed with flag ] [ Colors : set, unset ] * Found these USE flags for media-libs/freetype-2.5.3-r1: U I + + X : Add support for X11 - - abi_x86_32 : 32-bit (x86) libraries ... + + bzip2 : Support bzip2 compressed PCF fonts. - - debug : Enable extra debug codepaths, like asserts and extra ... - - doc : Add extra documentation (API, Javadoc, etc). It ... + + infinality : Enable infinality options for improved LCD filtering ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  14. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ͋Δ USE ϑϥά͕ඞཁ͔Ͳ͏͔൑அͰ͖ͳ͍ ΄͔ʹ͸ԿͷύοέʔδͰ͜ͷ USE ϑϥά͕࢖ΘΕ͍ͯΔ ΜͩΖ͏ʁ

    portage-utils ;; quse Ͱ USE ϑϥά͔Β୳͢ $ quse git --name-only app-admin/pass/pass-9999.ebuild ... app-admin/r10k/r10k-1.1.3.ebuild app-portage/layman/layman-2.0.0-r1.ebuild ... app-portage/layman/layman-9999.ebuild dev-perl/App-Nopaste/App-Nopaste-0.900.0.ebuild ... dev-python/anyvc/anyvc-0.3.7.1-r1000.ebuild dev-util/monodevelop/monodevelop-3.0.2-r1.ebuild dev-vcs/cvs2svn/cvs2svn-2.2.0.ebuild ... Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  15. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ͋ΕɺલͲ͏ͨ͠Μ͚ͩͬʁ ͋Εɺલʹ͜ͷίϚϯυ (ϑΝΠϧ)ɺemerge ͨ͠Μ͡Όͳ ͔͚ͬͨͬʁ ࣗ෼ͰίϯύΠϧͨ͠Μ͚ͩͬʁ gentoolkit

    , portage-utils ;; equery (b)elongs ͰͲͷύοέʔδͰΠϯετʔϧ͞ΕͨίϚϯυ͔֬ೝ͢Δ % equery b ‘which emerge‘ * Searching for /usr/bin/emerge ... sys-apps/portage-2.3.6-r8 (/usr/bin/emerge -> ../lib/portage/bin/emerge) ;; ର৅͸ίϚϯυ͡Όͳͯ͘΋ฏؾ % equery b /usr/share/fonts/misc/9x15B-ISO8859-8.pcf.gz * Searching for /usr/share/fonts/misc/9x15B-ISO8859-8.pcf.gz ... media-fonts/font-misc-misc-1.1.2 (/usr/share/fonts/misc/9x15B-ISO8859-8.pcf. ;; qfile ͷํ͕଎͍ (-v Ͱಉ͡ग़ྗʹͳΔ) $ qfile -v /usr/share/fonts/misc/9x15B-ISO8859-8.pcf.gz media-fonts/font-misc-misc-1.1.2 (/usr/share/fonts/misc/9x15B-ISO8859-8.pcf. Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ
  16. ΠϯτϩμΫγϣϯ ϔϧύʔπʔϧͨͪ ͜Μͳͱ͖Ͳ͏͢Δʁ ࢀߟϦϯΫ Gentoolkit document http://docs.huihoo.com/gentoo/resources/document-listing/gentoolkit.html Gentoolkit wiki http://wiki.gentoo.org/wiki/Gentoolkit

    Portage Utils http://wiki.gentoo.org/wiki/Q_applets eix http://wiki.gentoo.org/wiki/Eix Gentoo cheat sheet http://wiki.gentoo.org/wiki/Gentoo_Cheat_Sheet LaTex Beamer Theme http://a3li.li/2014/04/gentoo-latex-beamer-theme/ Yasuhiro Asaka @grauwoelfchen Gentoo ษڧձ #4 emerge Ͱ͖ͳ͍࣌ɺͲ͏͢Δʁ