Skip Menu |

This queue is for tickets about the CPANPLUS-Dist-Fedora CPAN distribution.

Report information
The Basics
Id: 109170
Status: resolved
Priority: 0/
Queue: CPANPLUS-Dist-Fedora

People
Owner: Nobody in particular
Requestors: joseph.konczal.ctr [...] usno.navy.mil
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: make edit-metafile work for rpms
Date: Thu, 19 Nov 2015 22:48:35 +0000
To: "bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org" <bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org>
From: "Konczal, Joseph" <joseph.konczal.ctr [...] usno.navy.mil>
Hi, I needed to edit the spec file of a Perl package I was creating with cpan2build, in order to add some 'obsoletes' so it could properly replace some RPMs of a few different version 0 packages that had been combined into one version 1 package. Unfortunately, '--edit-metafiles' had not yet been implemented for CPANPLUS::Dist::Fedora, so I implemented it via the attached patch. Joseph Konczal Senior Programmer General Dynamics Information Technology (202) 762-1428 Direct (240) 449-9295 Cell joseph.konczal@gdit.com

Message body is not shown because sender requested not to inline it.

Download smime.p7s
application/pkcs7-signature 5.4k

Message body not shown because it is not plain text.

Subject: RE: [rt.cpan.org #109170]
Date: Thu, 19 Nov 2015 22:58:43 +0000
To: "bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org" <bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org>
From: "Konczal, Joseph" <joseph.konczal.ctr [...] usno.navy.mil>
The program I used was cpan2dist, not cpan2build.
Download smime.p7s
application/pkcs7-signature 5.4k

Message body not shown because it is not plain text.

On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote: Show quoted text
> Hi, > > I needed to edit the spec file of a Perl package I was creating with > cpan2build, in order to add some 'obsoletes' so it could properly replace > some RPMs of a few different version 0 packages that had been combined into > one version 1 package. Unfortunately, '--edit-metafiles' had not yet been > implemented for CPANPLUS::Dist::Fedora, so I implemented it via the attached > patch. > > Joseph Konczal > Senior Programmer > General Dynamics Information Technology > (202) 762-1428 Direct > (240) 449-9295 Cell > joseph.konczal@gdit.com >
Thanks, Joseph! I'll take a look at the patch soon. Regards, -- Shlomi Fish
Hi Joseph, some comments about your code: 1. You're using File::Slurp which is no longer recommended. See http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html . You also didn't specify the imports explicitly. That put aside, I would prefer if you didn't add another dependency here , and instead write the _read_file/_write_file (with a leading underscore) functions explicitly. 2. You should specify the encoding of the files. 3. You mutate $contents by doing “$contents = FOO ($contents);” which I dislike. Please assign to a new variable. ------------ Would you like to fix these issues yourself, or do you want me to do that for you? I'm going to await for your reply. Regards, -- Shlomi Fish On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote: Show quoted text
> Hi, > > I needed to edit the spec file of a Perl package I was creating with > cpan2build, in order to add some 'obsoletes' so it could properly replace > some RPMs of a few different version 0 packages that had been combined into > one version 1 package. Unfortunately, '--edit-metafiles' had not yet been > implemented for CPANPLUS::Dist::Fedora, so I implemented it via the attached > patch. > > Joseph Konczal > Senior Programmer > General Dynamics Information Technology > (202) 762-1428 Direct > (240) 449-9295 Cell > joseph.konczal@gdit.com >
Subject: RE: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile work for rpms
Date: Fri, 20 Nov 2015 17:35:49 +0000
To: "bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org" <bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org>
From: "Konczal, Joseph" <joseph.konczal.ctr [...] usno.navy.mil>
Shlomi, Thank you for the comments. I will try to address them with a new patch. Joe Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-CPANPLUS-Dist-Fedora@rt.cpan.org] Sent: Friday, November 20, 2015 3:30 AM To: Konczal, Joseph Subject: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile work for rpms <URL: https://rt.cpan.org/Ticket/Display.html?id=109170 > Hi Joseph, some comments about your code: 1. You're using File::Slurp which is no longer recommended. See http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html . You also didn't specify the imports explicitly. That put aside, I would prefer if you didn't add another dependency here , and instead write the _read_file/_write_file (with a leading underscore) functions explicitly. 2. You should specify the encoding of the files. 3. You mutate $contents by doing “$contents = FOO ($contents);” which I dislike. Please assign to a new variable. ------------ Would you like to fix these issues yourself, or do you want me to do that for you? I'm going to await for your reply. Regards, -- Shlomi Fish On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote:
> Hi, > > I needed to edit the spec file of a Perl package I was creating with > cpan2build, in order to add some 'obsoletes' so it could properly > replace some RPMs of a few different version 0 packages that had been > combined into one version 1 package. Unfortunately, '--edit-metafiles' > had not yet been implemented for CPANPLUS::Dist::Fedora, so I > implemented it via the attached patch. > > Joseph Konczal > Senior Programmer > General Dynamics Information Technology > (202) 762-1428 Direct > (240) 449-9295 Cell > joseph.konczal@gdit.com >
Download smime.p7s
application/pkcs7-signature 5.4k

Message body not shown because it is not plain text.

On Fri Nov 20 12:29:05 2015, joseph.konczal.ctr@usno.navy.mil wrote: Show quoted text
> Shlomi, > > Thank you for the comments. I will try to address them with a new > patch. >
Thanks! I'll be waiting for the new patch before I proceed. Show quoted text
> Joe > > -----Original Message----- > From: Shlomi Fish via RT [mailto:bug-CPANPLUS-Dist- > Fedora@rt.cpan.org] > Sent: Friday, November 20, 2015 3:30 AM > To: Konczal, Joseph > Subject: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile > work for rpms > > <URL: https://rt.cpan.org/Ticket/Display.html?id=109170 > > > Hi Joseph, > > some comments about your code: > > 1. You're using File::Slurp which is no longer recommended. See > http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is- > broken-and-wrong.html . You also didn't specify the imports > explicitly. That put aside, I would prefer if you didn't add another > dependency here , and instead write the _read_file/_write_file (with a > leading underscore) functions explicitly. > > 2. You should specify the encoding of the files. > > 3. You mutate $contents by doing “$contents = FOO ($contents);” which > I dislike. Please assign to a new variable. > > ------------ > > Would you like to fix these issues yourself, or do you want me to do > that for you? I'm going to await for your reply. > > Regards, > > -- Shlomi Fish > > On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote:
> > Hi, > > > > I needed to edit the spec file of a Perl package I was creating with > > cpan2build, in order to add some 'obsoletes' so it could properly > > replace some RPMs of a few different version 0 packages that had been > > combined into one version 1 package. Unfortunately, '--edit- > > metafiles' > > had not yet been implemented for CPANPLUS::Dist::Fedora, so I > > implemented it via the attached patch. > > > > Joseph Konczal > > Senior Programmer > > General Dynamics Information Technology > > (202) 762-1428 Direct > > (240) 449-9295 Cell > > joseph.konczal@gdit.com > >
Subject: RE: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile work for rpms
Date: Mon, 23 Nov 2015 20:06:33 +0000
To: "bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org" <bug-CPANPLUS-Dist-Fedora [...] rt.cpan.org>
From: "Konczal, Joseph" <joseph.konczal.ctr [...] usno.navy.mil>
Shlomi, I hope I have adequately addressed your concerns with my first patch in the attached new patch. Thank you for taking the time to work with me to get this code into the package. Joe Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-CPANPLUS-Dist-Fedora@rt.cpan.org] Sent: Friday, November 20, 2015 3:30 AM To: Konczal, Joseph Subject: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile work for rpms <URL: https://rt.cpan.org/Ticket/Display.html?id=109170 > Hi Joseph, some comments about your code: 1. You're using File::Slurp which is no longer recommended. See http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is-broken-and-wrong.html . You also didn't specify the imports explicitly. That put aside, I would prefer if you didn't add another dependency here , and instead write the _read_file/_write_file (with a leading underscore) functions explicitly. 2. You should specify the encoding of the files. 3. You mutate $contents by doing “$contents = FOO ($contents);” which I dislike. Please assign to a new variable. ------------ Would you like to fix these issues yourself, or do you want me to do that for you? I'm going to await for your reply. Regards, -- Shlomi Fish On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote:
> Hi, > > I needed to edit the spec file of a Perl package I was creating with > cpan2build, in order to add some 'obsoletes' so it could properly > replace some RPMs of a few different version 0 packages that had been > combined into one version 1 package. Unfortunately, '--edit-metafiles' > had not yet been implemented for CPANPLUS::Dist::Fedora, so I > implemented it via the attached patch. > > Joseph Konczal > Senior Programmer > General Dynamics Information Technology > (202) 762-1428 Direct > (240) 449-9295 Cell > joseph.konczal@gdit.com >

Message body is not shown because sender requested not to inline it.

Download smime.p7s
application/pkcs7-signature 5.4k

Message body not shown because it is not plain text.

Hi Joe, On Tue Nov 24 15:02:58 2015, joseph.konczal.ctr@usno.navy.mil wrote: Show quoted text
> Shlomi, > > I hope I have adequately addressed your concerns with my first patch > in the attached new patch. Thank you for taking the time to work with > me to get this code into the package. >
the patch was mostly fine except for: 1. It didn't have explicit close statements. 2. It was not based on the source directory (no lib/ prefix) 3. «print $fh $contents;» should be «print {$fh} $contents;» (not a bug, just a precaution). I fixed these problems and applied the patch in a modified way. It should be OK in v0.0.9. Please let me know if it is working for you. Regards, -- Shlomi Fish Show quoted text
> Joe > > -----Original Message----- > From: Shlomi Fish via RT [mailto:bug-CPANPLUS-Dist- > Fedora@rt.cpan.org] > Sent: Friday, November 20, 2015 3:30 AM > To: Konczal, Joseph > Subject: [Non-DoD Source] [rt.cpan.org #109170] make edit-metafile > work for rpms > > <URL: https://rt.cpan.org/Ticket/Display.html?id=109170 > > > Hi Joseph, > > some comments about your code: > > 1. You're using File::Slurp which is no longer recommended. See > http://blogs.perl.org/users/leon_timmermans/2015/08/fileslurp-is- > broken-and-wrong.html . You also didn't specify the imports > explicitly. That put aside, I would prefer if you didn't add another > dependency here , and instead write the _read_file/_write_file (with a > leading underscore) functions explicitly. > > 2. You should specify the encoding of the files. > > 3. You mutate $contents by doing “$contents = FOO ($contents);” which > I dislike. Please assign to a new variable. > > ------------ > > Would you like to fix these issues yourself, or do you want me to do > that for you? I'm going to await for your reply. > > Regards, > > -- Shlomi Fish > > On Thu Nov 19 17:41:41 2015, joseph.konczal.ctr@usno.navy.mil wrote:
> > Hi, > > > > I needed to edit the spec file of a Perl package I was creating with > > cpan2build, in order to add some 'obsoletes' so it could properly > > replace some RPMs of a few different version 0 packages that had been > > combined into one version 1 package. Unfortunately, '--edit- > > metafiles' > > had not yet been implemented for CPANPLUS::Dist::Fedora, so I > > implemented it via the attached patch. > > > > Joseph Konczal > > Senior Programmer > > General Dynamics Information Technology > > (202) 762-1428 Direct > > (240) 449-9295 Cell > > joseph.konczal@gdit.com > >