diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-06-23 06:47:50 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-06-23 06:47:50 +0000 |
commit | d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a (patch) | |
tree | 43849b2ff810693d6bf044ae75ad2f1a9d1aa5e6 /URPM.xs | |
parent | e69108e1161af269cc9edd73295e75182886a2a2 (diff) | |
download | perl-URPM-d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a.tar perl-URPM-d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a.tar.gz perl-URPM-d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a.tar.bz2 perl-URPM-d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a.tar.xz perl-URPM-d55f9dce9f5f48f7a1a5e1c51ace5e2def59f46a.zip |
Clarify error message when a synthesis file can't be read or gunzipped
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3326,9 +3326,11 @@ Urpm_parse_synthesis(urpm, filename, ...) } } else { SV **nofatal = hv_fetch((HV*)SvRV(urpm), "nofatal", 7, 0); - errno = ENOENT; + if (!errno) errno = EINVAL; /* zlib error */ if (!nofatal || !SvIV(*nofatal)) - croak("unable to uncompress synthesis file %s", filename); + croak(errno == ENOENT + ? "unable to read synthesis file %s" + : "unable to uncompress synthesis file %s", filename); } } else croak("first argument should contain a depslist ARRAY reference"); } else croak("first argument should be a reference to a HASH"); |