ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] [PATCH for apt] Fix copying release information from cdrom
@ 2019-12-06 11:15 Aleksei Nikiforov
  2019-12-06 12:05 ` Dmitry V. Levin
  0 siblings, 1 reply; 7+ messages in thread
From: Aleksei Nikiforov @ 2019-12-06 11:15 UTC (permalink / raw)
  To: devel; +Cc: Aleksei Nikiforov

---
 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;
 	       
-- 
2.24.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [devel] [PATCH for apt] Fix copying release information from cdrom
  2019-12-06 11:15 [devel] [PATCH for apt] Fix copying release information from cdrom Aleksei Nikiforov
@ 2019-12-06 12:05 ` Dmitry V. Levin
  2019-12-06 12:12   ` Dmitry V. Levin
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry V. Levin @ 2019-12-06 12:05 UTC (permalink / raw)
  To: Aleksei Nikiforov; +Cc: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

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.


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [devel] [PATCH for apt] Fix copying release information from cdrom
  2019-12-06 12:05 ` Dmitry V. Levin
@ 2019-12-06 12:12   ` Dmitry V. Levin
  2019-12-06 12:19     ` Aleksei Nikiforov
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Dmitry V. Levin @ 2019-12-06 12:12 UTC (permalink / raw)
  To: Aleksei Nikiforov; +Cc: ALT Devel discussion list

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]

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".


-- 
ldv

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [devel] [PATCH for apt] Fix copying release information from cdrom
  2019-12-06 12:12   ` Dmitry V. Levin
@ 2019-12-06 12:19     ` Aleksei Nikiforov
  2019-12-06 12:24     ` [devel] [PATCH for apt v2] " Aleksei Nikiforov
  2019-12-06 14:19     ` [devel] [PATCH for apt] " Alexey Gladkov
  2 siblings, 0 replies; 7+ messages in thread
From: Aleksei Nikiforov @ 2019-12-06 12:19 UTC (permalink / raw)
  To: devel

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<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".
> 

Ok, I'll add this text to commit message.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [devel] [PATCH for apt v2] Fix copying release information from cdrom
  2019-12-06 12:12   ` Dmitry V. Levin
  2019-12-06 12:19     ` Aleksei Nikiforov
@ 2019-12-06 12:24     ` Aleksei Nikiforov
  2019-12-06 14:19     ` [devel] [PATCH for apt] " Alexey Gladkov
  2 siblings, 0 replies; 7+ messages in thread
From: Aleksei Nikiforov @ 2019-12-06 12:24 UTC (permalink / raw)
  To: devel; +Cc: Aleksei Nikiforov

Fixes: https://bugzilla.altlinux.org/37531
---
 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;
 	       
-- 
2.24.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [devel] [PATCH for apt] Fix copying release information from cdrom
  2019-12-06 12:12   ` Dmitry V. Levin
  2019-12-06 12:19     ` Aleksei Nikiforov
  2019-12-06 12:24     ` [devel] [PATCH for apt v2] " Aleksei Nikiforov
@ 2019-12-06 14:19     ` Alexey Gladkov
  2019-12-06 20:14       ` Dmitry V. Levin
  2 siblings, 1 reply; 7+ messages in thread
From: Alexey Gladkov @ 2019-12-06 14:19 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: ALT Devel discussion list, Aleksei Nikiforov

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:" ?

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [devel] [PATCH for apt] Fix copying release information from cdrom
  2019-12-06 14:19     ` [devel] [PATCH for apt] " Alexey Gladkov
@ 2019-12-06 20:14       ` Dmitry V. Levin
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry V. Levin @ 2019-12-06 20:14 UTC (permalink / raw)
  To: ALT Devel discussion list; +Cc: Aleksei Nikiforov

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-12-06 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 11:15 [devel] [PATCH for apt] Fix copying release information from cdrom Aleksei Nikiforov
2019-12-06 12:05 ` Dmitry V. Levin
2019-12-06 12:12   ` Dmitry V. Levin
2019-12-06 12:19     ` Aleksei Nikiforov
2019-12-06 12:24     ` [devel] [PATCH for apt v2] " Aleksei Nikiforov
2019-12-06 14:19     ` [devel] [PATCH for apt] " Alexey Gladkov
2019-12-06 20:14       ` Dmitry V. Levin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git