diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-03 10:38:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-03 10:38:08 -0400 |
commit | 94b7c09a14f4f554fda6fc2c7fce65d64246344a (patch) | |
tree | 07950c656b4d544cb9074239435a3c24bf5d622d | |
parent | 3a19893f0041eb716cdc3eb61278d17eebd49839 (diff) |
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.
-rw-r--r-- | Build/DesktopFile.hs | 6 | ||||
-rw-r--r-- | Setup.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 8 |
3 files changed, 15 insertions, 1 deletions
diff --git a/Build/DesktopFile.hs b/Build/DesktopFile.hs index 9d68ff1d9..cb5a47b69 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 () + ) @@ -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 fed1f76a6..2f6b9e9df 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 <id@joeyh.name> Tue, 03 Nov 2015 10:36:43 -0400 + git-annex (5.20151102) unstable; urgency=medium * Use statvfs on OSX. |