History

kbuild: deb-pkg: remove support for "name <email>" form for DEBEMAIL

Commit d5940c60e057 ("kbuild: deb-pkg improve maintainer address generation") supported the "name <email>" form for DEBEMAIL, with behavior slightly different from devscripts. In Kbuild, if DEBEMAIL is given in the form "name <email>", it is used as-is, and DEBFULLNAME is ignored. In contrast, debchange takes the name from DEBFULLNAME (or NAME) if set, as described in 'man debchange': If this variable has the form "name <email>", then the maintainer name will also be taken from here if neither DEBFULLNAME nor NAME is set. This commit removes support for the "name <email> form for DEBEMAIL, as the current behavior is already different from debchange, and the Debian manual suggests setting the email address and name separately in DEBEMAIL and DEBFULLNAME. [1] If there are any complaints about this removal, we can re-add it, with better alignment with the debchange implementation. [2] [1]: https://www.debian.org/doc/manuals/debmake-doc/ch03.en.html#email-setup [2]: https://salsa.debian.org/debian/devscripts/-/blob/v2.23.7/scripts/debchange.pl#L802

Masahiro Yamada committed 2 years ago

Commit c5209081 parent 62767611 file · +7 −13Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/package/mkdebian+7−13
@@ -125,21 +125,15 @@ gen_source () · 124 unmodified lines
125rm -rf debian125rm -rf debian
126mkdir debian126mkdir debian
127 127
128email=${DEBEMAIL}128user=${KBUILD_BUILD_USER-$(id -nu)}
129 129name=${DEBFULLNAME-${user}}
130# use email string directly if it contains <email>130if [ "${DEBEMAIL:+set}" ]; then
131if echo "${email}" | grep -q '<.*>'; then131 email=${DEBEMAIL}
132 maintainer=${email}
133else132else
134 # or construct the maintainer string133 buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)}
135 user=${KBUILD_BUILD_USER-$(id -nu)}134 email="${user}@${buildhost}"
136 name=${DEBFULLNAME-${user}}
137 if [ -z "${email}" ]; then
138 buildhost=${KBUILD_BUILD_HOST-$(hostname -f 2>/dev/null || hostname)}
139 email="${user}@${buildhost}"
140 fi
141 maintainer="${name} <${email}>"
142fi135fi
136maintainer="${name} <${email}>"
143 137
144if [ "$1" = --need-source ]; then138if [ "$1" = --need-source ]; then
145 gen_source139 gen_source

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t