[devel] [PATCH for apt] Fix copying release information from cdrom

Dmitry V. Levin ldv на altlinux.org
Пт Дек 6 23:14:42 MSK 2019


On Fri, Dec 06, 2019 at 03:19:00PM +0100, Alexey Gladkov wrote:
> On Fri, Dec 06, 2019 at 03:12:17PM +0300, Dmitry V. Levin wrote:
> > On Fri, Dec 06, 2019 at 03:05:38PM +0300, Dmitry V. Levin wrote:
> > > On Fri, Dec 06, 2019 at 02:15:54PM +0300, Aleksei Nikiforov wrote:
> > > > ---
> > > >  apt/cmdline/rpmindexcopy.cc | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/apt/cmdline/rpmindexcopy.cc b/apt/cmdline/rpmindexcopy.cc
> > > > index 6d5a414..06b391a 100644
> > > > --- a/apt/cmdline/rpmindexcopy.cc
> > > > +++ b/apt/cmdline/rpmindexcopy.cc
> > > > @@ -180,10 +180,10 @@ bool RPMIndexCopy::CopyPackages(const string &CDROM,const string &Name,vector<st
> > > >  		     release.c_str());
> > > >  	    string TargetF = _config->FindDir("Dir::State::lists") + "partial/";
> > > >  	    TargetF += URItoFileName(S);
> > > > -	    if (FileExists(RipDirectory(*I) + release) == true)
> > > > +	    if (FileExists(RipDirectory(*I) + "/" + release) == true)
> > > >  	    {
> > > >  	       FileFd Target(TargetF,FileFd::WriteEmpty);
> > > > -	       FileFd Rel(RipDirectory(*I) + release,FileFd::ReadOnly);
> > > > +	       FileFd Rel(RipDirectory(*I) + "/" + release,FileFd::ReadOnly);
> > > >  	       if (_error->PendingError() == true)
> > > >  		  return false;
> > > 
> > > LGTM.
> > > 
> > > I wonder is there any more bugs in constructing path names in the code.
> > 
> > I'd also add something like "Fixes: https://bugzilla.altlinux.org/37531".
> 
> The "Fixes:" is mainly used for commits. Maybe it's better to use "BTS:" ?

I think the most traditional prefix for this is "Resolves: ".


-- 
ldv
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : signature.asc
Тип     : application/pgp-signature
Размер  : 801 байтов
Описание: отсутствует
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20191206/9f7a3b30/attachment.bin>


Подробная информация о списке рассылки Devel