Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #13685
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!bofh.it!news.nic.it!robomod |
|---|---|
| From | Sandro Tosi <morph@debian.org> |
| Newsgroups | linux.debian.maint.python |
| Subject | Re: Question on installing packages via the Python APT library |
| Date | Mon, 08 Nov 2021 02:20:02 +0100 |
| Message-ID | <Dh1ui-2s2-3@gated-at.bofh.it> (permalink) |
| References | <DgZLP-1pb-1@gated-at.bofh.it> |
| X-Mailbox-Line | From debian-python-request@lists.debian.org Mon Nov 8 01:14:20 2021 |
| Old-Return-Path | <sandro.tosi@gmail.com> |
| X-Amavis-Spam-Status | No, score=-6.501 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=unavailable autolearn_force=no |
| X-Policyd-Weight | NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .gmail. - helo: .mail-lj1-f180.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 |
| X-Gm-Message-State | AOAM532mt7HVO+r+0e9+OF7gGdNeMFisV01RmBuReQ1u+fFR+jzpxAFC ApEsoqwiyLl++s/A7pX+I/C0dcmwz2hjJok+gRI= |
| X-Google-SMTP-Source | ABdhPJyWdZJ9u3wklBjW8E8nT4ZmuX3zSlajGQJk/53Bnw/jX1M0iCGwmWcVtzVNkhHR/55TjSv9JN5RsCoiVb3Pd1c= |
| X-Received | by 2002:a2e:5c5:: with SMTP id 188mr4573610ljf.257.1636334043392; Sun, 07 Nov 2021 17:14:03 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Mailing-List | <debian-python@lists.debian.org> archive/latest/19488 |
| List-ID | <debian-python.lists.debian.org> |
| List-URL | <https://lists.debian.org/debian-python/> |
| List-Archive | https://lists.debian.org/msgid-search/CAB4XWXyEcDCqXH7+ybZZz2zk_gpEZ3tLTpsR3nvA0zuYT2sOqw@mail.gmail.com |
| Approved | robomod@news.nic.it |
| Lines | 53 |
| Organization | linux.* mail to news gateway |
| Sender | robomod@news.nic.it |
| X-Original-Cc | debian-python <debian-python@lists.debian.org>, deity@lists.debian.org, Julian Andres Klode <jak@debian.org> |
| X-Original-Date | Sun, 7 Nov 2021 20:13:35 -0500 |
| X-Original-Message-ID | <CAB4XWXyEcDCqXH7+ybZZz2zk_gpEZ3tLTpsR3nvA0zuYT2sOqw@mail.gmail.com> |
| X-Original-References | <17cfca6886a.12a10cd10560798.9200118506356634288@hunterwittenborn.com> |
| Xref | csiph.com linux.debian.maint.python:13685 |
Show key headers only | View raw
python-apt is not written nor maintained by this team, but rather (from https://tracker.debian.org/pkg/python-apt) by the APT Dev team and in particular by Julian Andres Klode (both in CC): please continue the discussion with them On Sun, Nov 7, 2021 at 6:21 PM Hunter Wittenborn <hunter@hunterwittenborn.com> wrote: > > Hi! I'm currently working on a project that's going to be using the Python APT library to handle some package installation, but I've got a question on how exactly a certain thing is working: > > I've gotten everything up to the actual installation of packages done (up to the point of calling 'DepCache.commit()', but once I get to the 'commit()' stage I can't figure out how to control the output of the 'commit()' call in a way I'm wanting. > > Going with the two classes that are specified for the 'commit()' function, I currently have the following implemented (I haven't exactly figured out what to put in each one yet, as I'm still trying to figure out all how this step works): > > acquire_progress: https://gist.github.com/hwittenborn/56fa689b86396a904155e4b1b5be817a > install_progress: https://gist.github.com/hwittenborn/0eb762abdfeb96e2c1cbf4f5b6a975f3 > > The 'tap.message' library being used inside both of those classes is just a message system for my program, they don't do anything particularly important that would affect anything at all. > > The acquire_progress stage *appears* to be working fine, though the packages I downloaded were quite small so I didn't really get a chance to see if it just did some weird stuff like with install progress; > > The problem with install_progress is that it's exiting my program, and then proceeding with installing packages, as if it starts installing packages in the background. How exactly should I go about waiting for it to finish though? > > On a side note, I'm seeing this text whenever it (presumably) gets to the install part: > > """ > custom fork found > got pid: 31873 > got pid: 0 > got fd: 4 > """ > > Is there any way I can hide that? I'm thinking it's from the 'fork()' call in the install_progress class, but the Python APT documentation is recommending not changing that [1], so I wasn't really sure. > > [1]: https://apt-team.pages.debian.net/python-apt/library/apt.progress.base.html#apt.progress.base.InstallProgress.fork > > Thanks, anything helps! > > --- > Hunter Wittenborn > hunter@hunterwittenborn.com > https://github.com/hwittenborn > > > > -- Sandro "morph" Tosi My website: http://sandrotosi.me/ Me at Debian: http://wiki.debian.org/SandroTosi Twitter: https://twitter.com/sandrotosi
Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Question on installing packages via the Python APT library Hunter Wittenborn <hunter@hunterwittenborn.com> - 2021-11-08 00:30 +0100
Re: Question on installing packages via the Python APT library Sandro Tosi <morph@debian.org> - 2021-11-08 02:20 +0100
Re: Question on installing packages via the Python APT library Hunter Wittenborn <hunter@hunterwittenborn.com> - 2021-11-09 00:20 +0100
csiph-web