Repository: conda/conda-build

Issue:
conda-build hash info report truncates package name
### Checklist

- [X] I added a descriptive title
- [X] I searched open reports and couldn't find a duplicate

### What happened?

When building `.conda` packages, conda-build truncates the package name when printing the hash info summary at the end of the build:

For example:

```
...
anaconda upload ^
    C:\Users\spxdmm\AppData\Local\mambaforge\conda-bld\win-64\nds2-client-0.16.8-h27933e4_1004.conda
anaconda_upload is not set.  Not uploading wheels: []

INFO :: The inputs making up the hashes for the built packages are as follows:
{
  "nds2-client-0.16.8-h27933e4_10": {
    "recipe": {
      "CMAKE_GENERATOR": "NMake Makefiles",
      "boost_cpp": "1.78.0",
      "c_compiler": "vs2019",
      "channel_targets": "conda-forge main",
      "cxx_compiler": "vs2019",
      "krb5": "1.21",
      "target_platform": "win-64"
    }
  }
}
```

Here the key for the hash info map should be `"nds2-client-0.16.8-h27933e4_1004"` but the code currently expects the package filename to have a `.tar.bz2` file extension, so strips off too many characters.

### Conda Info

```shell
active environment : base
    active env location : C:\Users\spxdmm\AppData\Local\mambaforge
            shell level : 1
       user config file : C:\Users\spxdmm\.condarc
 populated config files : C:\Users\spxdmm\AppData\Local\mambaforge\.condarc
                          C:\Users\spxdmm\.condarc
          conda version : 23.7.4
    conda-build version : 3.24.0
         python version : 3.11.5.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : C:\Users\spxdmm\AppData\Local\mambaforge  (writable)
      conda av data dir : C:\Users\spxdmm\AppData\Local\mambaforge\etc\conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/win-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : C:\Users\spxdmm\AppData\Local\mambaforge\pkgs
                          C:\Users\spxdmm\.conda\pkgs
                          C:\Users\spxdmm\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\spxdmm\AppData\Local\mambaforge\envs
                          C:\Users\spxdmm\.conda\envs
                          C:\Users\spxdmm\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.7.4 requests/2.31.0 CPython/3.11.5 Windows/10 Windows/10.0.22621
          administrator : False
             netrc file : None
           offline mode : False
```


### Conda Config

_No response_

### Conda list

_No response_

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/conda_build/inspect_pkg.py b/conda_build/inspect_pkg.py
--- a/conda_build/inspect_pkg.py
+++ b/conda_build/inspect_pkg.py
@@ -372,7 +372,7 @@ def inspect_objects(packages, prefix=sys.prefix, groupby="package"):
 def get_hash_input(packages):
     hash_inputs = {}
     for pkg in ensure_list(packages):
-        pkgname = os.path.basename(pkg)[:-8]
+        pkgname = os.path.basename(pkg)
         hash_inputs[pkgname] = {}
         hash_input = package_has_file(pkg, "info/hash_input.json")
         if hash_input:


Test patch: