Skip to content

Instantly share code, notes, and snippets.

@ryotarai
Last active December 18, 2015 04:59
Show Gist options
  • Save ryotarai/5729755 to your computer and use it in GitHub Desktop.
Save ryotarai/5729755 to your computer and use it in GitHub Desktop.
log for serverspec PR#138 about check_installed

on Debian Squeeze

vagrant@debian-607-x64-vbox4210:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package `tree' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
vagrant@debian-607-x64-vbox4210:~$ echo $?
1
vagrant@debian-607-x64-vbox4210:~$ sudo apt-get install tree
vagrant@debian-607-x64-vbox4210:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package: tree
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 96
Maintainer: Florian Ernst <florian@debian.org>
Architecture: amd64
Version: 1.5.3-1
Depends: libc6 (>= 2.3)
Description: displays directory tree, in color
 Displays an indented directory tree, using the same color assignments as
 ls, via the LS_COLORS environment variable.
Homepage: http://mama.indstate.edu/users/ice/tree/
vagrant@debian-607-x64-vbox4210:~$ echo $?
0
vagrant@debian-607-x64-vbox4210:~$ sudo apt-get purge tree
vagrant@debian-607-x64-vbox4210:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package: tree
Status: unknown ok not-installed
Priority: optional
Section: utils
Status: unknown ok not-installed
vagrant@debian-607-x64-vbox4210:~$ echo $?
1

on Ubuntu Precise

vagrant@precise64:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package `tree' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
vagrant@precise64:~$ echo $?
1
vagrant@precise64:~$ sudo apt-get install tree
vagrant@precise64:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package: tree
Status: install ok installed
Priority: optional
Section: utils
Installed-Size: 100
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 1.5.3-2
Depends: libc6 (>= 2.4)
Description: displays directory tree, in color
 Displays an indented directory tree, using the same color assignments as
 ls, via the LS_COLORS environment variable.
Original-Maintainer: Florian Ernst <florian@debian.org>
Homepage: http://mama.indstate.edu/users/ice/tree/
vagrant@precise64:~$ echo $?
0
vagrant@precise64:~$ sudo apt-get purge tree
vagrant@precise64:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package `tree' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
vagrant@precise64:~$ echo $?
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment