Author: lslezak Date: Tue Jan 3 18:29:07 2012 New Revision: 67090 URL: http://svn.opensuse.org/viewcvs/yast?rev=67090&view=rev Log: - check if downloading optional file really succeeded (bnc#736693) (fixes HA add-on installation) Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes trunk/pkg-bindings/src/Source_Download.cc Modified: trunk/pkg-bindings/package/yast2-pkg-bindings.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/package/yast2-pkg-bindings.changes?rev=67090&r1=67089&r2=67090&view=diff ============================================================================== --- trunk/pkg-bindings/package/yast2-pkg-bindings.changes (original) +++ trunk/pkg-bindings/package/yast2-pkg-bindings.changes Tue Jan 3 18:29:07 2012 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Jan 3 16:58:42 UTC 2012 - lslezak@suse.cz + +- check if downloading optional file really succeeded (bnc#736693) + (fixes HA add-on installation) + +------------------------------------------------------------------- Fri Dec 9 12:54:54 UTC 2011 - lslezak@suse.cz - fixed downloading optional files - pass the optional flag to Modified: trunk/pkg-bindings/src/Source_Download.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/pkg-bindings/src/Source_Download.cc?rev=67090&r1=67089&r2=67090&view=diff ============================================================================== --- trunk/pkg-bindings/src/Source_Download.cc (original) +++ trunk/pkg-bindings/src/Source_Download.cc Tue Jan 3 18:29:07 2012 @@ -143,6 +143,26 @@ if (found) { + // check if the file really exists + struct stat buf; + int status = ::stat(path.asString().c_str(), &buf); + + y2debug("File: %s, status: %d", path.asString().c_str(), status); + + if (status != 0) + { + if (errno == ENOENT) + { + y2milestone("File not found: %s, download failed", path.asString().c_str()); + } + else + { + y2error("Cannot check status of the downloaded file: %s", strerror(errno)); + } + + return YCPVoid(); + } + return YCPString(path.asString()); } else -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org