dch -r sets the latest changelog entry's codename to the codename of the running machine, rather than the codename of the previous entry

Bug #2014149 reported by Aaron Rainbolt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devscripts (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

According to the dch manpage:

 --release, -r
        Finalize the changelog for a release. Update the changelog timestamp. If the distri‐
        bution is set to UNRELEASED, change it to the distribution from the previous changelog
        entry (or another distribution as specified by --distribution). If there are no pre‐
        vious changelog entries and an explicit distribution has not been specified, unstable
        will be used (or the name of the current development release when run under Ubuntu).

This doesn't happen. If you are modifying a Lunar package on a Jammy system for instance, running "dch -r" will not set the current changelog entry's codename to Lunar despite the fact that the previous changelog entry is set to Lunar. It will set the codename to Jammy instead, possibly resulting in packages being uploaded to the wrong release.

Steps to reproduce:

1. On a Jammy machine, pull-lp-source any package that has at least one upload in Lunar. The most recent changelog entry must have the Lunar codename assigned to it.
2. Run "dch -i" to create a new changelog entry.
3. Run "dch -r" to finalize the entry.

Expected result: The changelog entry codename should be set to Lunar.

Actual result: The changelog entry codename is set to Jammy.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: devscripts 2.22.1ubuntu1
ProcVersionSignature: Ubuntu 5.19.0-32.33~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-32-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Fri Mar 31 14:20:27 2023
InstallationDate: Installed on 2023-02-28 (31 days ago)
InstallationMedia: Kubuntu 22.04.1 LTS "Jammy Jellyfish" (20230125)
SourcePackage: devscripts
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Aaron Rainbolt (arraybolt3) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :

Reproduced in a jammy chroot:
```
apt install devscripts ubuntu-dev-tools
pull-lp-source devscripts
cd devscripts-2.23.4ubuntu1/
export <email address hidden>
dch -i -m "test"
cd ../devscripts-2.23.4ubuntu2
dch -r "test2"
head -n1 debian/changelog
```

The target is jammy there instead of lunar.

Changed in devscripts (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.