diff --git a/cabal-install.cabal b/cabal-install.cabal
--- a/cabal-install.cabal
+++ b/cabal-install.cabal
@@ -4,7 +4,7 @@
 -- To update this file, edit 'cabal-install.cabal.pp' and run
 -- 'make cabal-install-prod' in the project's root folder.
 Name:               cabal-install
-Version:            3.6.0.0
+Version:            3.6.2.0
 Synopsis:           The command-line interface for Cabal and Hackage.
 Description:
     The \'cabal\' command-line program simplifies the process of managing
diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,4 +1,8 @@
 -*-change-log-*-
+
+3.6.2.0 Emily Pillmore <emilypi@cohomolo.gy> October 2021
+	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.6.2.0.md
+
 3.6.0.0 Emily Pillmore <emilypi@cohomolo.gy> August 2021
 	* See https://github.com/haskell/cabal/blob/master/release-notes/cabal-install-3.6.0.0.md
 
diff --git a/src/Distribution/Client/CmdSdist.hs b/src/Distribution/Client/CmdSdist.hs
--- a/src/Distribution/Client/CmdSdist.hs
+++ b/src/Distribution/Client/CmdSdist.hs
@@ -273,9 +273,16 @@
         ([], sels') -> Right sels'
         (errs, _)   -> Left errs
     where
-        flatten (SpecificSourcePackage pkg@SourcePackage{}) = pkg
-        flatten _ = error "The impossible happened: how do we not know about a local package?"
-        pkgs' = fmap flatten pkgs
+        -- there can be pkgs which are in extra-packages:
+        -- these are not SpecificSourcePackage
+        --
+        -- Why these packages are in localPkgs, it's confusing.
+        -- Anyhow, better to be lenient here.
+        --
+        flatten (SpecificSourcePackage pkg@SourcePackage{}) = Just pkg
+        flatten _                                           = Nothing
+
+        pkgs' = mapMaybe flatten pkgs
 
         getPkg pid = case find ((== pid) . packageId) pkgs' of
             Just pkg -> Right pkg
diff --git a/src/Distribution/Client/IndexUtils.hs b/src/Distribution/Client/IndexUtils.hs
--- a/src/Distribution/Client/IndexUtils.hs
+++ b/src/Distribution/Client/IndexUtils.hs
@@ -400,7 +400,7 @@
 
     errMissingPackageList repoRemote =
          "The package list for '" ++ unRepoName (remoteRepoName repoRemote)
-      ++ "' does not exist. Run 'cabal update' to download it." ++ show repoRemote
+      ++ "' does not exist. Run 'cabal update' to download it."
     errOutdatedPackageList repoRemote dt =
          "The package list for '" ++ unRepoName (remoteRepoName repoRemote)
       ++ "' is " ++ shows (floor dt :: Int) " days old.\nRun "
