Packages in `requirements.txt` not updated without `charmcraft clean`
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
Version: `2.2.0`
## Steps to reproduce
1. `git clone https://github.com/carlcsaposs-canonical/charm-bug-report.git`
2. `cd charm-bug-report/`
3. `charmcraft pack`
4. `git checkout origin/update`
5. `charmcraft pack`
6. Unzip *.charm & `cat venv/package/foo.py` or deploy charm and look at `juju debug-log --replay`
## Expected behavior
Message should be `Hello!` (same as `cat package/package/foo.py`)
## Actual behavior
Message is `Hello, world!` (package was not updated with changes in `origin/update` branch)
## Workaround
I'm able to get charmcraft to correctly update the package without a `charmcraft clean` by deleting `/root/parts/charm/build/charmcraft-dependencies-hash.txt` in the LXC container
It appears that there's an issue here:
https://github.com/canonical/charmcraft/blob/8a3a0e6f1380b993c4c53b6e318485cb853234a8/charmcraft/charm_builder.py#L294-L311
The dependencies hash file remains the same if there are updates to the `./package/` Python package since `requirements.txt` remains unchanged.
## Notes
I also believe (but haven't tested to confirm) that this means that if you have a requirements.txt that looks like this
```
ops>=1.5.0
tenacity
```
that any new versions of `ops` or `tenacity` would not be updated without a `charmcraft clean`.
Evaluation history
No evaluation history available.