Debian Bug report logs - #983160
dput-ng: --override doesn't override profile parameters

version graph

Package: dput-ng; Maintainer for dput-ng is dput-ng Maintainers <[email protected]>; Source for dput-ng is src:dput-ng (PTS, buildd, popcon).

Reported by: Louis-Philippe Véronneau <[email protected]>

Date: Sat, 20 Feb 2021 07:18:02 UTC

Severity: normal

Tags: patch

Found in version dput-ng/1.32

Fixed in version dput-ng/1.43

Done: Colin Watson <[email protected]>

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], dput-ng Maintainers <[email protected]>:
Bug#983160; Package dput-ng. (Sat, 20 Feb 2021 07:18:04 GMT) (full text, mbox, link).


Acknowledgement sent to Louis-Philippe Véronneau <[email protected]>:
New Bug report received and forwarded. Copy sent to dput-ng Maintainers <[email protected]>. (Sat, 20 Feb 2021 07:18:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Louis-Philippe Véronneau <[email protected]>
To: [email protected]
Subject: dput-ng: --override doesn't override profile parameters
Date: Sat, 20 Feb 2021 02:13:51 -0500
Package: dput-ng
Version: 1.32

Dear maintainers,

It seems the `--override` option in dput-ng doesn't really override
parameters in profiles.

I've added the `check-debs` hook to my test profile and added the
following default values:

    "check-debs": {
        "enforce": "source",
        "skip": false
    },

To debug this issue, I also made `dput/uploader.py` print the values of
`args.override` and `profile` right before `run_pre_hooks(changes,
profile)` is ran:

foo@bar:/usr/lib/python3/dist-packages/dput# diff -C 3 uploader.py
new_uploader.py
*** uploader.py	2021-02-20 02:09:11.222489435 -0500
--- new_uploader.py	2021-02-20 02:09:05.314403878 -0500
***************
*** 310,315 ****
--- 310,317 ----

      if changes.get_changes_file().endswith(".changes"):
          if 'hooks' in profile:
+             print("Printing overrides:\n", args.override) ## NEW
+             print("Printing profile:\n", profile)  ## NEW
              run_pre_hooks(changes, profile)
          else:
              logger.trace(profile)

Here's the result:

foo@bar:$ dput --override "check-debs.enforce=debs" --override
"check-debs.skip=true" test foo_1.0.0-1_amd64.changes

Uploading foo using ftp to test (host: test.org; directory:
/pub/UploadQueue/)
Printing overrides:
 {'check-debs': {'enforce': [['debs']], 'skip': [['true']]}}
Printing profile:
 {'name': 'test', 'allow_dcut': True, 'allow_unsigned_uploads': False,
'allowed_distributions': '(?!UNRELEASED)', 'default_host_main': 'test',
'full_upload_log': False, 'hash': 'md5', 'interface': 'cli', 'login':
'anonymous', 'meta': 'debian', 'method': 'ftp', 'passive_ftp': True,
'post_upload_command': '', 'pre_upload_command': '', 'run_lintian':
False, 'scp_compress': False, 'allowed-distribution':
{'codename-groups': ['general', 'backport', 'rm-managed']}, 'codenames':
'debian', 'hooks': ['allowed-distribution', 'protected-distribution',
'check-debs', 'checksum', 'suite-mismatch', 'gpg'], 'run_dinstall':
False, 'check_version': False, 'fqdn': 'test.org', 'incoming':
'/pub/UploadQueue/', 'check-debs': {'enforce': 'source', 'skip': False},
'valid_commands': ['break-the-archive', 'cancel', 'dm', 'reschedule',
'rm', 'upload']}
running allowed-distribution: check whether a local profile permits
uploads to the target distribution
running protected-distribution: warn before uploading to distributions
where a special policy applies
running check-debs: makes sure the upload contains a binary package
There are .debs in this upload, and enforcing they don't exist.

As you can see, the proper overrides are passed to `args.override`, but
they don't seem to be merged with the `profile` variable, which is the
one passed to the `run_pre_hooks(changes, profile)` command.

This makes it impossible to actually override any profile variables :(

I've put this in on my TODO list, but I'm not sure I'll have time to
send a patch anytime soon.

If someone else wants to have a go at this bug, please be my guest :)

-- 
  ⢀⣴⠾⠻⢶⣦⠀
  ⣾⠁⢠⠒⠀⣿⡁  Louis-Philippe Véronneau
  ⢿⡄⠘⠷⠚⠋   [email protected] / veronneau.org
  ⠈⠳⣄



Information forwarded to [email protected], dput-ng Maintainers <[email protected]>:
Bug#983160; Package dput-ng. (Tue, 14 Sep 2021 09:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Paride Legovini <[email protected]>:
Extra info received and forwarded to list. Copy sent to dput-ng Maintainers <[email protected]>. (Tue, 14 Sep 2021 09:27:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Paride Legovini <[email protected]>
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: dput-ng: --override doesn't override profile parameters
Date: Tue, 14 Sep 2021 11:22:52 +0200
On Sat, 20 Feb 2021 <[email protected]> wrote:
> Package: dput-ng
> Version: 1.32
> 
> It seems the `--override` option in dput-ng doesn't really override
> parameters in profiles.

Hi, this is just to confirm this issue. I had a look at the dput-ng 
commit history and I'm failing to see how this was supposed to work even 
when --override was first implemented [1].

[1] 
https://salsa.debian.org/debian/dput-ng/-/commit/a283c444ec73780962c3a1e783d5b957999b1f96



Information forwarded to [email protected], dput-ng Maintainers <[email protected]>:
Bug#983160; Package dput-ng. (Tue, 22 Apr 2025 12:42:02 GMT) (full text, mbox, link).


Acknowledgement sent to Colin Watson <[email protected]>:
Extra info received and forwarded to list. Copy sent to dput-ng Maintainers <[email protected]>. (Tue, 22 Apr 2025 12:42:02 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Colin Watson <[email protected]>
To: Louis-Philippe Véronneau <[email protected]>, [email protected]
Subject: Re: Bug#983160: dput-ng: --override doesn't override profile parameters
Date: Tue, 22 Apr 2025 13:39:13 +0100
Control: tag -1 patch

On Sat, Feb 20, 2021 at 02:13:51AM -0500, Louis-Philippe Véronneau wrote:
>It seems the `--override` option in dput-ng doesn't really override
>parameters in profiles.

I've proposed a patch for this here:

  https://salsa.debian.org/debian/dput-ng/-/merge_requests/39

-- 
Colin Watson (he/him)                              [[email protected]]



Added tag(s) patch. Request was from Colin Watson <[email protected]> to [email protected]. (Tue, 22 Apr 2025 12:42:02 GMT) (full text, mbox, link).


Message sent on to Louis-Philippe Véronneau <[email protected]>:
Bug#983160. (Tue, 22 Apr 2025 14:30:05 GMT) (full text, mbox, link).


Message #20 received at [email protected] (full text, mbox, reply):

From: Colin Watson <[email protected]>
To: [email protected]
Subject: Bug#983160 marked as pending in dput-ng
Date: Tue, 22 Apr 2025 14:27:30 +0000
Control: tag -1 pending

Hello,

Bug #983160 in dput-ng reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/debian/dput-ng/-/commit/9c42be408284dad6dd538c3ecc87f7f5be5ad1b9

------------------------------------------------------------------------
Make the --override option actually work

Closes: #983160
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/983160



Added tag(s) pending. Request was from Colin Watson <[email protected]> to [email protected]. (Tue, 22 Apr 2025 14:30:05 GMT) (full text, mbox, link).


Reply sent to Colin Watson <[email protected]>:
You have taken responsibility. (Tue, 22 Apr 2025 15:09:03 GMT) (full text, mbox, link).


Notification sent to Louis-Philippe Véronneau <[email protected]>:
Bug acknowledged by developer. (Tue, 22 Apr 2025 15:09:03 GMT) (full text, mbox, link).


Message #27 received at [email protected] (full text, mbox, reply):

From: Debian FTP Masters <[email protected]>
To: [email protected]
Subject: Bug#983160: fixed in dput-ng 1.43
Date: Tue, 22 Apr 2025 15:04:45 +0000
[Message part 1 (text/plain, inline)]
Source: dput-ng
Source-Version: 1.43
Done: Colin Watson <[email protected]>

We believe that the bug you reported is fixed in the latest version of
dput-ng, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Colin Watson <[email protected]> (supplier of updated dput-ng package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 22 Apr 2025 15:27:35 +0100
Source: dput-ng
Architecture: source
Version: 1.43
Distribution: unstable
Urgency: medium
Maintainer: dput-ng Maintainers <[email protected]>
Changed-By: Colin Watson <[email protected]>
Closes: 983160
Changes:
 dput-ng (1.43) unstable; urgency=medium
 .
   * Team upload.
   * Fix many ResourceWarnings.
   * Make the --override option actually work (closes: #983160).
Checksums-Sha1:
 9bd65eaf24599f0d040e1acb21348749e6717206 2340 dput-ng_1.43.dsc
 4208a7f951824d058bcdd3a78f9d2ad9e0541546 89272 dput-ng_1.43.tar.xz
Checksums-Sha256:
 481f31e6c41103d9e961fa7d60d60ff172385b4ec2c89f294fc5597905936968 2340 dput-ng_1.43.dsc
 c129e68ecb27cb519a04e1722fbc0f26d6d7fbd4bc96fc287d866bed3ca7825a 89272 dput-ng_1.43.tar.xz
Files:
 36e324a58a4ea0e6bf91e0fceaf385c7 2340 devel optional dput-ng_1.43.dsc
 177a2a555bd7a734ce8282edb0b7db26 89272 devel optional dput-ng_1.43.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErApP8SYRtvzPAcEROTWH2X2GUAsFAmgHp4EACgkQOTWH2X2G
UAvkuhAAkNDYwyIToA5obAPy8nXiZQRo/GxVfFyCHDXXV9/0JGpYdngbXfRxrDEn
iSOud+OrjMOfTXsaxgrtfHdsmSZ3iXZSZhqobDvXfwviF0DHBFZ3L/CZylX1bPRX
SEj+NH8B/9jCtSnr2p7HA3PEIBzA4FIgi7KiO8oC9dTFwpL55GTJe+12PtLfUFLG
XLdaXLewyJQl7N7oe414+wcFYij3ZPk8baWrSQ/TkNgSqk5bGny6zkkuYG6j3ghU
ugbridl+tvbFNM1ho+IePHEOqtyh0NZBhnqNyPYpOBRqp6PqS3vKYAqEEgTCAdsh
bSkLzOHeNYiBd0zvhLaHJCh7/4qXhUzSujJUvMrO+NoZvGXyeOONeGrkb2kV/WGU
YZj3YNTgSj6P2wELuUhIzh6kz71QEQR8o4gUQVLFIXUuJr0rVS1Ze0glvhYAY8M0
fHgOoHDjB/Yw/25F6WenANcjTiUjcPBYmsaVwCCxPURC+fA8WDvbJwchquGmHWf3
vpJ/FbEByhSdKL1RcKutVFE4AyveC5tUVVLbZpi4iqAB1hK6iTxdRkcoUdfdn2vv
TimekX+RjunJ+KbHgILpuZXEiyxZvTw2PyFj+cEVidvOr66Y3bYc2sS2f+Gn2d9s
4/Wk9HxQrFFUrCWbc1GN3APSyx++oSnX6i3QQkOvGbzQ1df6hbA=
=QfQ9
-----END PGP SIGNATURE-----

[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:41:31 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.