From 793668bef672de6077d8dbce935d237cf36a4b43 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Feb 05 2020 08:22:53 +0000 Subject: [PATCH 1/3] Fix some typos. --- diff --git a/CHANGELOG b/CHANGELOG index a8c4b27..33d97a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -141,11 +141,11 @@ # - Fill the url # * Add %define BioC for the Bioconductor release of Bioconductor packages # * Add check if the package is noarch or not -# * Add oportunity to copy the source in the %_topdir defined in .rpmmacros +# * Add opportunity to copy the source in the %_topdir defined in .rpmmacros # * Add a parameter in the config file for the version on Bioconductor used # * Add a Spec class to write the spec file # * Add a Noarch class that inherit the Spec class and handle the noarch package case -# * Ask what to do if the specfile is alreay in the current working directory +# * Ask what to do if the specfile is already in the current working directory # # -Bugs correction # * Catch the Description in the file DESCRIPTION when it is on several lines diff --git a/R2rpm.1 b/R2rpm.1 index a8d7405..5df17a1 100644 --- a/R2rpm.1 +++ b/R2rpm.1 @@ -27,7 +27,7 @@ If found, the package will be downloaded, extracted, the information contained in the sources are read (especially those contained in the DESCRIPTION file). The sources are then removed from the current working directory (unless specified otherwise). -Finally the spec file is writen to the filesystem using the information collected. +Finally the spec file is written to the filesystem using the information collected. .HP R2rpm -u diff --git a/R2spec.1 b/R2spec.1 index df3ba6c..42c2a49 100644 --- a/R2spec.1 +++ b/R2spec.1 @@ -27,7 +27,7 @@ If found, the package will be downloaded, extracted, the information contained in the sources are read (especially those contained in the DESCRIPTION file). The sources are then removed from the current working directory (unless specified otherwise). -Finally the spec file is writen to the filesystem using the information collected. +Finally the spec file is written to the filesystem using the information collected. .HP R2spec -u diff --git a/r2spec/build.py b/r2spec/build.py index bdf1e39..3292fb6 100644 --- a/r2spec/build.py +++ b/r2spec/build.py @@ -133,7 +133,7 @@ class Build: log = stream.read() stream.close() except IOError as err: - self.log.info('An error occured during the build') + self.log.info('An error occurred during the build') self.log.debug('ERROR: %s', err) print('Stopping') return(1) @@ -169,6 +169,6 @@ class Build: if len(self.deps) == 0 and len(self.files) == 0 and self.outcode == 1: log = '%s.build.log' % specname raise BuildError( - 'An error occured at build time, see the log in %s' % log) + 'An error occurred at build time, see the log in %s' % log) return self.files diff --git a/r2spec/r2spec_obj.py b/r2spec/r2spec_obj.py index 3e7ae0a..9f0f076 100644 --- a/r2spec/r2spec_obj.py +++ b/r2spec/r2spec_obj.py @@ -150,7 +150,7 @@ class Settings(object): def __init__(self): """Constructor of the Settings object. - This instanciate the Settings object and load into the _dict + This instantiates the Settings object and loads into the _dict attributes the default configuration which each available option. """ self._dict = { @@ -225,7 +225,7 @@ class R2spec(object): self.log = get_logger() def main(self, args): - """ main fonction for R2spec. + """ Main function for R2spec. This is the method which actually runs R2spec and generate the spec file according to the argument given. """ @@ -309,7 +309,7 @@ class R2rpm(R2spec): def __check_build_output(self): """ Handle the output from the build, if it succeeded we stop otherwise the parse the error and act accordingly. - Return False if the build was successful, retun True otherwise. + Return False if the build was successful, return True otherwise. """ specfile = self.spec.get_specfile() if self.build.outcode == 0: @@ -323,7 +323,7 @@ class R2rpm(R2spec): return True def main(self, args): - """ main fonction for R2rpm. + """ Main function for R2rpm. This is the method which actually runs R2rpm, it generates the spec files, cleans its %files section, build it and fill again the %files section. @@ -403,7 +403,7 @@ class R2rpm(R2spec): self.log.info('%s', err) return 1 except BuildError as err: - print('An error occured during the build of %s' % self.pack.name) + print('An error occurred during the build of %s' % self.pack.name) self.log.debug('Build ERROR: %s', err) return 1 if not args.keep_logs: diff --git a/r2spec/spec.py b/r2spec/spec.py index 284cc07..859e742 100644 --- a/r2spec/spec.py +++ b/r2spec/spec.py @@ -260,7 +260,7 @@ class Spec: stream.close() self.log.debug('Spec file written: %s', specfile) if verbose: - print('Spec file writen: %s' % specfile) + print('Spec file written: %s' % specfile) except IOError as err: self.log.info('Cannot write the file %s', specfile) self.log.debug('ERROR: %s', err) From 37aebfeb2597229cffb032c7ac263b1a4bc62335 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Feb 05 2020 08:22:54 +0000 Subject: [PATCH 2/3] Update link to R packaging guidelines. --- diff --git a/CHANGELOG b/CHANGELOG index 33d97a3..eb8a7c5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -205,7 +205,7 @@ # https://www.gnu.org/licenses/gpl.html # # This software has been based on the guidelines for R packaging -# https://fedoraproject.org/wiki/Packaging:R +# https://docs.fedoraproject.org/en-US/packaging-guidelines/R/ # #*********************************************** diff --git a/R2rpm.1 b/R2rpm.1 index 5df17a1..b0fc4d6 100644 --- a/R2rpm.1 +++ b/R2rpm.1 @@ -15,7 +15,7 @@ R2rpm \- Automatically generates RPM for R libraries. .SH DESCRIPTION This tool generate RPM for R libraries according to the Fedora guidelines for R packaging. -These guidelines are available at: https://fedoraproject.org/wiki/Packaging/R +These guidelines are available at: https://docs.fedoraproject.org/en-US/packaging-guidelines/R/ .SH USAGE This program generates RPM file for R libraries for Fedora. diff --git a/R2spec.1 b/R2spec.1 index 42c2a49..7d741a5 100644 --- a/R2spec.1 +++ b/R2spec.1 @@ -15,7 +15,7 @@ R2spec \- Automatically generates RPM spec file for R libraries. .SH DESCRIPTION This tool generate RPM spec file for R libraries according to the Fedora guidelines for R packaging. -These guidelines are available at: https://fedoraproject.org/wiki/Packaging/R +These guidelines are available at: https://docs.fedoraproject.org/en-US/packaging-guidelines/R/ .SH USAGE This program generates spec file for R libraries for Fedora. diff --git a/README b/README index c5ed508..0444fae 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ Name: R2spec Author: Pierre-Yves Chibon -R2spec generates RPMs spec file for R libraries according to the R guidelines of Fedora available at https://fedoraproject.org/wiki/Packaging:R. +R2spec generates RPMs spec file for R libraries according to the R guidelines of Fedora available at https://docs.fedoraproject.org/en-US/packaging-guidelines/R/. It creates the spec file from an input which could be either a source file (*.tar.gz) or a url (https://*.tar.gz). From be7f2e1711867caa67750f4b5057b3be0e605df0 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Feb 05 2020 08:22:54 +0000 Subject: [PATCH 3/3] Remove unnessary string format. There's even a comment wondering why it's there, and I don't think it is necessary, and of course does not do anything. --- diff --git a/r2spec/rpackage.py b/r2spec/rpackage.py index 3c74524..98f9ecb 100644 --- a/r2spec/rpackage.py +++ b/r2spec/rpackage.py @@ -276,7 +276,6 @@ class RPackage(object): """ for section in self.config.sections(): if section == 'repo:%s' % reponame: - """ Not sure why this format is getting filled out...""" - self.url = self.config.get(section, 'url' % (self.name)) + self.url = self.config.get(section, 'url') self.source0 = self.config.get(section, 'source') break