diff options
author | Daniel Burrows <dburrows@debian.org> | 2007-07-08 10:26:59 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2007-07-08 10:26:59 -0700 |
commit | 3e7c190b7a1cc393980ae77e9aa7881e83c4723c (patch) | |
tree | c6c8a95830b80424838a0f7692cea1b89c3153d6 /aptitude-create-state-bundle | |
parent | 435233b9835c7e8986bd16c6c4d598c3df97ecc0 (diff) | |
download | aptitude-3e7c190b7a1cc393980ae77e9aa7881e83c4723c.tar.gz |
Add two utility scripts to the package that codify the process of snapshotting the state and running with a state snapshot.
Diffstat (limited to 'aptitude-create-state-bundle')
-rwxr-xr-x | aptitude-create-state-bundle | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/aptitude-create-state-bundle b/aptitude-create-state-bundle new file mode 100755 index 00000000..44ba62c7 --- /dev/null +++ b/aptitude-create-state-bundle @@ -0,0 +1,43 @@ +#!/bin/bash + +HELP=0 +PRINT_INPUTS=0 + +DONE=0 +while [ $DONE = 0 ] +do + case "$1" in + --print-inputs ) + PRINT_INPUTS=1 + shift + ;; + --help ) + HELP=1 + shift + ;; + * ) + DONE=1 + ;; + esac +done + +if [ "$#" -ne 1 ] || [ $HELP = 1 ] +then + echo "Usage: $0 [options ... ] <output-file>" + echo + echo "This script will collect the copious information needed to" + echo "reproduce an aptitude bug, storing it in the given output file." + echo + echo "Options:" + echo " --help Print this message, then exit." + echo " --print-inputs Display the list of files and directories" + echo " that would be included in the bundle, then exit." + + exit 1 +fi + + + +OUTFILE="$1" + +(cd / && tar c ./$HOME/.aptitude ./var/lib/aptitude ./var/lib/apt ./var/cache/apt/*.bin ./etc/apt ./var/lib/dpkg/status) | gzip -c > "$OUTFILE" |