Your message dated Sun, 09 Mar 2025 14:46:34 +0000
with message-id <[email protected]>
and subject line Bug#1086512: fixed in python-debian 1.0.0
has caused the Debian Bug report #1086512,
regarding python3-debian: deb822.iter_paragraphs with use_apt_pkg should be 
possible with file path as sequence
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1086512: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1086512
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-debian
Version: 0.1.49
Severity: normal

Dear Maintainer,

I'm trying to parse Packages and let apt handle any compression instead
of writing complex code.

It's segfaulting when I open the file before calling the
`deb822.Packages.iter_paragraphs`:

#+begin_src
ipython3 
Python 3.12.7 (main, Oct  3 2024, 15:15:22) [GCC 14.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from debian import deb822

In [2]: index_path = "/tmp/bookworm-updates.main.Packages.xz"

In [3]: with open(index_path, "rb") as index:
   ...:     pkgs = deb822.Packages.iter_paragraphs(index, use_apt_pkg=True)
   ...:     for pkg in pkgs:
   ...:         print(pkg["Package"])
   ...:         break
   ...: 
Segmentation fault
#+end_src

As a work around, I remove the `_has_fileno()` in the compute of
`apt_pkg_allowed` to accept passing the file path instead of an opened
file descriptor:


#+begin_src
ipython3 
Python 3.12.7 (main, Oct  3 2024, 15:15:22) [GCC 14.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.20.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from debian import deb822

In [2]: index_path = "/tmp/bookworm-updates.main.Packages.xz"

In [3]: pkgs = deb822.Packages.iter_paragraphs(index_path, use_apt_pkg=True)

In [4]: for pkg in pkgs:
   ...:     print(pkg["Package"])
   ...:     break
   ...: 
ikiwiki-hosting-common
#+end_src

Regards.

-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.10.9-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-debian depends on:
ii  python3          3.12.6-1
ii  python3-chardet  5.2.0+dfsg-1

Versions of packages python3-debian recommends:
ii  python3-apt  2.9.0+b1
ii  zstd         1.5.6+dfsg-1

Versions of packages python3-debian suggests:
ii  gpgv  2.2.43-8+b1

-- no debconf information

-- 
Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6  2AAD CC1E 9E5B 7A6F E2DF

--- End Message ---
--- Begin Message ---
Source: python-debian
Source-Version: 1.0.0
Done: Stuart Prescott <[email protected]>

We believe that the bug you reported is fixed in the latest version of
python-debian, 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.
Stuart Prescott <[email protected]> (supplier of updated python-debian 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: Mon, 10 Mar 2025 01:05:59 +1100
Source: python-debian
Architecture: source
Version: 1.0.0
Distribution: unstable
Urgency: medium
Maintainer: Debian python-debian Maintainers 
<[email protected]>
Changed-By: Stuart Prescott <[email protected]>
Closes: 1086512 1087991 1095835
Changes:
 python-debian (1.0.0) unstable; urgency=medium
 .
   * The 1.0.0 release of python-debian :)
   * Upload to unstable (and release to pypi).
   * Update typing imports to keep new mypy happy.
   * Handle non-UTF-8 data in gpgv output from sequoia-generated data
     (Closes: #1095835, #1087991).
   * Permit filenames and Path objects in Deb822.iter_paragraphs()
     (Closes: #1086512).
Checksums-Sha1:
 eda960d89595c01e585c98eb08b6f7bab3038d15 2384 python-debian_1.0.0.dsc
 95aef8759e0d07b4dd078f99cba5ee6026aeeb38 197964 python-debian_1.0.0.tar.xz
 40da09ec5c7dc8a85efff660eadff1bfc9ef6eba 7401 
python-debian_1.0.0_amd64.buildinfo
Checksums-Sha256:
 a3282caceffda65f7e4d7749bab5bb4575da399eb53d8ecb58e955871c79812b 2384 
python-debian_1.0.0.dsc
 f8d8010294244507305dc2dd7f803e879caaae5f512019efc97c83d980a52ec8 197964 
python-debian_1.0.0.tar.xz
 3a634cbd4cf38bd23d62e900e141fc4a8103aad4312caf5b1f7cea302fd04ffa 7401 
python-debian_1.0.0_amd64.buildinfo
Files:
 9bdc55d3f03c595ef915a4aaeccdb420 2384 python optional python-debian_1.0.0.dsc
 1bfcb9eaf23741cb32227a6a2da59f0f 197964 python optional 
python-debian_1.0.0.tar.xz
 80a9ae907ac023ac7546ac9f503ff9df 7401 python optional 
python-debian_1.0.0_amd64.buildinfo

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

iQIzBAEBCgAdFiEEkOLSwa0Uaht+u4kdu8F+uxOW8vcFAmfNoIgACgkQu8F+uxOW
8vdntQ//XXfhCRVVSa1Ow/tumEfRb7Yw5JI2WgK4M8u6BySRcsHT0KNBeEg8I0NG
vlQrgLhQOCi/iTFCQpEyjb4p4HD30+P9QcSoSVTBGRPcEzwQPNGN1PNQPsmYdCSK
7ZoqUS/fbwxyAInPIKYx60fOhyz0TLJ91WUltOMGfIiuAf5slAScDJeyDUTBJswK
8+b9kR79nBbKCC7zcYDrXY3SiOF64otikXEysB1nvyQgO61xKeTssNs+GTEqv6Qk
/EZvOzT8vJtDzChWvX/Y+N4BypZ3y0XWka5xZfItG8Sg5BtamJaIC0jF8nNcQG+1
6/o6gjrlOlX99K8YJzvHnACNN9BCYV35rse1+JDqDmbLwLTmNq58Qt/mDeNsP8yT
dybkIF0nkdH4nHLK2/F1XcyjUal0HPCp4TGp0Ex9YC8UBDj3qXXKj0BwqYEKN6vA
bnYmto7rFMtGm6wUflk/bcRGJTf7NxlnOxlrNlkpqjJH5ZmuQZsKBCElekFEFQCT
GYB+LOUlMHdxcayFX5lZdhsMKeLjiEXzuToc8n0HeLaBF6npZCNnJ/VvRPwPTPNK
MJQr3ZC/5FAvxrHH9tOdEW8RlP4vzvy1XX2FekOi2qUBo8BGEZSU6B9fqwqnRTY1
QHH4eU1asYUJTGVzxO1iWfsR3sseUmV5Pqt13oE4C81UR/wQBag=
=F8Jh
-----END PGP SIGNATURE-----

Attachment: pgpoikVKiwAZB.pgp
Description: PGP signature


--- End Message ---
-- 
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint

Reply via email to