-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
cabal get --only-package-description
(#8263)
With this option, 'cabal get' writes to the destination directory only the package description already available locally in one of the repository indices. The basename of the file name written to inside the target directory is the package-id rather than only the package name. This is mostly based on #1977 Co-authored-by: Miëtek Bak <mietek@bak.io> Co-authored-by: Artem Pelenitsyn <a.pelenitsyn@gmail.com> Co-authored-by: Herbert Valerio Riedel <hvr@gnu.org> Co-authored-by: Miëtek Bak <mietek@bak.io>
- Loading branch information
1 parent
0c4d048
commit da68c28
Showing
8 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# cabal v2-update | ||
Downloading the latest package list from test-local-repo | ||
# cabal update | ||
Downloading the latest package list from test-local-repo | ||
# cabal get | ||
Writing package description to criterion-1.1.4.0.cabal |
11 changes: 11 additions & 0 deletions
11
cabal-testsuite/PackageTests/Get/OnlyDescription/cabal.test.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- 2022-07-03, issue #1954 | ||
-- | ||
-- Purpose of this test: | ||
-- Make sure that `cabal get --only-package-description` works | ||
|
||
import Test.Cabal.Prelude | ||
main = cabalTest $ withRepo "repo" $ do | ||
cabal "update" [] | ||
cabal | ||
"get" | ||
[ "criterion", "--only-package-description" ] |
8 changes: 8 additions & 0 deletions
8
cabal-testsuite/PackageTests/Get/OnlyDescription/repo/criterion-1.1.4.0/criterion.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: criterion | ||
version: 1.1.4.0 | ||
build-type: Simple | ||
cabal-version: >= 1.10 | ||
|
||
library | ||
build-depends: base, ghc-prim | ||
default-language: Haskell2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
synopsis: Add `cabal get --only-package-description` | ||
packages: cabal-install | ||
prs: #1977 #5162 #8263 | ||
issues: #1954 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
synopsis: `cabal haddock` now implies `--enable-documentation` | ||
packages: Cabal | ||
issues: #1919 | ||
prs: #7827 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters