If a failure occured when trying to create the cache folder, mash would just silently ignore the error and happily continue cranking along. It might of course fail later on, but the problem is impossible to debug if errors are silently suppressed.
However, if the error is merely that the directory already exists (as opposed to a permission issue, for example), then that is fine to ignore.
Likewise, if a failure occurs when trying to download, merely saying "can't download" is not helpful. Adding the actual error message makes it easier to figure out what went wrong. --- mash/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py index 566b8c1..27cdc47 100644 --- a/mash/__init__.py +++ b/mash/__init__.py @@ -12,6 +12,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import errno import glob import os import logging @@ -269,8 +270,11 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: os.mkdir(os.path.dirname(cachepath)) - except: - pass + except Exception as e: + if e.errno != errno.EEXIST: + # If the directory already exists, that's fine + self.logger.error(e) + try: result = urlgrabber.grabber.urlgrab(path, cachepath) except: @@ -279,8 +283,9 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: result = urlgrabber.grabber.urlgrab(path, cachepath) - except: - self.logger.error("ERROR: can't download %s from %s" % (nevra(pkg), path)) + except Exception as e: + self.logger.error("ERROR: can't download %s from %s: %s" + % (nevra(pkg), path, e)) return None
fd = open(result)
https://bugzilla.redhat.com/show_bug.cgi?id=967477 --- mash/multilib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mash/multilib.py b/mash/multilib.py index f2594b0..018e7ab 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -185,7 +185,7 @@ class DevelMultilibMethod(RuntimeMultilibMethod): self.name = 'devel'
def select(self, po): - blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'php-devel', 'java-1.6.0-openjdk-devel', + blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'java-1.6.0-openjdk-devel', 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel' ] whitelist = [] if po.name in blacklist: @@ -202,6 +202,8 @@ class DevelMultilibMethod(RuntimeMultilibMethod): return False if p_name.endswith('-devel') or p_name.endswith('-static'): return True + if po.name.startswith('php-'): + return False if po.name.endswith('-devel'): return True if po.name.endswith('-static'):
On Mon, Sep 29, 2014 at 04:54:56PM +0200, Mathieu Bridon wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=967477
mash/multilib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mash/multilib.py b/mash/multilib.py index f2594b0..018e7ab 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -185,7 +185,7 @@ class DevelMultilibMethod(RuntimeMultilibMethod): self.name = 'devel'
def select(self, po):
blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'php-devel', 'java-1.6.0-openjdk-devel',
blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'java-1.6.0-openjdk-devel', 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel' ] whitelist = [] if po.name in blacklist:
@@ -202,6 +202,8 @@ class DevelMultilibMethod(RuntimeMultilibMethod): return False if p_name.endswith('-devel') or p_name.endswith('-static'): return True
if po.name.startswith('php-'):
return False if po.name.endswith('-devel'): return True if po.name.endswith('-static'):
+1 for me
Pierre
On Mon, Oct 27, 2014 at 05:51:43PM +0100, Pierre-Yves Chibon wrote:
On Mon, Sep 29, 2014 at 04:54:56PM +0200, Mathieu Bridon wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=967477
mash/multilib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mash/multilib.py b/mash/multilib.py index f2594b0..018e7ab 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -185,7 +185,7 @@ class DevelMultilibMethod(RuntimeMultilibMethod): self.name = 'devel'
def select(self, po):
blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'php-devel', 'java-1.6.0-openjdk-devel',
blacklist = ['dmraid-devel', 'kdeutils-devel', 'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'java-1.6.0-openjdk-devel', 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel' ] whitelist = [] if po.name in blacklist:
@@ -202,6 +202,8 @@ class DevelMultilibMethod(RuntimeMultilibMethod): return False if p_name.endswith('-devel') or p_name.endswith('-static'): return True
if po.name.startswith('php-'):
return False if po.name.endswith('-devel'): return True if po.name.endswith('-static'):
+1 for me
+1 as well.
luke
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This needs to be looked at more. we can not remove multilibed bits from the release trees. We may get to a place where we break peoples installs by switching off multilib mid life. we likely need this to be controlled by a config option we can default to having it turned off. but allow multilib of php still in f19 and f20.
Dennis
On Mon, 29 Sep 2014 16:54:56 +0200 Mathieu Bridon bochecha@fedoraproject.org wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=967477
mash/multilib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mash/multilib.py b/mash/multilib.py index f2594b0..018e7ab 100644 --- a/mash/multilib.py +++ b/mash/multilib.py @@ -185,7 +185,7 @@ class DevelMultilibMethod(RuntimeMultilibMethod): self.name = 'devel'
def select(self, po):
blacklist = ['dmraid-devel', 'kdeutils-devel',
'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'php-devel', 'java-1.6.0-openjdk-devel',
blacklist = ['dmraid-devel', 'kdeutils-devel',
'mkinitrd-devel', 'java-1.5.0-gcj-devel', 'java-1.7.0-icedtea-devel', 'java-1.6.0-openjdk-devel', 'java-1.7.0-openjdk-devel', 'java-1.8.0-openjdk-devel' ] whitelist = [] if po.name in blacklist: @@ -202,6 +202,8 @@ class DevelMultilibMethod(RuntimeMultilibMethod): return False if p_name.endswith('-devel') or p_name.endswith('-static'): return True
if po.name.startswith('php-'):
return False if po.name.endswith('-devel'): return True if po.name.endswith('-static'):
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 31 Oct 2014 18:20:17 -0500 Dennis Gilmore dennis@ausil.us wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
This needs to be looked at more. we can not remove multilibed bits from the release trees. We may get to a place where we break peoples installs by switching off multilib mid life. we likely need this to be controlled by a config option we can default to having it turned off. but allow multilib of php still in f19 and f20.
Dennis
for instance on my laptop running f21 ice-php.i686 ice-php-devel.i686 php-cli.i686 php-common.i686 php-devel.i686 php-mysqlnd.i686 php-pdo.i686 php-pecl-apcu.i686 php-pecl-apcu-devel.i686 php-pecl-cairo.i686 php-pecl-cairo-devel.i686 php-pecl-http.i686 php-pecl-http-devel.i686 php-pecl-igbinary.i686 php-pecl-igbinary-devel.i686 php-pecl-jsonc.i686 php-pecl-jsonc-devel.i686 php-pecl-judy.i686 php-pecl-judy-devel.i686 php-pecl-krb5.i686 php-pecl-krb5-devel.i686 php-pecl-msgpack.i686 php-pecl-msgpack-devel.i686 php-pecl-mysqlnd-ms.i686 php-pecl-mysqlnd-ms-devel.i686 php-pecl-mysqlnd-qc.i686 php-pecl-mysqlnd-qc-devel.i686 php-pecl-propro.i686 php-pecl-propro-devel.i686 php-pecl-raphf.i686 php-pecl-raphf-devel.i686
are available. we can change rawhide and f21 at this point but we really can not break f19 and f20.
Dennis
On Mon, Sep 29, 2014 at 04:54:55PM +0200, Mathieu Bridon wrote:
If a failure occured when trying to create the cache folder, mash would just silently ignore the error and happily continue cranking along. It might of course fail later on, but the problem is impossible to debug if errors are silently suppressed.
However, if the error is merely that the directory already exists (as opposed to a permission issue, for example), then that is fine to ignore.
Likewise, if a failure occurs when trying to download, merely saying "can't download" is not helpful. Adding the actual error message makes it easier to figure out what went wrong.
mash/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py index 566b8c1..27cdc47 100644 --- a/mash/__init__.py +++ b/mash/__init__.py @@ -12,6 +12,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import errno import glob import os import logging @@ -269,8 +270,11 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: os.mkdir(os.path.dirname(cachepath))
except:
pass
except Exception as e:
if e.errno != errno.EEXIST:
# If the directory already exists, that's fine
self.logger.error(e)
try: result = urlgrabber.grabber.urlgrab(path, cachepath) except:
@@ -279,8 +283,9 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: result = urlgrabber.grabber.urlgrab(path, cachepath)
except:
self.logger.error("ERROR: can't download %s from %s" % (nevra(pkg), path))
except Exception as e:
self.logger.error("ERROR: can't download %s from %s: %s"
% (nevra(pkg), path, e)) return None fd = open(result)
+1 for me, looks good
Pierre
Looks good to me, +1
On Mon, Sep 29, 2014 at 04:54:55PM +0200, Mathieu Bridon wrote:
If a failure occured when trying to create the cache folder, mash would just silently ignore the error and happily continue cranking along. It might of course fail later on, but the problem is impossible to debug if errors are silently suppressed.
However, if the error is merely that the directory already exists (as opposed to a permission issue, for example), then that is fine to ignore.
Likewise, if a failure occurs when trying to download, merely saying "can't download" is not helpful. Adding the actual error message makes it easier to figure out what went wrong.
mash/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py index 566b8c1..27cdc47 100644 --- a/mash/__init__.py +++ b/mash/__init__.py @@ -12,6 +12,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import errno import glob import os import logging @@ -269,8 +270,11 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: os.mkdir(os.path.dirname(cachepath))
except:
pass
except Exception as e:
if e.errno != errno.EEXIST:
# If the directory already exists, that's fine
self.logger.error(e)
try: result = urlgrabber.grabber.urlgrab(path, cachepath) except:
@@ -279,8 +283,9 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: result = urlgrabber.grabber.urlgrab(path, cachepath)
except:
self.logger.error("ERROR: can't download %s from %s" % (nevra(pkg), path))
except Exception as e:
self.logger.error("ERROR: can't download %s from %s: %s"
% (nevra(pkg), path, e)) return None fd = open(result)
-- 2.1.0
rel-eng mailing list rel-eng@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/rel-eng
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Applied upstream.
On Mon, 29 Sep 2014 16:54:55 +0200 Mathieu Bridon bochecha@fedoraproject.org wrote:
If a failure occured when trying to create the cache folder, mash would just silently ignore the error and happily continue cranking along. It might of course fail later on, but the problem is impossible to debug if errors are silently suppressed.
However, if the error is merely that the directory already exists (as opposed to a permission issue, for example), then that is fine to ignore.
Likewise, if a failure occurs when trying to download, merely saying "can't download" is not helpful. Adding the actual error message makes it easier to figure out what went wrong.
mash/__init__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mash/__init__.py b/mash/__init__.py index 566b8c1..27cdc47 100644 --- a/mash/__init__.py +++ b/mash/__init__.py @@ -12,6 +12,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import errno import glob import os import logging @@ -269,8 +270,11 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: os.mkdir(os.path.dirname(cachepath))
except:
pass
except Exception as e:
if e.errno != errno.EEXIST:
# If the directory already exists, that's
fine
self.logger.error(e)
try: result = urlgrabber.grabber.urlgrab(path,
cachepath) except: @@ -279,8 +283,9 @@ class Mash: path = os.path.join(koji.pathinfo.build(builds_hash[pkg['build_id']]), koji.pathinfo.rpm(pkg)) try: result = urlgrabber.grabber.urlgrab(path, cachepath)
except:
self.logger.error("ERROR: can't download %s
from %s" % (nevra(pkg), path))
except Exception as e:
self.logger.error("ERROR: can't download %s
from %s: %s"
% (nevra(pkg), path, e)) return None fd = open(result)
rel-eng@lists.fedoraproject.org