From: Joey Hess Date: Tue, 3 Nov 2015 14:38:08 +0000 (-0400) Subject: Avoid installing desktop file and program file if cabal install git-annex is run... X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~324^2~122 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0717ad4440f6a3278b89ce1250a859b534269321;p=git-annex.git Avoid installing desktop file and program file if cabal install git-annex is run as root, since that is not a systemwide install, but to /root, and so generating a systemwide desktop file is not right. --- diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs index 9d68ff1d99..cb5a47b691 100644 --- a/Build/DesktopFile.hs +++ b/Build/DesktopFile.hs @@ -79,3 +79,9 @@ install command = do createDirectoryIfMissing True (parentDir programfile) writeFile programfile command ) + +installUser :: FilePath -> IO () +installUser command = ifM systemwideInstall + ( install command + , return () + ) diff --git a/Setup.hs b/Setup.hs index f0c9fb4eb8..a3c1f1cf64 100644 --- a/Setup.hs +++ b/Setup.hs @@ -64,7 +64,7 @@ installManpages copyDest verbosity pkg lbi = installDesktopFile :: CopyDest -> Verbosity -> PackageDescription -> LocalBuildInfo -> IO () installDesktopFile copyDest _verbosity pkg lbi | progfile copyDest == progfile NoCopyDest = - DesktopFile.install (progfile copyDest) + DesktopFile.installUser (progfile copyDest) | otherwise = return () where progfile cd = bindir (absoluteInstallDirs pkg lbi cd) "git-annex" diff --git a/debian/changelog b/debian/changelog index fed1f76a62..2f6b9e9df3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +git-annex (5.20151103) UNRELEASED; urgency=medium + + * Avoid installing desktop file and program file if cabal install + git-annex is run as root, since that is not a systemwide install, + but to /root, and so generating a systemwide desktop file is not right. + + -- Joey Hess Tue, 03 Nov 2015 10:36:43 -0400 + git-annex (5.20151102) unstable; urgency=medium * Use statvfs on OSX.