From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 31 Jan 2020 17:53:56 +0300 (MSK) From: Ivan Zakharyaschev To: ALT Linux Team development discussions In-Reply-To: <20200131083654.55647-1-darktemplar@altlinux.org> Message-ID: References: <20200131083654.55647-1-darktemplar@altlinux.org> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="1807885841-1847632397-1580482436=:6363" Cc: Aleksei Nikiforov Subject: Re: [devel] [PATCH for apt] Fix crash when removing 3rd-party packages with some tags missing 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: Fri, 31 Jan 2020 14:53:56 -0000 Archived-At: List-Archive: List-Post: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1807885841-1847632397-1580482436=:6363 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8BIT Hello! Спасибо! А есть примеры пакетов, с которыми можно проверить? On Fri, 31 Jan 2020, Aleksei Nikiforov wrote: > --- > apt/apt-pkg/rpm/rpmpm.cc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/apt/apt-pkg/rpm/rpmpm.cc b/apt/apt-pkg/rpm/rpmpm.cc > index e00630f..4bca9f4 100644 > --- a/apt/apt-pkg/rpm/rpmpm.cc > +++ b/apt/apt-pkg/rpm/rpmpm.cc > @@ -81,7 +81,12 @@ std::string rpm_name_conversion(const pkgCache::PkgIterator &Pkg) > #if RPM_VERSION >= 0x040202 > // This is needed for removal to work on multilib packages, but old > // rpm versions don't support name.arch in RPMDBI_LABEL, oh well... > - Name = Name + "." + Pkg.CurrentVer().Arch(); > + // Note: some 3rd-party packages may still miss arch, so only use it > + // when it's present > + if (Pkg.CurrentVer().Arch() != nullptr) > + { > + Name = Name + "." + Pkg.CurrentVer().Arch(); > + } > #endif > > return Name; > -- > 2.24.1 -- Best regards, Ivan --1807885841-1847632397-1580482436=:6363--