Sistem Manajemen Paket 1: Menengok Kegunaan apt-cache

Bismillahirrahmanirrahim.

Apa sebenarnya kegunaan apt-cache? Dari satu kawanan apt berjumlah 11 perintah yang terdiri dari apt-add-repository, apt-config, apt-get, apt-mark, apt-cache, apt-extracttemplates, apt-internal-solver, apt-cdrom, apt-ftparchive, apt-key, dan apt-sortpkgs, apa istimewanya apt-cache? Saya putuskan menulis terkait sistem manajemen paket Ubuntu dan berseri kali ini. Saya berusaha menjelaskan setiap argumen apt-cache dengan dua contoh, satu paket telah terinstal dan satu paket belum. Semoga bisa dilanjutkan.

Argumen apt-cache yang Tersedia

gencaches – Build both the package and source cache
showpkg – Show some general information for a single package
showsrc – Show source records
stats – Show some basic statistics
dump – Show the entire file in a terse form
dumpavail – Print an available file to stdout
unmet – Show unmet dependencies
search – Search the package list for a regex pattern
show – Show a readable record for the package
depends – Show raw dependency information for a package
rdepends – Show reverse dependency information for a package
pkgnames – List the names of all packages in the system
dotty – Generate package graphs for GraphViz
xvcg – Generate package graphs for xvcg
policy – Show policy settings

1. Contoh Argumen show

PERINTAH

apt-cache show synaptic

OUTPUT

Package: synaptic
Priority: optional
Section: universe/admin
Installed-Size: 7597
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Michael Vogt <mvo@debian.org>
Architecture: i386
Version: 0.75.9ubuntu1
Depends: libapt-inst1.4 (>= 0.8.0), libapt-pkg4.12 (>= 0.8.16~exp12ubuntu8), libc6 (>= 2.4), libept1.4.12, libgcc1 (>= 1:4.1.1), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.14.0), libgtk2.0-0 (>= 2.24.0), libpango1.0-0 (>= 1.14.0), libstdc++6 (>= 4.6), libvte9 (>= 1:0.24.0), libx11-6, libxapian22, hicolor-icon-theme
Recommends: gksu | kdebase-bin | policykit-1, libgtk2-perl (>= 1:1.130), rarian-compat, software-properties-gtk
Suggests: dwww, menu, deborphan, apt-xapian-index
Conflicts: menu (<< 2.1.11)
Filename: pool/universe/s/synaptic/synaptic_0.75.9ubuntu1_i386.deb
Size: 2404832
MD5sum: 1fc22bb2696aa397ed24af57b635ac41
SHA1: eba93d817938a356c2eb51a5a084cd7cfdec82d6
SHA256: 8a520ea8c8fe31b5c1de211f3976940ab743cd1bca6ba201e5861bfda926d3df
Description-en: Graphical package manager
Synaptic is a graphical package management tool based on GTK+ and APT.
Synaptic enables you to install, upgrade and remove software packages in
a user friendly way.
.
Besides these basic functions the following features are provided:
* Search and filter the list of available packages
* Perform smart system upgrades
* Fix broken package dependencies
* Edit the list of used repositories (sources.list)
* Download the latest changelog of a package
* Configure packages through the debconf system
* Browse all available documentation related to a package (dwww is required)
Description-md5: d4fb8e90c9684f1113e56123c017d85f
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: xubuntu-desktop, lubuntu-desktop, ubuntustudio-desktop

 

PERINTAH

apt-cache show mypaint

OUTPUT

Package: mypaint
Priority: optional
Section: universe/graphics
Installed-Size: 2493
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Gürkan Sengün <gurkan@phys.ethz.ch>
Architecture: i386
Version: 1.0.0-1
Depends: libc6 (>= 2.11), libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.12.0), libpng12-0 (>= 1.2.13-4), libpython2.7 (>= 2.7), libstdc++6 (>= 4.1.1), python, python-support (>= 0.90.0), python2.7, mypaint-data (>= 1.0.0-1), python-numpy, python-gtk2
Filename: pool/universe/m/mypaint/mypaint_1.0.0-1_i386.deb
Size: 642044
MD5sum: 66ed9b15ca1e42e315b7cb8b4a76434c
SHA1: 106a46774897c1608cf226ddff0d38cecba7e5fd
SHA256: c33c40128df205bd068316b0384b122e5f2be99c8e6cb39bf7762fce84dd0025
Description-en: Paint program to be used with Wacom tablets
This is a pressure sensitive Wacom tablet paint program. It comes with a large
brush collection including charcoal and ink to emulate real media, but the
highly configurable brush engine allows you to experiment with your own
brushes and with not-quite-natural painting.
Homepage: http://mypaint.intilinux.com/
Description-md5: 94081ef2551efbdb5dd0309618bcbbe4
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: ubuntustudio-graphics

KOMENTAR

  • Perhatikan kolom MD5sum, SHA1, SHA256. Itu bukti kenapa GNU/Linux aman.
  • Perhatikan kolom Depends. Itu dependensi dari sebuah paket.
  • Perhatikan tidak ada kolom status paket (terinstal/terhapus). Berarti show hanya menayangkan berkas control setiap paket.
  • Perhatikan kolom Filename. Itu path internal repositori. Path ini selalu sama di repositori di server dan negara mana pun. Path ini akan digabung dengan URL dalam sources.list yang akhirnya membentuk URL lengkap ditayangkan ketika apt-get install berlangsung.

2. Contoh Argumen showpkg

PERINTAH

apt-cache showpkg synaptic

OUTPUT

Package: synaptic
Versions:
0.75.9ubuntu1 (/var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_binary-i386_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_binary-i386_Packages
MD5: d4fb8e90c9684f1113e56123c017d85f
Description Language: en
File: /var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_i18n_Translation-en
MD5: d4fb8e90c9684f1113e56123c017d85f
Reverse Depends:
xubuntu-desktop,synaptic
ubuntustudio-desktop,synaptic
ubuntu-sugar-remix,synaptic
lubuntu-desktop,synaptic
gnome-core,synaptic
gnome-codec-install,synaptic 0.57.8
aptoncd,synaptic 0.57.7
apt-watch-gnome,synaptic
update-notifier,synaptic
update-manager,synaptic
apturl,synaptic
apt,synaptic
Dependencies:
0.75.9ubuntu1 – libapt-inst1.4 (2 0.8.0) libapt-pkg4.12 (2 0.8.16~exp12ubuntu8) libc6 (2 2.4) libept1.4.12 (0 (null)) libgcc1 (2 1:4.1.1) libgdk-pixbuf2.0-0 (2 2.22.0) libglib2.0-0 (2 2.14.0) libgtk2.0-0 (2 2.24.0) libpango1.0-0 (2 1.14.0) libstdc++6 (2 4.6) libvte9 (2 1:0.24.0) libx11-6 (0 (null)) libxapian22 (0 (null)) hicolor-icon-theme (0 (null)) dwww (0 (null)) menu (0 (null)) deborphan (0 (null)) apt-xapian-index (0 (null)) gksu (16 (null)) kdebase-bin (16 (null)) policykit-1 (0 (null)) libgtk2-perl (2 1:1.130) rarian-compat (0 (null)) software-properties-gtk (0 (null)) menu (3 2.1.11)
Provides:
0.75.9ubuntu1 –
Reverse Provides:

 

PERINTAH

apt-cache showpkg mypaint

OUTPUT

Package: mypaint
Versions:
1.0.0-1 (/var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_binary-i386_Packages)
Description Language:
File: /var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_binary-i386_Packages
MD5: 94081ef2551efbdb5dd0309618bcbbe4
Description Language: en
File: /var/lib/apt/lists/kambing.ui.ac.id_ubuntu_dists_precise_universe_i18n_Translation-en
MD5: 94081ef2551efbdb5dd0309618bcbbe4
Reverse Depends:
ubuntustudio-graphics,mypaint
Dependencies:
1.0.0-1 – libc6 (2 2.11) libgcc1 (2 1:4.1.1) libglib2.0-0 (2 2.12.0) libpng12-0 (2 1.2.13-4) libpython2.7 (2 2.7) libstdc++6 (2 4.1.1) python (0 (null)) python-support (2 0.90.0) python2.7 (0 (null)) mypaint-data (2 1.0.0-1) python-numpy (0 (null)) python-gtk2 (0 (null))
Provides:
1.0.0-1 –
Reverse Provides:

 

3. Contoh Argumen policy

PERINTAH

apt-cache policy synaptic

OUTPUT

synaptic:
Installed: 0.75.9ubuntu1
Candidate: 0.75.9ubuntu1
Version table:
*** 0.75.9ubuntu1 0
500 http://kambing.ui.ac.id/ubuntu/ precise/universe i386 Packages
100 /var/lib/dpkg/status

PERINTAH

apt-cache policy mypaint

OUTPUT

mypaint:
Installed: (none)
Candidate: 1.0.0-1
Version table:
1.0.0-1 0
500 http://kambing.ui.ac.id/ubuntu/ precise/universe i386 Packages

PERINTAH

apt-cache policy krita

OUTPUT

krita:
Installed: (none)
Candidate: 1:2.8.2-0ubuntu1~ubuntu12.04~ppa5
Version table:
1:2.8.2-0ubuntu1~ubuntu12.04~ppa5 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
1:2.4.0-0ubuntu2 0
500 http://kambing.ui.ac.id/ubuntu/ precise/main i386 Packages

PERINTAH

apt-cache policy dolphin

OUTPUT

dolphin:
Installed: 4:4.10.3-0ubuntu0.1~ubuntu12.04~ppa1
Candidate: 4:4.14.2-0ubuntu1~ubuntu12.04~ppa3
Version table:
4:4.14.2-0ubuntu1~ubuntu12.04~ppa3 0
500 http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu/ precise/main i386 Packages
*** 4:4.10.3-0ubuntu0.1~ubuntu12.04~ppa1 0
100 /var/lib/dpkg/status
4:4.8.2-0ubuntu2 0
500 http://kambing.ui.ac.id/ubuntu/ precise/main i386 Packages

KOMENTAR

  • Perhatikan kolom Versions. Di situ diperlihatkan pada berkas database yang mana paket berada. Di situ juga ditera /var/lib/dpkg/status jika paket telah masuk ke berkas dpkg status (artinya sudah terinstal)..
  • Perhatikan kolom MD5. Itulah alasan mengapa GNU/Linux lebih aman.
  • Perhatikan kolom Reverse Depends. Di situ diperlihatkan dependensi terbalik dari paket. Yakni paket lain yang membutuhkan paket ini.
  • Perhatikan kolom Dependencies. Di situ diperlihatkan dependensi untuk paket ini.
  • Perhatikan kolom Provides. Di situ diperlihatkan nama lengkap paket untuk nama paket. Jika suatu PPA digunakan di sistem, untuk paket yang sama, akan ada minimal 2 nama lengkap paket. Satu nama paket dari repositori resmi, satu nama paket dari PPA.

4. Contoh Argumen stats

PERINTAH

apt-cache stats

OUTPUT

Total package names: 49554 (991 k)
Total package structures: 49554 (2,379 k)
Normal packages: 38189
Pure virtual packages: 470
Single virtual packages: 3584
Mixed virtual packages: 826
Missing: 6485
Total distinct versions: 40972 (2,622 k)
Total distinct descriptions: 78614 (1,887 k)
Total dependencies: 242953 (6,803 k)
Total ver/file relations: 43573 (697 k)
Total Desc/File relations: 78614 (1,258 k)
Total Provides mappings: 7010 (140 k)
Total globbed strings: 307 (3,983 )
Total dependency version space: 1,168 k
Total slack space: 90.5 k
Total space accounted for: 12.7 M

KOMENTAR

  • Perhatikan kolom Total package names. Itulah seluruh jumlah paket dari repositori yang terpasang di sistem. Artinya, jika totalnya 49554 maka ada sekitar 49.000 paket yang bisa diinstal di Ubuntu
  • Perhatikan kolom Total dependencies. Jumlahnya bisa 4 kali lipat jumlah total paket.

5. Contoh Argumen depends

PERINTAH

apt-cache depends synaptic

OUTPUT

synaptic
Depends: libapt-inst1.4
Depends: libapt-pkg4.12
Depends: libc6
Depends: libept1.4.12
Depends: libgcc1
Depends: libgdk-pixbuf2.0-0
Depends: libglib2.0-0
Depends: libgtk2.0-0
Depends: libpango1.0-0
Depends: libstdc++6
Depends: libvte9
Depends: libx11-6
Depends: libxapian22
Depends: hicolor-icon-theme
Suggests: dwww
Suggests: menu
Suggests: deborphan
Suggests: apt-xapian-index
|Recommends: gksu
|Recommends: kdebase-bin
Recommends: policykit-1
Recommends: libgtk2-perl
Recommends: rarian-compat
Recommends: software-properties-gtk
Conflicts: menu

PERINTAH

apt-cache depends mypaint

OUTPUT

mypaint
Depends: libc6
Depends: libgcc1
Depends: libglib2.0-0
Depends: libpng12-0
Depends: libpython2.7
Depends: libstdc++6
Depends: python
Depends: python-support
Depends: python2.7
Depends: mypaint-data
Depends: python-numpy
Depends: python-gtk2

KOMENTAR

  • Perhatikan kolom Depends. Itulah paket dependensi yang dibutuhkan oleh paket ini.

6. Contoh Argumen rdepends

PERINTAH

apt-cache rdepends synaptic

OUTPUT

synaptic
Reverse Depends:
xubuntu-desktop
ubuntustudio-desktop
ubuntu-sugar-remix
lubuntu-desktop
gnome-core
gnome-codec-install
aptoncd
|apt-watch-gnome
update-notifier
update-manager
apturl
|apt

PERINTAH

apt-cache rdepends mypaint

OUTPUT

mypaint
Reverse Depends:
ubuntustudio-graphics

KOMENTAR

  • Perhatikan kolom Reverse Depends. Itulah paket yang membutuhkan paket ini.

7. Contoh Argumen pkgnames

PERINTAH

apt-cache pkgnames > /tmp/list.txt && wc -l /tmp/list.txt

OUTPUT

39015 /tmp/list.txt

PERINTAH

cat /tmp/list.txt | grep mypaint

OUTPUT

mypaint-data
mypaint

Iklan

One thought on “Sistem Manajemen Paket 1: Menengok Kegunaan apt-cache

Dilarang menggunakan emotikon

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s