packages feed

clean-home 0.0.3 → 0.0.4

raw patch · 7 files changed

+154/−88 lines, 7 filesdep ~base

Dependency ranges changed: base

Files

clean-home.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version:             0.0.3+Version:             0.0.4  -- A short (one-line) description of the package. Synopsis:            Keep your home dir clean by finding old conf files@@ -54,7 +54,7 @@   ghc-options: -Wall      -- Packages needed in order to build this package.-  Build-depends: base       >= 4 && <= 5+  Build-depends: base       >= 4 && < 5                , cmdargs    >= 0.9                , HSH        >= 2.0                , directory@@ -63,6 +63,7 @@      -- Modules not exported by this package.   Other-modules: SearchCommand.Apt+               , SearchCommand.FindExecutable                , SearchCommand.Which                , SearchCommand.UserSet                , SearchCommands@@ -76,4 +77,4 @@    source-repository head   type:     git-  location: http://github.com/ivanperez-keera/clean-home+  location: git://github.com/ivanperez-keera/clean-home.git
data/PkgList view
@@ -1,46 +1,80 @@-[ (".cabal",           [ "cabal", "cabal-install" ])-, (".emacs",           [ "emacs", "emacs21", "emacs22", "emacs23" ]) -, (".emacs.d",         [ "emacs", "emacs21", "emacs22", "emacs23"])-, (".mozilla",         [ "firefox", "iceweasel"       ])-, (".lftp",            [ "lftp"                       ])-, (".mission-control", [ "mission-control"            ])-, (".viminfo",         [ "vim", "vim-gnome"           ])-, (".vim",             [ "vim", "vim-gnome"           ])-, (".vimrc",           [ "vim", "vim-gnome"           ])-, (".wine",            [ "wine", "wine1.2", "wine1.3" ])-, (".eclipse",         [ "eclipse"                    ])-, (".kde",             [ "kde"                        ])-, (".libreoffice",     [ "libreoffice"                ])-, (".openoffice.org",  [ "openoffice"                 ])-, (".VirtualBox",      [ "virtualbox-ose"             ])-, (".ssh",             [ "openssh-client"             ])-, (".xmind",           [ "xmind"                      ])-, (".gSTM",            [ "gstm"                       ])-, (".bashrc",          [ "bash"                       ])-, (".bash_logout",     [ "bash"                       ])-, (".bash_profile",    [ "bash"                       ])-, (".bash_history",    [ "bash"                       ])-, (".gimp-2.6",        [ "gimp"                       ])-, (".hgrc",            [ "mercurial"                  ])-, (".gconfd",          [ "gconf2"                     ])-, (".subversion",      [ "subversion"                 ])-, (".lyx",             [ "lyx"                        ])-, (".thunderbird",     [ "thunderbird"                ])-, (".xine",            [ "xine-ui"                    ])-, (".lesshst",         [ "less"                       ])-, (".gitconfig",       [ "git"                        ])-, (".Skype",           [ "skype"                      ])-, (".gem",             [ "rubygems"                   ])-, (".mplayer",         [ "mplayer"                    ])-, (".aptitude",        [ "aptitude"                   ])-, (".sqlite_history",  [ "sqlite3"                    ])-, (".shotwell",        [ "shotwell"                   ])-, (".ghc",             [ "ghc"                        ])-, (".gvfs",            [ "gvfs"                       ])-, (".mysql_history",   [ "mysql-client"               ])-, (".audacity-data",   [ "audacity"                   ])-, (".xournal",         [ "xournal"                    ])-, (".qtstalker",       [ "qtstalker"                  ])-, (".icedteaplugin",   [ "icedtea-plugin"             ])-, (".gnupg",           [ "gnupg"                      ])+[ (".adobe",                    [ "flashplugin-installer"      ])+, (".aptitude",                 [ "aptitude"                   ])+, (".audacity-data",            [ "audacity"                   ])+, (".bash_history",             [ "bash"                       ])+, (".bash_logout",              [ "bash"                       ])+, (".bash_profile",             [ "bash"                       ])+, (".bashrc",                   [ "bash"                       ])+, (".cabal",                    [ "cabal", "cabal-install"     ])+, (".cache",                    [ "xdg-user-dirs"              ])+, (".compiz1",                  [ "compiz-core"                ])+, (".compiz",                   [ "compiz-core"                ])+, (".config",                   [ "xdg-user-dirs"              ])+, (".dbus",                     [ "dbus"                       ])+, (".dmrc",                     [ "x-display-manager"          ])+, (".eclipse",                  [ "eclipse"                    ])+, (".emacs.d",                  [ "emacs", "emacs21", "emacs22", "emacs23"])+, (".emacs",                    [ "emacs", "emacs21", "emacs22", "emacs23" ]) +, (".esd_auth",                 [ "libesd0"                    ])+, (".fontconfig",               [ "libfontconfig1"             ])+, (".gconfd",                   [ "gconf2"                     ])+, (".gconf",                    [ "libgconf2-4"                ])+, (".gegl-0.0",                 [ "libgegl-0.0-0"              ])+, (".gem",                      [ "rubygems"                   ])+, (".ghc",                      [ "ghc"                        ])+, (".gimp-2.6",                 [ "gimp"                       ])+, (".gitconfig",                [ "git"                        ])+, (".gksu.lock",                [ "gksu"                       ])+, (".gnome2",                   [ "libgnome2-0"                ])+, (".gnome2_private",           [ "libgnome2-0"                ])+, (".gnupg",                    [ "gnupg"                      ])+, (".gSTM",                     [ "gstm"                       ])+, (".gstreamer-0.10",           [ "libgstreamer0.10-0"         ])+, (".gtk-bookmarks",            [ "nautilus"                   ])+, (".gtkrc-2.0-kde4",           [ "kde-config-gtk"             ])+, (".gvfs",                     [ "gvfs"                       ])+, (".hgrc",                     [ "mercurial"                  ])+, (".icedtea",                  [ "icedtea-6-jre-cacao", "icedtea-6-jre-jamvm" ])+, (".icedteaplugin",            [ "icedtea-plugin"             ])+, (".icons",                    [ "systemsettings"             ])+, (".inputrc",                  [ "libreadline6"               ])+, (".kchmviewer",               [ "kchmviewer"                 ])+, (".kde",                      [ "libkdecore5"                ])+, (".kderc",                    [ "libkdecore5"                ])+, (".lesshst",                  [ "less"                       ])+, (".lftp",                     [ "lftp"                       ])+, (".libreoffice",              [ "libreoffice"                ])+, (".lyx",                      [ "lyx"                        ])+, (".macromedia",               [ "flashplugin-installer"      ])+, (".mission-control",          [ "mission-control"            ])+, (".mozilla",                  [ "firefox", "iceweasel"       ])+, (".mplayer",                  [ "mplayer"                    ])+, (".mysql_history",            [ "mysql-client"               ])+, (".nvidia-settings-rc",       [ "nvidia-settings"            ])+, (".openoffice.org",           [ "openoffice"                 ])+, (".profile",                  [ "sh", "bash"                 ])+, (".pulse-cookie",             [ "libpulse0"                  ])+, (".pulse",                    [ "libpulse0"                  ])+, (".purple",                   [ "libpurple0"                 ])+, (".qtstalker",                [ "qtstalker"                  ])+, (".shotwell",                 [ "shotwell"                   ])+, (".Skype",                    [ "skype"                      ])+, (".speech-dispatcher",        [ "speech-dispatcher"          ])+, (".sqlite_history",           [ "sqlite3"                    ])+, (".ssh",                      [ "openssh-client"             ])+, (".subversion",               [ "subversion"                 ])+, (".sudo_as_admin_successful", [ "sudo"                       ])+, (".thumbnails",               [ "libkio5"                    ])+, (".thunderbird",              [ "thunderbird"                ])+, (".viminfo",                  [ "vim", "vim-gnome"           ])+, (".vimrc",                    [ "vim", "vim-gnome"           ])+, (".vim",                      [ "vim", "vim-gnome"           ])+, (".VirtualBox",               [ "virtualbox-ose"             ])+, (".wine",                     [ "wine", "wine1.2", "wine1.3" ])+, (".Xauthority",               [ "xserver-xorg-core"          ])+, (".xbmc",                     [ "xbmc"                       ])+, (".xine",                     [ "xine-ui"                    ])+, (".xmind",                    [ "xmind"                      ])+, (".xournal",                  [ "xournal"                    ])+, (".xsession-errors",          [ "xserver-xorg-core"          ]) ]
data/PrgList view
@@ -1,47 +1,55 @@-[ (".cabal",           [ "cabal", "cabal-install" ])-, (".emacs",           [ "emacs", "emacs21", "emacs22", "emacs23" ]) +[ (".aptitude",        [ "aptitude"                   ])+, (".arduino",         [ "arduino"                    ])+, (".audacity-data",   [ "audacity"                   ])+, (".bash_history",    [ "bash"                       ])+, (".bash_logout",     [ "bash"                       ])+, (".bash_profile",    [ "bash"                       ])+, (".bashrc",          [ "bash"                       ])+, (".cabal",           [ "cabal", "cabal-install"     ])+, (".cache",           [ "xdg-user-dirs-update"       ])+, (".config",          [ "xdg-user-dirs-update"       ])+, (".diamondcard-sms", [ "keera-diamondcard-sms-trayicon" ])+, (".dmrc",            [ "gdm", "kdm"                 ])+, (".eclipse",         [ "eclipse"                    ]) , (".emacs.d",         [ "emacs", "emacs21", "emacs22", "emacs23"])+, (".emacs",           [ "emacs", "emacs21", "emacs22", "emacs23" ]) +, (".gconfd",          [ "gconf2"                     ])+, (".gem",             [ "rubygems"                   ])+, (".ghc",             [ "ghc"                        ])+, (".gimp-2.6",        [ "gimp"                       ])+, (".gitconfig",       [ "git"                        ])+, (".gnupg",           [ "gnupg"                      ])+, (".gSTM",            [ "gstm"                       ])+, (".gvfs",            [ "gvfs"                       ])+, (".hgrc",            [ "mercurial"                  ])+, (".icedteaplugin",   [ "icedtea-plugin"             ])+, (".icons",           [ "systemsettings"             ])+, (".kde",             [ "kde"                        ])+, (".lesshst",         [ "less"                       ]) , (".lftp",            [ "lftp"                       ])+, (".libreoffice",     [ "libreoffice"                ])+, (".lyx",             [ "lyx"                        ]) , (".mission-control", [ "mission-control"            ]) , (".mozilla",         [ "firefox", "iceweasel"       ])-, (".viminfo",         [ "vim", "gvim"                ])-, (".diamondcard-sms", [ "keera-diamondcard-sms-trayicon"])-, (".vim",             [ "vim", "gvim"                ])-, (".vimrc",           [ "vim", "gvim"                ])-, (".wine",            [ "wine"                       ])-, (".eclipse",         [ "eclipse"                    ])-, (".kde",             [ "kde"                        ])-, (".libreoffice",     [ "libreoffice"                ])+, (".mplayer",         [ "mplayer"                    ])+, (".mysql_history",   [ "mysql-client"               ]) , (".openoffice.org",  [ "openoffice"                 ])-, (".VirtualBox",      [ "virtualbox-ose"             ])+, (".profile",         [ "sh", "bash"                 ])+, (".qtstalker",       [ "qtstalker"                  ])+, (".shotwell",        [ "shotwell"                   ])+, (".Skype",           [ "skype"                      ])+, (".sqlite_history",  [ "sqlite3"                    ]) , (".ssh",             [ "openssh-client"             ])-, (".xmind",           [ "xmind"                      ])-, (".gSTM",            [ "gstm"                       ])-, (".bashrc",          [ "bash"                       ])-, (".bash_logout",     [ "bash"                       ])-, (".bash_profile",    [ "bash"                       ])-, (".bash_history",    [ "bash"                       ])-, (".gimp-2.6",        [ "gimp"                       ])-, (".hgrc",            [ "mercurial"                  ])-, (".gconfd",          [ "gconf2"                     ]) , (".subversion",      [ "subversion"                 ])-, (".lyx",             [ "lyx"                        ]) , (".thunderbird",     [ "thunderbird"                ])+, (".viminfo",         [ "vim", "gvim"                ])+, (".vimrc",           [ "vim", "gvim"                ])+, (".vim",             [ "vim", "gvim"                ])+, (".VirtualBox",      [ "virtualbox-ose"             ])+, (".wine",            [ "wine"                       ])+, (".Xauthority",      [ "startx"                     ]) , (".xine",            [ "xine"                       ])-, (".lesshst",         [ "less"                       ])-, (".gitconfig",       [ "git"                        ])-, (".Skype",           [ "skype"                      ])-, (".gem",             [ "rubygems"                   ])-, (".mplayer",         [ "mplayer"                    ])-, (".aptitude",        [ "aptitude"                   ])-, (".sqlite_history",  [ "sqlite3"                    ])-, (".shotwell",        [ "shotwell"                   ])-, (".ghc",             [ "ghc"                        ])-, (".gvfs",            [ "gvfs"                       ])-, (".mysql_history",   [ "mysql-client"               ])-, (".audacity-data",   [ "audacity"                   ])+, (".xmind",           [ "xmind"                      ]) , (".xournal",         [ "xournal"                    ])-, (".qtstalker",       [ "qtstalker"                  ])-, (".icedteaplugin",   [ "icedtea-plugin"             ])-, (".gnupg",           [ "gnupg"                      ])+, (".xsession-errors", [ "startx"                     ]) ]
src/Args.hs view
@@ -63,7 +63,7 @@  &= help "Use program exit code to determine package presence"    }- &= summary "clean-home 0.0.3"+ &= summary "clean-home 0.0.4"  &= details [ "(c) 2012 Ivan Perez - Keera Studios"             , "Find more about clean-home at http://keera.es"             , "and http://github.com/ivanperez-keera/clean-home"
src/Env.hs view
@@ -1,4 +1,8 @@-module Env where+module Env+   ( module Env+   , module Args+   )+  where  import Control.Monad import Control.Exception as E
+ src/SearchCommand/FindExecutable.hs view
@@ -0,0 +1,18 @@+module SearchCommand.FindExecutable where++-- External imports+import Control.Monad+import Data.Maybe+import System.Directory++-- Local imports+import Env+import System.Err++findExecutableSearch :: ConfigSearchCmd+findExecutableSearch env fp prg = do+    prgfp <- findExecutable prg+    let notOrphan = isJust prgfp+    when (notOrphan && showNotOrphan (appArgs env)) $+      putErrLn $ prg ++ " might be responsible for " ++ fp+    return $ Right notOrphan
src/SearchCommands.hs view
@@ -4,7 +4,8 @@ import Args import Env import SearchCommand.Apt-import SearchCommand.Which+-- import SearchCommand.Which+import SearchCommand.FindExecutable import SearchCommand.UserSet  -- FIXME: The problem is here@@ -14,4 +15,4 @@   | otherwise                          = userSetSearch env fp pkg  checkProgram :: ConfigSearchCmd-checkProgram = whichSearch+checkProgram = findExecutableSearch