summaryrefslogtreecommitdiff
path: root/public/pacman-overview.md
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 13:47:42 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 13:47:42 -0400
commit6a42c8de66e3b2dc7293ddeadaa3ee396db2624d (patch)
tree67a027b892d3122662526504dd6d11e8dea02ca1 /public/pacman-overview.md
initial commit
Diffstat (limited to 'public/pacman-overview.md')
-rw-r--r--public/pacman-overview.md48
1 files changed, 48 insertions, 0 deletions
diff --git a/public/pacman-overview.md b/public/pacman-overview.md
new file mode 100644
index 0000000..579adba
--- /dev/null
+++ b/public/pacman-overview.md
@@ -0,0 +1,48 @@
+A quick overview of usage of the Pacaman package manager
+========================================================
+:copyright 2013 Luke Shumaker
+
+This was originally published on [Hacker News][1] on 2013-01-23.
+
+[1]: https://news.ycombinator.com/item?id=5101416
+
+Note: I've over-done quotation marks to make it clear when precise
+wording matters.
+
+`pacman` is a little awkward, but I prefer it to apt/dpkg, which have
+sub-commands, each with their own flags, some of which are
+undocumented. pacman, on the other hand, has ALL options documented in
+one fairly short man page.
+
+The trick to understanding pacman is to understand how it maintains
+databases of packages, and what it means to "sync".
+
+There are several "databases" that pacman deals with:
+
+ * "the database", (`/var/lib/pacman/local/`)<br>
+ The database of currently installed packages
+ * "package databases", (`/var/lib/pacman/sync/${repo}.db`)<br>
+ There is one of these for each repository. It is a file
+ that is fetched over plain http(s) from the server; it
+ is not modified locally, only updated.
+
+The "operation" of pacman is set with a capital flag, one of "DQRSTU"
+(plus `-V` and `-h` for version and help). Of these, "DTU" are "low-level"
+(analogous to dpkg) and "QRS" are "high-level" (analogous to apt).
+
+To give a brief explanation of cover the "high-level" operations, and
+which databases they deal with:
+
+ * "Q" Queries "the database" of locally installed packages.
+
+ * "S" deals with "package databases", and Syncing "the database" with
+ them; meaning it installs/updates packages that are in package
+ databases, but not installed on the local system.
+
+ * "R" Removes packages "the database"; removing them from the local
+ system.
+
+The biggest "gotcha" is that "S" deals with all operations with
+"package databases", not just syncing "the database" with them.
+
+