diff --git a/master_changes.md b/master_changes.md index a3e09c0bb9c..e142815a33a 100644 --- a/master_changes.md +++ b/master_changes.md @@ -147,6 +147,7 @@ users) * [BUG] Fix linting packages from repository with tarred repositories, the file in temporary repository was no more avaiable when lint is done [#5068 @rjbou] * Update repository package filename display [#5068 @rjbou] * E67: check checksums only for vcs urls [#4960 @rjbou] + * W56: detection removed, since `OPAM_LAST_ENV` allows reliable reverting [#5417 @dra27] ## Repository * When several checksums are specified, instead of adding in the cache only the archive by first checksum, name by best one and link others to this archive [#4696 rjbou] diff --git a/src/state/opamFileTools.ml b/src/state/opamFileTools.ml index 4fe8a17fc91..d142bec56f7 100644 --- a/src/state/opamFileTools.ml +++ b/src/state/opamFileTools.ml @@ -651,9 +651,13 @@ let t_lint ?check_extra_files ?(check_upstream=false) ?(all=false) t = used norm) bad_os_arch_values) (bad_os_arch_values <> [])); + (* Retired, since `OPAM_LAST_ENV` allows environment updates to be reliably + reverted. *) +(* cond 56 `Warning "It is discouraged for non-compiler packages to use 'setenv:'" (t.env <> [] && not (has_flag Pkgflag_Compiler t)); +*) cond 57 `Error "Synopsis and description must not be both empty" (t.descr = None || t.descr = Some OpamFile.Descr.empty); diff --git a/tests/reftests/lint.test b/tests/reftests/lint.test index 2403ad7625a..9c892cedd3b 100644 --- a/tests/reftests/lint.test +++ b/tests/reftests/lint.test @@ -591,21 +591,6 @@ depexts: ["foo"] { arch = "i486" } ${BASEDIR}/lint.opam: Errors. error 55: Non-normalised OS or arch string being tested: "i486 (use x86_32 instead)" # Return code 1 # -### : W56: It is discouraged for non-compiler packages to use 'setenv:' -### -opam-version: "2.0" -synopsis: "A word" -description: "Two words." -authors: "the testing team" -homepage: "egapemoh" -maintainer: "maint@tain.er" -license: "ISC" -dev-repo: "hg+https://to@li.nt" -bug-reports: "https://nobug" -setenv: [ idoit="anyway" ] -### opam lint ./lint.opam -${BASEDIR}/lint.opam: Warnings. - warning 56: It is discouraged for non-compiler packages to use 'setenv:' ### : E57: Synopsis and description must not be both empty ### opam-version: "2.0"