[Hackage] #297: cabal fetch command don't fetch packages those have already been installed

#297: cabal fetch command don't fetch packages those have already been installed ---------------------------------+------------------------------------------ Reporter: chylli | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ---------------------------------+------------------------------------------ when I saw cabal help: fetch Downloads packages for later installation or study. I think I can fetch any packages to study. But in fact it not. They only download packages those have not installed yet. I think this help info can mislead users. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/297 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#297: cabal fetch command don't fetch packages those have already been installed ---------------------------------+------------------------------------------ Reporter: chylli | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * difficulty: normal => easy (<4 hours) * milestone: => Cabal-1.4 Comment: Just need to call the the dep analysis in a different environment. Remove any installed versions of the packages requested from the installed package list that we pass to the dep analysis. That means it will tell us that we need to install the given packages. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/297#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#297: cabal fetch command don't fetch packages those have already been installed ---------------------------------+------------------------------------------ Reporter: chylli | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by Isaac Dupree): hang on, what is `cabal fetch` supposed to do? Fetch[*] the source of: A. the package itself? B. the package and all its dependencies? C. the package and all its uninstalled dependencies? D. currently, it is, if I'm reading the code rightly: all the package's uninstalled dependencies (including itself if it's uninstalled), which is obviously wrong. I assumed from the help description that it meant "A" above, but then why is the code doing dependency analysis at all? "B" = dep analyze with an empty set of "installed" packages, I suppose (would it be necessary to include the current "base" or similar in the installed-package-list though, since it's not on hackage?). "C" = just remove the named package from the installed-package-list (as Duncan said) -- but why would you want "C"? [*] fetch means, just make sure you have a copy of it in .cabal/packages/... -- if the source is already there then no need to download again -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/297#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#297: cabal fetch command don't fetch packages those have already been installed ---------------------------------+------------------------------------------ Reporter: chylli | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): So yes, there are two overloaded purposes here. One is to get the source of a package so you can play with it, read it etc. The other is so that you can fetch packages while your online with the intention of building them later while offline. For both cases we need at least the sources for the uninstalled dependencies since part of studying would be trying to compile and run it, which will need the deps. As for all dependencies, how far would you go? Do you really want the sources of all the core libs if you didn't happen to have those sources already? I suspect not. That's not necessary to study or build the package of interest. So actually yes, I think we do want option C since that covers both uses cases fine. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/297#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#297: cabal fetch command don't fetch packages those have already been installed ---------------------------------+------------------------------------------ Reporter: chylli | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.4 Component: cabal-install tool | Version: Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: 6.8.2 | Platform: ---------------------------------+------------------------------------------ Comment (by Isaac Dupree): okay, seems reasonable, although I suppose there could also be command- line flags to modify the behavior - at least, an option for if someone wants the sources of all dependencies that are on Hackage, even if installed, otherwise they'll be hard to get - or all packages that are not fully upgraded. For example, if you have internet connection for a short time and it'll take your computer a while to build all of them. In this case, we want the newest versions. But if you want to look at the sources, it's also likely that you'll want to look at the currently installed versions' sources :-) but ignoring those additional features: hmm, it's been a while since I looked at the Fetch code, but IIRC it looked not too hard to make the simple change to default to do C, for someone familiar with those types -- don't count the package itself as an *installed* dependency. -Isaac -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/297#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#297: cabal fetch command don't fetch packages those have already been installed
---------------------------------+------------------------------------------
Reporter: chylli | Owner:
Type: defect | Status: closed
Priority: normal | Milestone: Cabal-1.4
Component: cabal-install tool | Version:
Severity: normal | Resolution: fixed
Keywords: | Difficulty: easy (<4 hours)
Ghcversion: 6.8.2 | Platform:
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
{{{
Thu Aug 14 19:02:01 BST 2008 Duncan Coutts
participants (1)
-
Hackage