[PATCH 0/7] Remove duplicated packages.

  • Done
  • quality assurance status badge
Details
3 participants
  • Leo Famulari
  • Ludovic Courtès
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 7 years ago
(address . guix-patches@gnu.org)
87k1ptehfi.fsf@cbaines.net
As part of messing up packaging Ruby on Rails, I ended up duplicating
some packages, and this prompted me to look if any duplicates made it in
to guix. I ran the following command, it produces a few false positives.

grep define-public -R | sort | uniq -d

The following patches attempt to remove the duplicates, favouring the
original package definition.

Is there any way of guarding against adding these, or more accurately
checking for duplicate definitions?
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAltOUUFfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XeoIg/+JNmlZpfD+R5tO+8xXwCEc2GMasJz7rMeJ91V2NY+0Ks9rkrZ1RaqXgxK
tLFqfhRnt3anMtE1LsJ+VqDMiujQ0gncMHsK8jJsue69oXtgbja/sM4vWNRKODp9
adHbgx779tOou9panT2nNheF5tQJjcdJ5c3+17BLE78+ok9H+cvo2KS554tPCBdT
TcgSuVLylcMpOPbg3c2XdqgVAL64ZOU41J+D2yLpRJSP8SfpBeZtWidn0Gc0Mv/R
cCzeRRL3ULkrIHOuUSN4jx7D5fMrLqeOHS5Zgr8xCnQgIDlWMRmC/IgXNir0K+MQ
oEQl4smP0Sn9/8deABqf91sJJx8fEU6XypU6iPch1zgDbWmI7iFOPV6D0wubkoQ0
/ZkIO6IkRaKz/H4Lk1g6HdMiw411esii2yA/ufsiNTOhiZVeZHqGWxVZioEazYVm
46VzGdZbxLjoIToxxJ/sUb19P1027CzBd9rXH20UD71LGZi/lbBaLpqyXVOT1wqK
6QNnfJUKUG8hCnUoNdx0Kn6uU1EBi0a0+VtuWQmdvZ6Teat+EuSYvZhk8tHGbGya
A/uZiyEwCpxWucT3C9sE/ustwZW7GRHDSGDkiXR8V4KP1Icrx2+TcE0Wa2XNaF5m
AIhTEFpqlsDmWEW3IdvcgSARzqc/4bGwIqyNQMy81CFhuncpjqc=
=4qg0
-----END PGP SIGNATURE-----

Christopher Baines wrote 7 years ago
[PATCH 1/7] gnu: Remove duplicated emacs-csv-mode.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-1-mail@cbaines.net
It was first added in 9faa46ee48d12bf55355805a84a7c533f904a39d, and then again
in 8bc8efc753605e404c1efcdc5b53a780feb0760c.

* gnu/packages/emacs.scm (emacs-csv-mode): Remove duplicated package
definition.
---
gnu/packages/emacs.scm | 20 --------------------
1 file changed, 20 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 20d5597f5..56decb175 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -9641,26 +9641,6 @@ buffer.")
downloading manager for Emacs.")
(license license:gpl3+))))
-(define-public emacs-csv-mode
- (package
- (name "emacs-csv-mode")
- (version "1.7")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "http://elpa.gnu.org/packages/csv-mode-"
- version ".el"))
- (sha256
- (base32
- "0r4bip0w3h55i8h6sxh06czf294mrhavybz0zypzrjw91m1bi7z6"))))
- (build-system emacs-build-system)
- (home-page "http://elpa.gnu.org/packages/csv-mode.html")
- (synopsis "Major mode for editing comma or char separated values")
- (description
- "This package provides an Emacs CSV mode, a major mode for editing
-records in a generalized CSV (character-separated values) format.")
- (license license:gpl3+)))
-
(define-public emacs-helpful
(package
(name "emacs-helpful")
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 2/7] gnu: Remove duplicated emacs-load-relative.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-2-mail@cbaines.net
It was first added in fa1a17b78631681a23ae1fb7b1f902148bbebdbb, and then again
in f8a88f223ea2ac36576cd92f457790df5a6f2408.

* gnu/packages/emacs.scm (emacs-load-relative): Remove duplicated package
definition.
---
gnu/packages/emacs.scm | 26 --------------------------
1 file changed, 26 deletions(-)

Toggle diff (39 lines)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 56decb175..3d17375f6 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -8696,32 +8696,6 @@ region instead.")
schema validation.")
(license license:gpl3+)))
-(define-public emacs-load-relative
- (let ((commit "738896e3da491b35399178ed2c6bc92cc728d119")
- (revision "1"))
- (package
- (name "emacs-load-relative")
- (version (string-append "0.0.1" "-" revision "."
- (string-take commit 7)))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/rocky/emacs-load-relative")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1rpy5mfncncl6gqgg53d3g25g1700g4b9bivd4c0cfcv5dbxhp73"))))
- (build-system emacs-build-system)
- (home-page "https://github.com/rocky/emacs-load-relative")
- (synopsis "Relative loads for Emacs Lisp files")
- (description "@code{load-relative} allows to write small Emacs
-functions or modules in a larger multi-file Emacs package and
-facilitate running from the source tree without having to install the
-code or fiddle with evil @code{load-path}.")
- (license license:gpl3+))))
-
(define-public emacs-rainbow-blocks
(let ((commit "dd435d7bb34ff6f162a5f315df308b90b7e9f842"))
(package
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 4/7] gnu: Remove duplicated ghc-th-lift-instances.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-4-mail@cbaines.net
It was first added in a6d1c4e75a76399c8d82a9570db5cd14351f661b, then again in
ff7dd11f0a4fd6ca947cfa40cec42628fde44667.

* gnu/packages/haskell.scm (ghc-th-lift-instances): Remove duplicated package
definition.
---
gnu/packages/haskell.scm | 25 -------------------------
1 file changed, 25 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 8d2dcba20..d9d39fb72 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9221,31 +9221,6 @@ connections.")
from aeson.")
(license license:bsd-3)))
-(define-public ghc-th-lift-instances
- (package
- (name "ghc-th-lift-instances")
- (version "0.1.11")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://hackage.haskell.org/package/"
- "th-lift-instances-" version "/"
- "th-lift-instances-" version ".tar.gz"))
- (sha256
- (base32
- "1f56cp6ckcalld5jchv0kxpjkwcsixd7smd0g7r8cg67ppx6m90x"))))
- (build-system haskell-build-system)
- (inputs `(("ghc-th-lift" ,ghc-th-lift)
- ("ghc-vector" ,ghc-vector)
- ("ghc-text" ,ghc-text)))
- (native-inputs `(("ghc-quickcheck" ,ghc-quickcheck)))
- (home-page "https://github.com/bennofs/th-lift-instances")
- (synopsis "Lift instances for template-haskell for common data types")
- (description "Most data types in the Haskell platform do not have Lift
-instances. This package provides orphan instances for containers, text,
-bytestring and vector.")
- (license license:bsd-3)))
-
(define-public ghc-generics-sop
(package
(name "ghc-generics-sop")
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 5/7] gnu: Remove duplicated ghc-time-locale-compat.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-5-mail@cbaines.net
It was first added in 5e51bcf7b38511d943f4d24621be5817144061cd, then again in
c56a30b3ba3e1e93ced3c6ba2cfb4c738b805074.

* gnu/packages/haskell.scm (ghc-time-locale-compat): Remove duplicated package
definition.
---
gnu/packages/haskell.scm | 20 --------------------
1 file changed, 20 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index d9d39fb72..7f14c5945 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -9278,26 +9278,6 @@ each constructor are represented using an n-ary product.")
parser that uses ByteStrings for parsing and representing the URI data.")
(license license:bsd-3)))
-(define-public ghc-time-locale-compat
- (package
- (name "ghc-time-locale-compat")
- (version "0.1.1.3")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://hackage.haskell.org/package/"
- "time-locale-compat-" version "/"
- "time-locale-compat-" version ".tar.gz"))
- (sha256
- (base32
- "1vdcfr2hp9qh3ag90x6ikbdf42wiqpdylnplffna54bpnilbyi4i"))))
- (build-system haskell-build-system)
- (home-page "https://github.com/khibino/haskell-time-locale-compat")
- (synopsis "Compatibility of TimeLocale between old-locale and time-1.5")
- (description "This Haskell package contains wrapped name module for
-TimeLocale.")
- (license license:bsd-3)))
-
(define-public ghc-http-api-data
(package
(name "ghc-http-api-data")
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 7/7] gnu: Remove duplicated python-pafy.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-7-mail@cbaines.net
It was first added in 02f8f804f0242df885311715412a1e3ee5436f3b, then again in
2dd12924cf4a30a96262b6d392fcde58c9f10d4b.

* gnu/packages/python.scm (python-pafy): Remove duplicated package definition.
---
gnu/packages/python.scm | 24 ------------------------
1 file changed, 24 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fc1ef3eb2..184635bd2 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1747,30 +1747,6 @@ matching them against a list of media-ranges.")
`(#:tests? #f
,@(package-arguments python2-funcsigs)))))
-(define-public python-pafy
- (package
- (name "python-pafy")
- (version "0.5.3.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "pafy" version))
- (sha256
- (base32
- "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
- (build-system python-build-system)
- (arguments
- `(#:tests? #f)) ; Currently pafy can not find itself in the tests
- (propagated-inputs
- ;; Youtube-dl is a python package which is imported in the file
- ;; "backend_youtube_dl.py", therefore it needs to be propagated.
- `(("youtube-dl" ,youtube-dl)))
- (home-page "https://np1.github.io/pafy/")
- (synopsis "Retrieve YouTube content and metadata")
- (description
- "@code{pafy} is a python library to retrieve YouTube content and metadata.")
- (license license:lgpl3+)))
-
(define-public python-py
(package
(name "python-py")
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 6/7] gnu: Remove duplicated perl-extutils-depends.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-6-mail@cbaines.net
This was first added in 84e8b19fe150ae843d63ca7343aa7172f35153f3, and then
again in 017b014ce4a5defed12836886c4dfe2c5ae89d2d.

* gnu/packages/perl.scm (perl-extutils-depends): Remove duplicated package
definition.
---
gnu/packages/perl.scm | 24 ------------------------
1 file changed, 24 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index afbe5979d..493b7860b 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -3166,30 +3166,6 @@ and alternative installers with the `installler` option. But it's written in
only about 40% as many lines of code and with zero non-core dependencies.")
(license (package-license perl))))
-(define-public perl-extutils-depends
- (package
- (name "perl-extutils-depends")
- (version "0.405")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "mirror://cpan/authors/id/X/XA/XAOC/ExtUtils-Depends-"
- version
- ".tar.gz"))
- (sha256
- (base32
- "0b4ab9qmcihsfs2ajhn5qzg7nhazr68v3r0zvb7076smswd41mla"))))
- (build-system perl-build-system)
- (native-inputs
- `(("perl-test-number-delta"
- ,perl-test-number-delta)))
- (home-page "http://search.cpan.org/dist/ExtUtils-Depends/")
- (synopsis "Easily build XS extensions that depend on XS extensions")
- (description "ExtUtils::Depends builds XS extensions that depend on XS
-extensions")
- (license (package-license perl))))
-
(define-public perl-extutils-installpaths
(package
(name "perl-extutils-installpaths")
--
2.17.1
Christopher Baines wrote 7 years ago
[PATCH 3/7] gnu: Remove duplicated r-psych package.
(address . 32192@debbugs.gnu.org)
20180717204124.30205-3-mail@cbaines.net
It was first added in cdc129dc53b1c04e9a6577f7d2b9641a0a03c32f, then again in
db80dd4a1d7e2371bc3c300f48b84a817adb3550.

* gnu/packages/cran.scm (r-psych): Remove duplicated package definition.
---
gnu/packages/cran.scm | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index fc4baa5b5..e9f4f663a 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -1686,7 +1686,7 @@ problems as well as resampling based estimators of prediction error.")
(define-public r-psych
(package
(name "r-psych")
- (version "1.7.8")
+ (version "1.8.4")
(source
(origin
(method url-fetch)
@@ -3467,37 +3467,6 @@ filtering functions, resampling routines, and visualization of filter models.
It also includes interpolation functions.")
(license license:gpl2)))
-(define-public r-psych
- (package
- (name "r-psych")
- (version "1.8.4")
- (source
- (origin
- (method url-fetch)
- (uri (cran-uri "psych" version))
- (sha256
- (base32
- "1kzv9nc7rwn1sj1zxd8xrbs6c7qlka7j2c8lsr4f20znkd3qx8gf"))))
- (build-system r-build-system)
- (propagated-inputs
- `(("r-foreign" ,r-foreign)
- ("r-lattice" ,r-lattice)
- ("r-mnormt" ,r-mnormt)
- ("r-nlme" ,r-nlme)))
- (home-page "http://cran.r-project.org/web/packages/psych")
- (synopsis "Procedures for psychological, psychometric, and personality research")
- (description
- "This package provides a general purpose toolbox for personality,
-psychometric theory and experimental psychology. The functions are primarily
-for multivariate analysis and scale construction using factor analysis,
-principal component analysis, cluster analysis and reliability analysis,
-although others provide basic descriptive statistics. It provides functions
-for analyzing data at multiple levels within and between group statistics,
-including correlations and factor analysis; functions for simulating and
-testing particular item and test structures are included. Several functions
-serve as a useful front end for structural equation modeling.")
- (license license:gpl2+)))
-
(define-public r-gsubfn
(package
(name "r-gsubfn")
--
2.17.1
Leo Famulari wrote 7 years ago
(name . Christopher Baines)(address . mail@cbaines.net)(address . 32192@debbugs.gnu.org)
20180717210533.GB12949@jasmine.lan
On Tue, Jul 17, 2018 at 09:41:20PM +0100, Christopher Baines wrote:
Toggle quote (22 lines)
> It was first added in cdc129dc53b1c04e9a6577f7d2b9641a0a03c32f, then again in
> db80dd4a1d7e2371bc3c300f48b84a817adb3550.
>
> * gnu/packages/cran.scm (r-psych): Remove duplicated package definition.
> ---
> gnu/packages/cran.scm | 33 +--------------------------------
> 1 file changed, 1 insertion(+), 32 deletions(-)
>
> diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
> index fc4baa5b5..e9f4f663a 100644
> --- a/gnu/packages/cran.scm
> +++ b/gnu/packages/cran.scm
> @@ -1686,7 +1686,7 @@ problems as well as resampling based estimators of prediction error.")
> (define-public r-psych
> (package
> (name "r-psych")
> - (version "1.7.8")
> + (version "1.8.4")
> (source
> (origin
> (method url-fetch)

Does this preserve the correct source hash?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAltOWhwACgkQJkb6MLrK
fwiJcw//YCCYAuPDJ2DYejXw/9PEAYVxYpfjDF0z0h923bESuED4k6RPHLEdKdAZ
gorsWttfRYUff7ZSI9YQIGGQMoFwvdAGuw5bvmpP8dntEut+QaYbfX5uVO8+Oc+1
OaOtJ2Im1XXLr6chDSiMNXnujTvwoe3zY4XPhIhWRoDom/QiBY1O+rcZoCScee8Y
cPbFK2XQDEub0xx22QkdO1F/ztivtZwUaJKnlfYN+18r6Th9IlPmOd0iSeiIxR+x
+WMiSf8Ppndj9ZUZKwhm1u8ZvQP/atfOfcA+VQGSpwwox5wzOMbm/6jFHUo+IryG
d5QXgCRD8vz4OvLSUcgKPjW/wxSs3BZzd3WxH6NM4AT+rHNG0BNeZnsvDOR5HmXA
fwp/KmLibp8XoDQ+7MFNyMjDuUANiSsAlnvC76HLav03XMdNs88zfUGMWc/IR0gE
D22Erq+5oU8fw1mJOQ79z3iHX0ZIqCOVpOdRfOuDvkXwaENPUqBFS5FqHCac4GA3
KAY4/iqw76z8QSEqg+zjbo4EGoHCVtzaZZIBFRB3j00PsGg4oao43ZDaJfMNKLKB
iBnfaCyzVMNFFEuQFzJAaAwDF4AQ4m0TVJSpYanxbm9Xuae9G0UUO/yDaqhzJO31
4YWnNY24B+Bax0suxkdOA22jFpo20rlmopOzMmZAEaTL4Ko+LTw=
=wi+U
-----END PGP SIGNATURE-----


Leo Famulari wrote 7 years ago
Re: [bug#32192] [PATCH 0/7] Remove duplicated packages.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 32192@debbugs.gnu.org)
20180717210733.GC12949@jasmine.lan
On Tue, Jul 17, 2018 at 09:27:45PM +0100, Christopher Baines wrote:
Toggle quote (3 lines)
> The following patches attempt to remove the duplicates, favouring the
> original package definition.

I sent one comment, otherwise the patches LGTM.

Toggle quote (3 lines)
> Is there any way of guarding against adding these, or more accurately
> checking for duplicate definitions?

I don't know. Hopefully someone else has some ideas.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAltOWpUACgkQJkb6MLrK
fwhl3w/9FpwEDDXlyLuQ0G96zcJRTbo6RQFHXFEg1tRA790+DKISehKNkfxiZWHQ
pPpwKDHJPInSUg5esDjKjdqSrR260ZFbftFUozVanObBOFpdaUwWgIF9MvL3H5XY
KXh7u/LHuEns9z/xV+WPjGS77ppRtFutEB9quKuUPEhtMsDsphpav68sN2Jnxtzi
heCF37AMywca6FISg76lZlXMg3VhnuuNVP+2Z6H3sed2Fbrgmj+fgDO+BcAePlZD
i4GvpwIpdthtdOTfWqakuq9GHPxkXqnOo/mBKGxLVSIwphAuU5V8ovUE0LPua2aT
PiVxuOM7OMCTFDks1/Esz0Jo6T+K2DQ+nuvbly+34Xc5RliUJvQ4nFMQ6DB42jDB
ybc+r55sgE7qWnV3iPfQPUns3QoxJL08mBL8iR65u6jS3r78I/EAtk26fbw7QpgX
xYf3mGZSBMRRARGfA1GUVDNOc0OolI0jkaTfx8ALm+QhN+dsdYlvShIn56IWezMG
uGyBe/xEUmlQN0/uO8y8oDEizD6ph2/Gvyqnw0UA4/On/tif2PsEh24sGvaGS+Eb
NXY05/8ezaAEnKHQz9dGV5X5P9DKe9PS8z8k6HnyHWkh3ppILIZvmwHIPyc6r0XC
zS1uScUlTa/JbkdwwE3SklP1hUXdAYd9I1QidPTGmbdbmshFPUA=
=c/RA
-----END PGP SIGNATURE-----


Ludovic Courtès wrote 7 years ago
(name . Leo Famulari)(address . leo@famulari.name)
877elry3xo.fsf@gnu.org
Hello,

Leo Famulari <leo@famulari.name> skribis:

Toggle quote (11 lines)
> On Tue, Jul 17, 2018 at 09:27:45PM +0100, Christopher Baines wrote:
>> The following patches attempt to remove the duplicates, favouring the
>> original package definition.
>
> I sent one comment, otherwise the patches LGTM.
>
>> Is there any way of guarding against adding these, or more accurately
>> checking for duplicate definitions?
>
> I don't know. Hopefully someone else has some ideas.

It’s terrible to see there were so many duplicate packages.

The package lookup machinery detects and warns about same-named packages
when you do things like:

(define-public var1
(package (name "something") …))
(define-public var2
(package (name "something") …))

The problem here is that duplicates were in the same module and using
the same variable name, such that the second definition would shadow the
first one, and so Guix only sees one package.

I think we should add a warning in the compiler for this situation.

Ludo’.
Ludovic Courtès wrote 7 years ago
(name . Leo Famulari)(address . leo@famulari.name)(address . 32192@debbugs.gnu.org)
8736w954fe.fsf@gnu.org
ludo@gnu.org (Ludovic Courtès) skribis:

Toggle quote (16 lines)
> It’s terrible to see there were so many duplicate packages.
>
> The package lookup machinery detects and warns about same-named packages
> when you do things like:
>
> (define-public var1
> (package (name "something") …))
> (define-public var2
> (package (name "something") …))
>
> The problem here is that duplicates were in the same module and using
> the same variable name, such that the second definition would shadow the
> first one, and so Guix only sees one package.
>
> I think we should add a warning in the compiler for this situation.

Toggle snippet (10 lines)
$ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/haskell.scm
gnu/packages/haskell.scm:9224:0: warning: shadows previous definition of `ghc-th-lift-instances' at gnu/packages/haskell.scm:5437:0
gnu/packages/haskell.scm:9306:0: warning: shadows previous definition of `ghc-time-locale-compat' at gnu/packages/haskell.scm:2591:0
wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/gnu/packages/haskell.scm.go'
$ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/emacs.scm
gnu/packages/emacs.scm:8704:0: warning: shadows previous definition of `emacs-load-relative' at gnu/packages/emacs.scm:3467:0
gnu/packages/emacs.scm:9648:0: warning: shadows previous definition of `emacs-csv-mode' at gnu/packages/emacs.scm:7390:0
wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/gnu/packages/emacs.scm.go'

This will be in Guile 2.2.5.

Ludo’.
Christopher Baines wrote 7 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
8736w81lxa.fsf@cbaines.net
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (38 lines)
> ludo@gnu.org (Ludovic Courtès) skribis:
>
>> It’s terrible to see there were so many duplicate packages.
>>
>> The package lookup machinery detects and warns about same-named packages
>> when you do things like:
>>
>> (define-public var1
>> (package (name "something") …))
>> (define-public var2
>> (package (name "something") …))
>>
>> The problem here is that duplicates were in the same module and using
>> the same variable name, such that the second definition would shadow the
>> first one, and so Guix only sees one package.
>>
>> I think we should add a warning in the compiler for this situation.
>
> Done!
>
> https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=bdcd0ba8a71af24f0b64d7acac3130d8f541d26c
>
> Now you get warnings like this:
>
> --8<---------------cut here---------------start------------->8---
> $ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/haskell.scm
> gnu/packages/haskell.scm:9224:0: warning: shadows previous definition of `ghc-th-lift-instances' at gnu/packages/haskell.scm:5437:0
> gnu/packages/haskell.scm:9306:0: warning: shadows previous definition of `ghc-time-locale-compat' at gnu/packages/haskell.scm:2591:0
> wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/gnu/packages/haskell.scm.go'
> $ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/emacs.scm
> gnu/packages/emacs.scm:8704:0: warning: shadows previous definition of `emacs-load-relative' at gnu/packages/emacs.scm:3467:0
> gnu/packages/emacs.scm:9648:0: warning: shadows previous definition of `emacs-csv-mode' at gnu/packages/emacs.scm:7390:0
> wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/guix/gnu/packages/emacs.scm.go'
> --8<---------------cut here---------------end--------------->8---
>
> This will be in Guile 2.2.5.


Awesome! Thanks Ludo’ :D
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAltXe8FfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xfdjg//VFV2/OKBPPY3720pQq/wC1Oi/yGb4UaTTTcJqk5OoyLnPjA8c4xRpkKr
+Io/CbUcZsyBhlrGy2eBf3dBrN9u/wx4WFjBUw9B1N3DDlBLBX6o1IN3HIbqY8ch
Hr4Afz0w4zTPvRq+hH3AMFTw+WqOIpE9QAekY9uOVbE7smIaoFcqjcphO7c1PyXu
Y+hjo+0D/rRAH3It6heOKQiwamjUtab5MDkiYzzCmqT1fg09sNPSggWH6ghzqLV+
jLE4TAM5S5KtNyeUnmrWctmhKJtOa3bO9b3bZrdL9kBdA32zbei2eyRNW3yoxjX9
9w9AsVF/wtQQZtsu3Fg6dnH9wJnVcG6bTYD6DRLApNTszZiilzGDV6HcPhcAQTBH
fBlSqJap5h6cb9wsItZYV0RElESHy0Z9DPl9ZFloqnS+El1NG5Xd79RJO3TL4fyL
Aa+DB6mLesr8JRtIMnqv/giZBpixaS0FXpmJBiLx5YBKQ8unLqPD9TLwVuqlc5N3
9+a7rVxXQcHAacfVxsEiyAHzPYR4QK19R7jOVtD3kFgVmOtpBkasMlh+NA7raeTe
lSN5W3X9sOLQ8gMkwucr81O/G0pGQ6p1/7MicW7sZ3X035FDh9nPJM2z7FmGo4QC
q/dh0lu8RQhePa6JFLiEmdFbfiLNa+e2vFzJXuoL3Vyk5ropo74=
=tiKT
-----END PGP SIGNATURE-----

Christopher Baines wrote 7 years ago
Re: [bug#32192] [PATCH 3/7] gnu: Remove duplicated r-psych package.
(name . Leo Famulari)(address . leo@famulari.name)(address . 32192@debbugs.gnu.org)
874lgikm83.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (25 lines)
> On Tue, Jul 17, 2018 at 09:41:20PM +0100, Christopher Baines wrote:
>> It was first added in cdc129dc53b1c04e9a6577f7d2b9641a0a03c32f, then again in
>> db80dd4a1d7e2371bc3c300f48b84a817adb3550.
>>
>> * gnu/packages/cran.scm (r-psych): Remove duplicated package definition.
>> ---
>> gnu/packages/cran.scm | 33 +--------------------------------
>> 1 file changed, 1 insertion(+), 32 deletions(-)
>>
>> diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
>> index fc4baa5b5..e9f4f663a 100644
>> --- a/gnu/packages/cran.scm
>> +++ b/gnu/packages/cran.scm
>> @@ -1686,7 +1686,7 @@ problems as well as resampling based estimators of prediction error.")
>> (define-public r-psych
>> (package
>> (name "r-psych")
>> - (version "1.7.8")
>> + (version "1.8.4")
>> (source
>> (origin
>> (method url-fetch)
>
> Does this preserve the correct source hash?

It does not, good spot :) I've now fixed this to use the hash of the
removed package definition, and pushed.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAltd83xfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdJmg//afBmSxklXUGF2kw6AYjxOzkArEoQrBlIsBP1JsRa/8lPt5KlgzERDtmw
HifH9MhYSmXJQUL3RoNpniOSSk3cgkqQStUHLNyczkAByUBxYylw+2Av+BpO+ZDr
KfwlIG7qbFY+Oaw/HOiJMfdph/DskcjEoe8mnnECjDFOmF8IyrrMNzsS9cRERp8L
nl/2w7yrVf4ivj+MeWUDG6cjyw8jB3f8lP6mzN65LsshKlHWgalsP9ylN2iJJXNj
0TTR8zwsbKc8ArmGhLrhExonW6Ua+WDBp9qn7ZLVVU7myATQc5TnUKUZQoCqv5FB
hgObbvD3LLScNo2yAdnrUaAMZf6qFZW5YRocUEeq/bE3kG5EUv/XAXuIV62JGCSb
qZ1fs9YPTZ+zKS5S4IaVjXyUNS/qBin7jfxFdRvxfM+Pg5U0Akqca0RmIpAVb9k2
ysMjDZ0I6i2Nk1xz9CATMm2dQhXuri5EqM+0BRrzMMQXL0uLVdt2bpq043IuHwU6
Lw82dZMVcZk5AX2DM8YXCwijf3pCGOxZWu5/3feCbOewjsWPAvb/jeUpcJ4NWzR+
wzSnGnPmkMqZYUaFr4d/96lYNEBOCzh67bZCiwnVbArP3Ubhn67q85l917aBayIc
smiE6EY7/NwvJkhMlEf9W8TnfxR3cAWE5vQ1fi4wBabdRw3zwDs=
=WsC2
-----END PGP SIGNATURE-----

Christopher Baines wrote 7 years ago
Re: [bug#32192] [PATCH 0/7] Remove duplicated packages.
(name . Leo Famulari)(address . leo@famulari.name)(address . 32192-done@debbugs.gnu.org)
8736w2km6y.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (6 lines)
> On Tue, Jul 17, 2018 at 09:27:45PM +0100, Christopher Baines wrote:
>> The following patches attempt to remove the duplicates, favouring the
>> original package definition.
>
> I sent one comment, otherwise the patches LGTM.

Thanks, I've now fixed that issue and pushed :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAltd86VfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfSyw/9EjlhUYcFJNVSGgmTqGIlC+UZTE6L1e/AIel6bT5WWp60Ij/9T33r6XOt
crQqDIKS+bJaCSlRgq27+q1BjUPANkHwfFJpwHdgtXV/1MOxEsMEznas0qUoDfI6
HOrs6Fj4ZArki+9t+sjTTOpkQkBsUZIGKPh8DeSj8r1ZUWbdrRQd4xzTS3hsGdY1
FJxl/BZjT3+pevX/3rUIgTlCt0Ix5CplGi+L6WcuLQweGyihefPPP7Yz7yuaR6GI
SUdDZtRn+rbG6+6JR4PhP2jN9deWVta0mdi0SxqqkOTi2p3nEX5ovy9LXvGsw97m
JL/tYgX70nivX3KVf/EX6XEhgB/gvKkYP0/g4x3ULv4AcsvErzrNMcTBECjlULWh
cfi0nbR1DUUZOCSgiYfmeU0NVy5Ae6HNQSXOFLCujoP9hrNxOlKzJ5twYZUoURzc
k8AoLkXwpqMzmAS1cAPuyZMFwksGeuD3EEviYL5NRwLBo72AL8/WKCBERUcJeNEj
f4xUyji0s09Id2Kc2NM/CBlSq4taUHsO/LwTWHzGKjIyfTf+lRDtm0H/dAlMsANY
gpakJDlfXimFgAcmsN3xAQcyGFzuN3ta9bmB1phPm2mlQvzHdyo1PyyAUs2rQrcj
Sp/NkWG3hlm89yquJQkfU/GeCanOA0BcDwWD0RhoC9h0etD3lSQ=
=4K6J
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32192@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32192
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help