Hi Lin,

在 2022/1/13 21:06, Lance Lin 写道:
Hi Mattia, Xiao Sheng Wen,

looking, it has this:
249 »­­­UPLOADER=$($GPG $GPG_OPTIONS \
250 »­­­           "${GPG_DEFAULT_KEYRINGS[@]}" "${GPG_KEYRINGS[@]}" \
251 »­­­           --list-key --with-colons --fixed-list-mode $GPG_ID 
2>/dev/null |
252 »­­­           awk  -F: '/@debian\.org>/ { a = $10; exit} /^uid/ { a = $10; 
exit} END { print a }' )
So it already has something to handle what you ask, that is clearly not
working.
Probably somebody should try to debug those few lines.
(and don't be ... bothered ... by the way it gather that data… scraping
web pages was a good idea 15 years ago)
I believe have a fix for the issue. I made a merge request on salsa for your 
review.

Yes, your MR partly fix this question in code.

One suggestion is:

It's check the string "@debian.org" is enough, not need tailer >

awk  -F: '/@debian\.org>/  ---->

awk  -F: '/@debian\.org/

As some DD's public key not use  <u...@debian.org> entry, only has u...@debian.org entry.



The issue is that the code above parses the key, however, this will only check 
the first email address on the key. If this first uid is a debian.org email, it 
will use it. Otherwise, this will pull the first uid email (non-debian). It 
seems the assumption is the first email uid on the key will always be 
@debian.org.

For the fix, I searched the entire key for @debian.org. If that is not found, 
search for a non-debian uid email to report back.
If DD's public key don't has the @debian.org entry, who-uploads still reply other email address.


A few test cases were the packages 'ucf' and 'tcsh'. The current version will 
not return a debian.org email for Thomas Lange (tcsh) or Manoj Srivastava 
(ucf). My version will return their @debian.org emails.

Please take a look and let me know your thoughts!

Lance Lin <lqi...@protonmail.com>
GPG Fingerprint:  8CAD 1250 8EE0 3A41 7223  03EC 7096 F91E D75D 028F


BTW:

Your MR in line 256, has one trailing-whitespace  , please delete it.

https://salsa.debian.org/debian/devscripts/-/merge_requests/260/diffs#ae7a6fd5b69ead4ea3e2f56f706397082357ad17_253_256


If you use vim, put the following in your .vimrc :

highlight RedundantSpaces ctermbg=red guibg=red
match RedundantSpaces /\s\+$/

You'll see the trailing-whitespace easy, :-)


Thanks!

--
肖盛文 xiao sheng wen Faris Xiao
微信(wechat):atzlinux
《铜豌豆 Linux》https://www.atzlinux.com
基于 Debian 的 Linux 中文 桌面 操作系统
Debian QA page: https://qa.debian.org/developer.php?login=atzlinux%40sina.com
GnuPG Public Key: 0x00186602339240CB

Attachment: OpenPGP_0x00186602339240CB.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to