packages feed

hackport 0.6.1 → 0.6.2

raw patch · 4 files changed

+26/−21 lines, 4 files

Files

Error.hs view
@@ -51,9 +51,9 @@     ExtractionFailed tarball file code -> "Extracting '"++file++"' from '"++tarball++"' failed with '"++show code++"'"     CabalParseFailed file reason -> "Error while parsing cabal file '"++file++"': "++reason     BashNotFound -> "The 'bash' executable was not found. It is required to figure out your portage-overlay. If you don't want to install bash, use '-p path-to-overlay'"-    BashError str -> "Error while guessing your portage-overlay. Either set PORTDIR_OVERLAY in /etc/make.conf or use '-p path-to-overlay'.\nThe error was: \""++str++"\""+    BashError str -> "Error while guessing your repository's location. Either set a repository 'haskell' in '/etc/portage/repos.conf' or use '-p path-to-overlay'.\nThe error was: \""++str++"\""     MultipleOverlays overlays -> "You have the following overlays available: '"++unwords overlays++"'. Please choose one by using 'hackport -p path-to-overlay' <command>"-    NoOverlay -> "You don't have PORTDIR_OVERLAY set in '/etc/make.conf'. Please set it or use '-p path-to-overlay'"+    NoOverlay -> "Unable to find a repository 'haskell'. Consider defining it in '/etc/portage/repos.conf' and verify '~/.hackport/repositories' (in overlay_list) or use '-p path-to-overlay'"     UnknownVerbosityLevel str -> "The verbosity level '"++str++"' is invalid. Please use debug,normal or silent"     InvalidServer srv -> "Invalid server address, could not parse: " ++ srv     --WrongCacheVersion -> "The version of the cache is too old. Please update the cache using 'hackport update'"
Portage/EBuild.hs view
@@ -84,10 +84,10 @@   case my_pn e of     -- use standard address given that the package name has no upper     -- characters-    Nothing -> "http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"+    Nothing -> "https://hackage.haskell.org/package/${P}/${P}.tar.gz"     -- use MY_X variables (defined in showEBuild) as we've renamed the     -- package-    Just _  -> "http://hackage.haskell.org/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"+    Just _  -> "https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz"  showEBuild :: TC.UTCTime -> EBuild -> String showEBuild now ebuild =@@ -108,7 +108,7 @@                 ss "MY_P=". quote "${MY_PN}-${PV}". nl. nl).   ss "DESCRIPTION=". quote (drop_tdot $ description ebuild). nl.   ss "HOMEPAGE=". quote (toHttps $ expandVars (homepage ebuild)). nl.-  ss "SRC_URI=". quote (toMirror $ src_uri ebuild). nl.+  ss "SRC_URI=". quote (src_uri ebuild). nl.   nl.   ss "LICENSE=". (either (\err -> quote "" . ss ("\t# FIXME: " ++ err))                          quote@@ -136,7 +136,6 @@         expandVars = replaceMultiVars [ (        name ebuild, "${PN}")                                       , (hackage_name ebuild, "${HACKAGE_N}")                                       ]-        toMirror = replace "http://hackage.haskell.org/" "mirror://hackage/"         -- TODO: this needs to be more generic         toHttps  = replace "http://github.com/" "https://github.com/"         this_year :: String
Portage/Host.hs view
@@ -30,7 +30,7 @@ getInfo = fromJust `fmap`     performMaybes [ readConfig                   , performMaybes [ getPaludisInfo-                                  , fmap parse_emerge_output <$> (run_cmd "emerge --info")+                                  , askPortageq                                   , return (Just defaultInfo)                                   ] >>= showAnnoyingWarning                   ]@@ -103,16 +103,22 @@ -- Emerge --------- -parse_emerge_output :: String -> LocalInfo-parse_emerge_output raw_data =-    foldl updateInfo defaultInfo $ lines raw_data-    where updateInfo info str =-              case (break (== '=') str) of-                  ("DISTDIR", '=':value)-                      -> info{distfiles_dir = unquote value}-                  ("PORTDIR", '=':value)-                      -> info{portage_dir = unquote value}-                  ("PORTDIR_OVERLAY", '=':value)-                      -> info{overlay_list = words $ unquote value}-                  _   -> info-          unquote = init . tail+askPortageq :: IO (Maybe LocalInfo)+askPortageq = do+    distdir <- run_cmd "portageq distdir"+    portdir <- run_cmd "portageq get_repo_path / gentoo"+    hsRepo  <- run_cmd "portageq get_repo_path / haskell"+    --There really ought to be both distdir and portdir,+    --but maybe no hsRepo defined yet.+    let info = if any (==Nothing) [distdir,portdir]+               then Nothing+               else Just LocalInfo+                      { distfiles_dir = grab distdir+                      , portage_dir = grab portdir+                      , overlay_list = iffy hsRepo+                      }+                 --init: kill newline char+                 where grab = init . fromJust+                       iffy Nothing     = []+                       iffy (Just repo) = [init repo]+    return info
hackport.cabal view
@@ -1,5 +1,5 @@ Name:           hackport-Version:        0.6.1+Version:        0.6.2 License:        GPL License-file:   LICENSE Author:         Henning Günther, Duncan Coutts, Lennart Kolmodin