Path: csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!bofh.it!news.nic.it!robomod From: Hunter Wittenborn Newsgroups: linux.debian.maint.python Subject: Question on installing packages via the Python APT library Date: Mon, 08 Nov 2021 00:30:01 +0100 Message-ID: X-Mailbox-Line: From debian-python-request@lists.debian.org Sun Nov 7 23:21:18 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.201 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -5.5 X-Greylist: delayed 911 seconds by postgrey-1.36 at bendel; Sun, 07 Nov 2021 23:21:03 UTC Arc-Seal: i=1; a=rsa-sha256; t=1636326347; cv=none; d=zohomail.com; s=zohoarc; b=mNb6xNIKEDtRbx6Sz5GUwFgJQaSgVto7Iu2TqQP/R3G7voJg1Ia2ld69hAU1AGfcgdODt9dYB5Nx4/tU3D5lnsQT2kUgzFjg4Uuip/RhldzI/7n93PDuv7GZcrY0mFTiQ4JBfzgUCEnZS5i94S1lC/Uu6XE7KorB+o4YOY3ovsc= Arc-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636326347; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=q8OmAglhtvLvCJ+kuDXXbQK+5W6xiHM3Wy1eZqPkS9w=; b=nYU9o9gXCnQDJFO2T+qnKr+5Tjot7oF0XuSRxK+uyQcio3H322Z0NCTSVzIX7qn8D0QW/s3vgXFyvUs7uxHGI4xgoJKdZXVCBEyTTQoNQW/eq0rnQOmbJ6W8LxiP+WY0ZaTcHeH2Rq7DFEJOhvHEBQF6IzTqrig0Cwl2HDmumTo= Arc-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=hunterwittenborn.com; spf=pass smtp.mailfrom=hunter@hunterwittenborn.com; dmarc=pass header.from= MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1793785_1349614187.1636326344810" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Mailing-List: archive/latest/19487 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/17cfca6886a.12a10cd10560798.9200118506356634288@hunterwittenborn.com Approved: robomod@news.nic.it Lines: 148 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sun, 07 Nov 2021 17:05:44 -0600 X-Original-Message-ID: <17cfca6886a.12a10cd10560798.9200118506356634288@hunterwittenborn.com> Xref: csiph.com linux.debian.maint.python:13684 ------=_Part_1793785_1349614187.1636326344810 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 t= o 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 w= hat to put in each one yet, as I'm still trying to figure out all how this = step works): acquire_progress:=C2=A0https://gist.github.com/hwittenborn/56fa689b86396a90= 4155e4b1b5be817a install_progress: https://gist.github.com/hwittenborn/0eb762abdfeb96e2c1cbf= 4f5b6a975f3 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 importa= nt that would affect anything at all. The acquire_progress stage *appears* to be working fine, though the package= s I downloaded were quite small so I didn't really get a chance to see if i= t 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 i= n the background. How exactly should I go about waiting for it to finish th= ough? On a side note, I'm seeing this text whenever it (presumably) gets to the i= nstall 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 recommen= ding 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 mailto:hunter@hunterwittenborn.com https://github.com/hwittenborn ------=_Part_1793785_1349614187.1636326344810 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
Hi! I'm currently working on = a project that's going to be using the Python APT library to handle some pa= ckage installation, but I've got a question on how exactly a certain thing = is working:

I've gotten everything up to the a= ctual installation of packages done (up to the point of calling 'DepCache.c= ommit()', 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 'co= mmit()' function, I currently have the following implemented (I haven't exa= ctly figured out what to put in each one yet, as I'm still trying to figure= out all how this step works):


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 wo= rking fine, though the packages I downloaded were quite small so I didn't r= eally get a chance to see if it just did some weird stuff like with install= progress;

The problem with install_progress i= s that it's exiting my program, and then proceeding with installing package= s, as if it starts installing packages in the background. How exactly shoul= d I go about waiting for it to finish though?

= On a side note, I'm seeing this text whenever it (presumably) gets to the i= nstall part:

"""
cus= tom fork found
got pid: 31873
got pid: 0
got fd: 4
"""

Is there a= ny way I can hide that? I'm thinking it's from the 'fork()' call in the ins= tall_progress class, but the Python APT documentation is recommending not c= hanging that [1], so I wasn't really sure.


Thank= s, anything helps!




------=_Part_1793785_1349614187.1636326344810--