Mailinglist Archive: opensuse-buildservice (339 mails)

< Previous Next >
Re: [opensuse-buildservice] cannot add empty files to a package
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Mon, 17 Mar 2008 15:36:53 +0100
  • Message-id: <20080317143653.GA3679@xxxxxxxxxxxxxxxxxxx>
On 2008-03-17 00:26:08 +0100, Marcus Hüwe wrote:
Is this a bug or feature?:)
In case it is a bug I attached a small patch which fixes/works around
this problem.

Here's a shorter version of the patch.


Marcus

Marcus
Index: app/controllers/source_controller.rb
===================================================================
--- app/controllers/source_controller.rb (Revision 3552)
+++ app/controllers/source_controller.rb (Arbeitskopie)
@@ -478,7 +478,7 @@
Suse::Backend.put_source path, request.raw_post
package = Package.find( package_name, :project => project_name )
package.update_timestamp
- logger.info "wrote #{request.raw_post.size} bytes to #{path}"
+ logger.info "wrote #{request.raw_post.to_s.size} bytes to #{path}"
render_ok
else
render_error :status => 403, :errorcode => 'put_file_no_permission',
Index: lib/opensuse/validator.rb
===================================================================
--- lib/opensuse/validator.rb (Revision 3552)
+++ lib/opensuse/validator.rb (Arbeitskopie)
@@ -47,7 +47,7 @@
def validate_incoming_xml
#only validate PUT requests
return true unless request.put?
- Suse::Validator.new(params).validate(request.raw_post)
+ Suse::Validator.new(params).validate(request.raw_post.to_s)
end
end
end
< Previous Next >
Follow Ups
References