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 To: devel@lists.altlinux.org References: <20191206111554.80969-1-darktemplar@altlinux.org> <20191206120538.GA25049@altlinux.org> <20191206121216.GB25049@altlinux.org> From: Aleksei Nikiforov Message-ID: <3c1a1d88-2f4b-3909-04d9-705334a63792@altlinux.org> Date: Fri, 6 Dec 2019 15:19:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191206121216.GB25049@altlinux.org> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Language: ru Content-Transfer-Encoding: 8bit Subject: Re: [devel] [PATCH for apt] Fix copying release information from cdrom 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, 06 Dec 2019 12:19:30 -0000 Archived-At: List-Archive: List-Post: 06.12.2019 15:12, Dmitry V. Levin пишет: > 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>> 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". > Ok, I'll add this text to commit message.