From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 From: Oleg Solovyov To: devel@lists.altlinux.org Date: Tue, 10 Dec 2019 10:27:54 +0300 Message-ID: <2881077.pm4W107xvM@work-pc.localdomain> In-Reply-To: <20191210003042.GF15867@altlinux.org> References: <20191206131201.525279-1-mcpain@altlinux.org> <20191210003042.GF15867@altlinux.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2182541.QFzUgbOIsm"; micalg="pgp-sha256"; protocol="application/pgp-signature" Subject: Re: [devel] [PATCH for apt] Implemented generic callback system for package manager transactions X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Dec 2019 07:28:11 -0000 Archived-At: List-Archive: List-Post: --nextPart2182541.QFzUgbOIsm Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" On =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, 10 =D0=B4=D0=B5=D0=BA=D0=B0= =D0=B1=D1=80=D1=8F 2019 =D0=B3. 03:30:42 MSK Dmitry V. Levin wrote: > On Fri, Dec 06, 2019 at 04:12:01PM +0300, Oleg Solovyov wrote: > > --- > >=20 > > apt/apt-pkg/packagemanager.cc | 4 +- > > apt/apt-pkg/packagemanager.h | 30 +++++++- > > apt/apt-pkg/rpm/rpmpm.cc | 137 ++++++++++++++++++++++++++++++++-- > > apt/apt-pkg/rpm/rpmpm.h | 16 ++-- > > 4 files changed, 170 insertions(+), 17 deletions(-) >=20 > I agree the code should speak for itself, but it would be great > if you could shed some light on what's going on. We're introducing custom callback for higher layers (like packagekit), lett= ing=20 them pass their own callbacks to APT instead of using rpmShowProgress when= =20 it's necessary. It's useful in particular case of offline updating when packagekit can send= =20 messages to plymouth letting user know about transaction progress but becau= se=20 APT does not send anything since it's using rpmShowProgress, packagekit=20 reports nothing because it's just nothing to report. > > [...] >=20 > This looks ugly. Could we use the same values for corresponding > APTCALLBACK_* and RPMCALLBACK_* constants instead? They're passed to packagekit. I don't think it's a good idea to let packagekit know something about RPM=20 internals. Better introduce something similar in APT than include RPM headers in=20 packagekit (which is two layers above RPM) I think. --nextPart2182541.QFzUgbOIsm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEohvh0wuxXF+pZkbSK/jbzM/lrU8FAl3vSPoACgkQK/jbzM/l rU/Rpg/+IJn5XHOEHZWpGmY0NyV13vPK7FyKs7uHqvZHeobicp6+tHMB9wjiR2Hq GBzeqBTgjAIxvLT56X4yLgWKwiC8Qo1q38zzEy+KWbh1rm7KYJGYvuCS8pIFb0iq LxeDlmAtGz3DgM6uHOtzwwcQu7xV+CeOuugg+YkbJfdl8HxGGw+TXtsibhTU+MXt 5Fgrrv3QvbuXxgD2vQmRtxue3lbG1wKVLikFrZWuv4zwfGQTFBJv0Hzi3yHM1Um5 v0+pgCB3qZM8CAPi98nbVwNoPMiaWjRWXUrsH5uabx6710ar3FKSOmThRz+PEvC7 BGrw6rrPRnCDR6w8MTy7MjlvzOhEcDmjTq4bJg8U94bVygtBlJ22duhdViQzdqKe lkgjFmlYFOraidiabhgU+AMhWAZY1cKuYVNdSDKZwi0wNsHe4SX+R5KX5GIOtGTC zJWSabXemkwPX9y5XdiKx2yV2jpxH7QyVVUy9NLEdWSwhqmBfnwMgiSkQhDHHBBW xGFvgxiJy9y0yJPH4VXpKLWsmlx8Aywvau0QAr3zIFST4HNfdyG50Va88MwppHcJ 3nGsh/fou4nrF49Z3JjdCceQijdcqPVdUXlKJ2WEbRMH4i0JLJ5VLuFghijl+rAJ /MFbSI480myq8c5viqRRgP4mtT9mfSWypBoaWNQJVWbCF1ErnmI= =3EfN -----END PGP SIGNATURE----- --nextPart2182541.QFzUgbOIsm--