summaryrefslogtreecommitdiffstats
path: root/lsinitcpio
AgeCommit message (Collapse)AuthorFilesLines
2012-10-25lsinitcpio: Add -V/--version option to display versionEric Bélanger1-2/+12
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com>
2012-10-07commit to some level of style in variable namingDave Reisner1-56/+53
This is an ugly patch, and probably does more than I'd like it to. The idea is that mkinitcpio adopts some sort of consistent style which I'm actually happy with. I define 3 kinds of variables: 1) local variables: all lower case, and scoped within functions. Use freely, as they're well contained. 2) global variables: these are known to mkinitcpio internally, but are global in scope. They mainly carry runtime configuration and collected data during the image generation process. These are always lower case, but carry a leading underscore to denote that they're global. 3) "API" variables: also global in scope, but exist "outside" of mkinitcpio -- either drawn in from the configuration file, or "exported" to the install hooks. These are always all upper case. When introducing new variables, extreme care must be taken to pick names that will not conflict with the environment inherited by mkinitcpio. A HACKING file is introduced with a similar description of the above, and more. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-09-30lsinitcpio: add -l, --list option; define as defaultDave Reisner1-5/+18
This is the default action for lsinitcpio. Add it just for the purpose of clarity. This change also separates out true options from 'actions' and validates that the user only passed a single action to lsinitcpio. Update the manpage accordingly. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-09-30lsinitcpio: add -c, --config option to dump configDave Reisner1-3/+9
Now that mkinitcpio stores the build time config file in the image, we should have a way of easily getting it back out. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-09-30lsinitcpio: move image analysis to separate functionDave Reisner1-66/+70
git (at least version 1.7.12.1) does a great job of showing the absolute wrong code moving around in this patch. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-15lsinitcpio: comment on why bsdtar alone isn't good enoughDave Reisner1-1/+3
I almost deleted this, replacing it with only bsdtar. Add a comment so I'm not tempted to do this again. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-08lsinitcpio: show only regular files as binaries0.9.2Dave Reisner1-2/+1
Show only regular files in /usr/bin instead of everything (including the mess of symlinks to busybox and kmod). It's also a nice to have since we're showing more about the multiple hook points now. This mostly restores the behavior prior to f7b8a6f0fd. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18lsinitcpio: Always show extraction timeDave Reisner1-2/+2
Even for uncompressed images, estimate the work being done to extract to ramfs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18lsinitcpio: add support for listing new hooksDave Reisner1-21/+20
Read this out of the image config for -a output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-18lsinitcpio: extract the image to a tempdirDave Reisner1-18/+45
We read the image a number of times. Extract the image to a temp directory so we can just extract it once and use the filesystem to our advantage. This requires a temp dir which we can nuke on an EXIT trap, but the whole operation is sped is a bit, especially for larger images. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-02lsinitcpio: fallback on 80 cols when tput failsDave Reisner1-0/+3
This only happens when the terminfo file is missing, but its a simple fix. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: avoid exiting from usageDave Reisner1-4/+4
Print a more helpful message when no image is specified. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: show file sizes in analyze outputDave Reisner1-3/+28
Always display the file size on disk, but also display the uncompressed size for compressed images. Borrows my own size_to_human function from paccache and elsewhere. Before: ==> Compressed with: gzip -> Compression ratio: .377 -> Estimated decompression time: 0.058s After: ==> Size: 2.67 MiB ==> Compressed with: gzip -> Uncompressed size: 7.07 MiB (.377 ratio) -> Estimated decompression time: 0.059s Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-04-22lsinitcpio: adopt parseopts for option parsingDave Reisner1-15/+31
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-20lsinitcpio: trim binaries during discoveryDave Reisner1-3/+3
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-02-20lsinitcpio: detect kver separate from modulesDave Reisner1-6/+4
mkinitcpio will always create /lib/modules/$kernver/kernel in the image, so we can use this to detect the kernel the image was built for, even if the image contains no modules. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-26lsinitcpio: remove duplicate in_array functionDave Reisner1-9/+0
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-16lsinitcpio: cleanup binary displayDave Reisner1-1/+1
- trim leading paths from all binaries - sort alphabetically - add same trailing indent as the module display Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-12-05lsinitcpio: read VERSION stamp out of image fileDave Reisner1-1/+4
Report this version on -a if it's found. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-11-29lsinitcpio: columnize binaries outputDave Reisner1-3/+3
Now that we're including symlinks to busybox on the prebuilt image, this display needs a bit of tidying up. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: follow symlinks only when necessaryDave Reisner1-2/+4
If the image we're pointing to is a symlink, show the resolution as part of the name in -a's output. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-10-01lsinitcpio: disable color when stdout isn't a ttyDave Reisner1-1/+1
This was a copypasta error when taking this from makepkg, which has special concerns in this regard. lsinitcpio should only concern itself with stdout. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-05lsinitcpio: fix logical error in reading compression0.7.2Dave Reisner1-1/+1
2011-07-01lsinitcpio: add optional colorized outputDave Reisner1-16/+43
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-07-01lsinitcpio: append, not overwrite found hooksDave Reisner1-1/+1
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2011-06-16lsinitcpio: new utility to dump contents of imagesDave Reisner1-0/+138
Signed-off-by: Dave Reisner <d@falconindy.com>