• Old generated binary dependencies after renaming psycopg

    From Tomasz Rybak@21:1/5 to All on Tue Jan 17 09:30:01 2023
    Hello.
    After fixing #1016031 "psycopg3: binary package name should be python3- psycopg"
    (I renamed package names, full changes:
    * python3-psycopg3 -> python3-psycopg
    * python3-psycopg3-pool -> python3-psycopg-pool
    * python-psycopg3-doc -> python3-psycopg-doc)
    I tried to rebuild reverse dependencies,
    i.e. pgcli and python3-pgspecial.
    Rebuild went without problems, new packages are the same
    as old ones, but their binary packages still depend on python3-
    psycopg3,
    even though they build-depend on python3-psycopg.

    I analysed build process and this dependency comes from
    *.substvars file (e.g. pgcli/debian/pgcli.substvars)
    which is generated by dh-python.
    Apt search shows both python3-psycopg3 (in old version)
    and python3-psycopg, so I suspect the former gets taken
    in as binary dependency to be used.

    What can I do to fix it? Should I ask ftp-masters to remove old
    packages, or will the problem fix itself in the next few days?

    Best regards.

    --
    Tomasz Rybak, Debian Developer <serpent@debian.org>
    GPG: A565 CE64 F866 A258 4DDC F9C7 ECB7 3E37 E887 AA8C

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

    iQJHBAABCgAxFiEE1bhtbqZEgXjcK9cyggqgxGY3jWkFAmPGV2ETHHNlcnBlbnRA ZGViaWFuLm9yZwAKCRCCCqDEZjeNaSk0D/0fi6r7AEOe3z2aIUcDIO+TjO0Cq3Ba K4aueGFxGz1PfmqIHSnOB4LdEQqBf5Fg3ORGoV88zGNYApSIW4SN4IrfXiES/U9n pFojz8MMt40QmGqBrg5c449yPzaLwP5k8shJc0gem66wRvw4R5nkWVG4O2VXT+JQ T2HnSOvtlLfKl3LPPuh/ZfYrYzMBcQY/q8NRCxVwN666Ehn2WKvm84un3duISDpX 3NbR14FpcH4FcMYTSaMlau7TGl5ACZv/1Ao1HEOr62tLITKGNspSk6dlfqtgozDh 7Cc+LnyJInuu3kwpW3yP2h1y11DVwFPLOIBOVKmmleLL1RbV0XSwCmx+rguo3GjF VrfOWlEGzXUfBHGqd7QBCIBIDxpxlHijDwE8KB+SHsNXkyMJoPD4NYT8ilzcM6gn n5dMsk8n78yXgqjkoA09RmzkWgXClOC6yQuSJkLofv7WK4vda6Od9va7Gk0MotBZ bkbAkiW6AUkmSNJTkWZUQpxG7ZhaDMM5fjlmNHEJbGxQPdv78SC5u5rZnJk7WiDi P0k0lhcWGR7/P7KfRr2qSaVDtaDb1RsATEH5zTKHV14rS4aAdIdhShsNV9UX0jTG d7ikfKM0C95k/fQKoPFYYtxATAI6vGwFBWa6lHPzdAm0bT3CHsUnRsclZi+Y4BVU d6efH5/edieJPg==
    =sT2q
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
  • From Julian Gilbey@21:1/5 to Tomasz Rybak on Tue Jan 17 10:40:02 2023
    On Tue, Jan 17, 2023 at 09:08:01AM +0100, Tomasz Rybak wrote:
    Hello.
    After fixing #1016031 "psycopg3: binary package name should be python3- psycopg"
    (I renamed package names, full changes:
    * python3-psycopg3 -> python3-psycopg
    * python3-psycopg3-pool -> python3-psycopg-pool
    * python-psycopg3-doc -> python3-psycopg-doc)
    I tried to rebuild reverse dependencies,
    i.e. pgcli and python3-pgspecial.
    Rebuild went without problems, new packages are the same
    as old ones, but their binary packages still depend on python3-
    psycopg3,
    even though they build-depend on python3-psycopg.

    Nope, pgcli does not build-depend on it, rather it explicitly
    specifies Depends: python3-psycopg3. Likewise, python-pgspecial
    specifies the same Depends (though it also has a Build-Depends: python3-psycopg3). These packages will need their dependencies
    updating. (You might also consider making python3-psycopg Provides: python3-psycopg3 and likewise for the other two binary packages for
    bookworm.)

    Best wishes,

    Julian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Scott Kitterman@21:1/5 to Tomasz Rybak on Wed Jan 18 00:50:01 2023
    On January 17, 2023 11:01:45 PM UTC, Tomasz Rybak <serpent@debian.org> wrote: >On Tue, 2023-01-17 at 09:20 +0000, Julian Gilbey wrote:
    On Tue, Jan 17, 2023 at 09:08:01AM +0100, Tomasz Rybak wrote:
    Hello.
    After fixing #1016031 "psycopg3: binary package name should be python3- >> > psycopg"
    (I renamed package names, full changes:
    * python3-psycopg3 -> python3-psycopg
    * python3-psycopg3-pool -> python3-psycopg-pool
    * python-psycopg3-doc -> python3-psycopg-doc)
    I tried to rebuild reverse dependencies,
    i.e. pgcli and python3-pgspecial.
    Rebuild went without problems, new packages are the same
    as old ones, but their binary packages still depend on python3-
    psycopg3,
    even though they build-depend on python3-psycopg.

    Nope, pgcli does not build-depend on it, rather it explicitly
    specifies Depends: python3-psycopg3. Likewise, python-pgspecial
    specifies the same Depends (though it also has a Build-Depends:
    python3-psycopg3). These packages will need their dependencies
    updating. (You might also consider making python3-psycopg Provides:
    python3-psycopg3 and likewise for the other two binary packages for
    bookworm.)


    No, this is not the problem.
    I checked (rebuilt packages with) different variants - with and
    without python3-psycopg[3] as explicit dependency. In all the cases >dependency for python3-psycopg3 comes from ${python3:Depends}
    via pgcli/debian/pgcli.substvars which contains >python3:Depends=python3-cli-helpers, python3-click, python3-configobj, >python3-pendulum, python3-pgspecial, python3-prompt-toolkit, python3- >psycopg3, python3-pygments, python3-setproctitle, python3-sqlparse (>=
    0.3), python3:any.

    When python3-psycopg is in Depends in debian/control, it just gets
    added - so binary package's Depends contains it twice (once
    python3-psycopg3 from ${python3:Depends, once python3-psycopg
    mentioned explicitly; in case of pgcli the second one is versioned).

    Sample line from control file for pgcli, which contains both
    python3-psycopg and python3-psycopg3:
    Depends: python3-cli-helpers, python3-pendulum, python3-pgspecial (>=
    2), python3-pkg-resources, python3-prompt-toolkit (>= 3.0), python3-
    psycopg (>= 3.0.14), python3-sqlparse (>= 0.3), python3-tabulate, >python3-terminaltables, python3-click, python3-configobj, python3-
    psycopg3, python3-pygments, python3-setproctitle, python3:any

    I tried to analyze dh_python3, but could not understand where exactly
    fills it in list of (additional) dependencies. They are generated
    somewhere between dh_python3, dhpython/pydist.py,
    and dhpython/depends.py (all files belong to package dh-python
    and are in /usr/share/dh-python).

    So - any tips how to fix it would be really helpful.

    You'll need to add a py3dist-overrides file in /debian. The details are in the dh-python or pybuild documentation. I don't recall where.

    Scott K

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tomasz Rybak@21:1/5 to Julian Gilbey on Wed Jan 18 00:20:01 2023
    On Tue, 2023-01-17 at 09:20 +0000, Julian Gilbey wrote:
    On Tue, Jan 17, 2023 at 09:08:01AM +0100, Tomasz Rybak wrote:
    Hello.
    After fixing #1016031 "psycopg3: binary package name should be python3- psycopg"
    (I renamed package names, full changes:
    * python3-psycopg3 -> python3-psycopg
    * python3-psycopg3-pool -> python3-psycopg-pool
    * python-psycopg3-doc -> python3-psycopg-doc)
    I tried to rebuild reverse dependencies,
    i.e. pgcli and python3-pgspecial.
    Rebuild went without problems, new packages are the same
    as old ones, but their binary packages still depend on python3-
    psycopg3,
    even though they build-depend on python3-psycopg.

    Nope, pgcli does not build-depend on it, rather it explicitly
    specifies Depends: python3-psycopg3. Likewise, python-pgspecial
    specifies the same Depends (though it also has a Build-Depends: python3-psycopg3). These packages will need their dependencies
    updating. (You might also consider making python3-psycopg Provides: python3-psycopg3 and likewise for the other two binary packages for bookworm.)


    No, this is not the problem.
    I checked (rebuilt packages with) different variants - with and
    without python3-psycopg[3] as explicit dependency. In all the cases
    dependency for python3-psycopg3 comes from ${python3:Depends}
    via pgcli/debian/pgcli.substvars which contains python3:Depends=python3-cli-helpers, python3-click, python3-configobj, python3-pendulum, python3-pgspecial, python3-prompt-toolkit, python3-
    psycopg3, python3-pygments, python3-setproctitle, python3-sqlparse (>=
    0.3), python3:any.

    When python3-psycopg is in Depends in debian/control, it just gets
    added - so binary package's Depends contains it twice (once
    python3-psycopg3 from ${python3:Depends, once python3-psycopg
    mentioned explicitly; in case of pgcli the second one is versioned).

    Sample line from control file for pgcli, which contains both
    python3-psycopg and python3-psycopg3:
    Depends: python3-cli-helpers, python3-pendulum, python3-pgspecial (>=
    2), python3-pkg-resources, python3-prompt-toolkit (>= 3.0), python3-
    psycopg (>= 3.0.14), python3-sqlparse (>= 0.3), python3-tabulate, python3-terminaltables, python3-click, python3-configobj, python3-
    psycopg3, python3-pygments, python3-setproctitle, python3:any

    I tried to analyze dh_python3, but could not understand where exactly
    fills it in list of (additional) dependencies. They are generated
    somewhere between dh_python3, dhpython/pydist.py,
    and dhpython/depends.py (all files belong to package dh-python
    and are in /usr/share/dh-python).

    So - any tips how to fix it would be really helpful.

    Best regards.

    --
    Tomasz Rybak, Debian Developer <serpent@debian.org>
    GPG: A565 CE64 F866 A258 4DDC F9C7 ECB7 3E37 E887 AA8C

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

    iQJHBAABCgAxFiEE1bhtbqZEgXjcK9cyggqgxGY3jWkFAmPHKNoTHHNlcnBlbnRA ZGViaWFuLm9yZwAKCRCCCqDEZjeNaeUFD/9/k5xqsRn2C5d3u7bkefbCqgjq6KIu 9fVqKlBo80JssNLQv2zUStCrrHeDjw1qX/ecnzSnXRHRPFY5mL9vqqXt6UUPSz9R oJA7rWyvKjd+LSSKSLPgydeY5fQdmfBqJd/LXYgm/RxMJdST+XscUT8VsXGsuqOf ITGQ2C9r7tn/uBFE6gL8HSNVa5gKCO4Ycfzp346wT1eGGGaTecr2oOq/BiQZ8sRv qk57wyPgTIrNujat1L5cVQ/nLJPFG+TTZsfh+FhJ8z41Xy8hE/XF+yyuACaxaljy BFZHJ6XYe0hrpKe7xlrwDSnk1Q3CXKI8zemVWe8mJ7n6JY2KPBTZ6MbP58D0kg1y YBOltr5VxjC2XBDlXuRhq7WfvEBto1LA0NFW94TFlAyavK1cd2XgMEZZd4CFcbcm mx9TxM2JgejW68D17yfF8R6jQ0i+IgV24FJ2++uTD8vZGEHja7aOjWRSh+NxHbg/ GoCnEbSNKJgsmZdh5XpjwT/3lN35nvv3kUfKBLiX+/BK41T8jyqCCuHZIvUQEi2F eag7/76WZufjG9xzGwcPMkVGwvkDwPzzpUIc6RP3NpA2sn8/87N2wxkV6RWxniyv yv7SRDokLvcAmbw5cZZYzfxsI/UsL7pFEMgRuPuqnS9jsraUxVTrp1lCuqZC3i7s 6XqljXQxb75djw==
    =hK1U
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
  • From Tomasz Rybak@21:1/5 to Scott Kitterman on Mon Jan 30 22:50:02 2023
    On Tue, 2023-01-17 at 23:26 +0000, Scott Kitterman wrote:

    [ cut ]

    You'll need to add a py3dist-overrides file in /debian. The details are in the dh-python or pybuild documentation. I don't recall where.


    Thanks for tip. Summary, for others with similar problems:
    Solution is described in dh-python documentation
    (man dh_python3, section dependencies).

    Mapping of name psyscopg to python3-psycopg3 is in file /usr/share/dh-python/dist/cpython3_fallback, provided
    by dh-python. It's quite long file, containing many
    of such translations.

    I created debian/python3-psycopg.pydist which got installed
    to /usr/share/python3/dist/python3-psycopg, and provided proper
    mapping. I guess when mapping in dh-python is fixed, I'll be
    able to drop *.pydist files.

    Best regards, and thanks for help!

    --
    Tomasz Rybak, Debian Developer <serpent@debian.org>
    GPG: A565 CE64 F866 A258 4DDC F9C7 ECB7 3E37 E887 AA8C

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

    iQJHBAABCgAxFiEE1bhtbqZEgXjcK9cyggqgxGY3jWkFAmPYNdsTHHNlcnBlbnRA ZGViaWFuLm9yZwAKCRCCCqDEZjeNaWdKD/9MbqB8EbC/yGH3+lbO2czn9pEmqDFB Vze5bnRX02gwHPTmgWQptFvITzUdj2GVXFLbdJRqGP/RDOiBqnWMvHTOfkP9Fbkh o0upcykSZkJSvp04VKX+JRaSyI+hF1y1mEPy9V7kK/+yaJZJhG/OQkBvxk6Mg6NO NHL4OSV/3ux/U+h4C4lhNBZR3sj4+WARMSJ4qzFWN4VinOvjsm/l0EjkBkEju6se pHdqyfkpK4ySro26T4PkKdo+SOdjvtuY9+lA876lZo+MofzMvXUBbEoWJ1QADgWA pCcAI5h7FuCLpCscTLvJWsAfS+5/p//nnCNrBt9EHwW3l5cZRhhbBBDE7Y8j03+Y npwrI3IpixvyodSPyhDYLHCm+/dPvR78tl8E+NV/1C2WiRWh+74Mvyi+I69KaOae 8xGEG3N8nvCvWG9TOE38KeIsn1G/Ux7rnZvPuW+gzpnKGw9kmYW8PqYBcBaDM3sr 7nNSKfuFOBQk4i+lBcCV9sTJ+duLySHnLordZy4UBWt4/qziSkSAD7UDEYkV1x7s oztppQMVqE/hXoqAt6T1XJ8Fgr8Eg7ibrsFYWAtAHf0NfJ7XB/s67Inwr40+K37L 94g78b+lcgST9wxex1t5n6c3f6IUYkkU7zc5fxnYhPNHTbhmL2yF4BImG1gchIH9 p10Bh4Gv3bbrHg==
    =RM7S
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05