[opensuse-buildservice] Re: [opensuse-svn] r7335 - in trunk/buildservice/src/clientlib/python/osc: . osc
Hi
Dne Fri, 15 May 2009 05:40:54 -0600 (MDT)
"Novell Forge SVN"
print 'Getting buildinfo from server' - bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = '/tmp') + tempdir = '/tmp' + if sys.platform[:3] == 'win': + tempdir = os.getenv('TEMP')
Would not be better to use tempfile.gettempdir() regardless current platform? -- Michal Čihař | http://cihar.com | http://blog.cihar.com
Michal Čihař wrote:
Hi
Dne Fri, 15 May 2009 05:40:54 -0600 (MDT) "Novell Forge SVN"
napsal(a): print 'Getting buildinfo from server' - bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = '/tmp') + tempdir = '/tmp' + if sys.platform[:3] == 'win': + tempdir = os.getenv('TEMP') + bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = tempdir)
Would not be better to use tempfile.gettempdir() regardless current platform?
My first version of the change just removed dir as optional parameter (module should figure it out by itself what the tempdir is, regardless of platform). But later in the code (function delete_tmpdir) there is an explicit check if the path starts with '/tmp' and this couldn't be guaranteed anymore (module could use '/var/tmp'). What do you think about rewriting the code so it doesn't explicitly set tempdir in these calls and removing the check in delete_tmpdir ? -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi
Dne Fri, 15 May 2009 14:31:38 +0200
Pavol Rusnak
My first version of the change just removed dir as optional parameter (module should figure it out by itself what the tempdir is, regardless of platform). But later in the code (function delete_tmpdir) there is an explicit check if the path starts with '/tmp' and this couldn't be guaranteed anymore (module could use '/var/tmp').
What do you think about rewriting the code so it doesn't explicitly set tempdir in these calls and removing the check in delete_tmpdir ?
I think it would be best. But I totally miss the point of delete_tmpdir logic. What is wrong on deleting directories which osc created in any temporary directory user has defined? -- Michal Čihař | http://cihar.com | http://blog.cihar.com
On 2009-05-15 14:38:33 +0200, Michal Čihař wrote:
Hi
Dne Fri, 15 May 2009 14:31:38 +0200 Pavol Rusnak
napsal(a): My first version of the change just removed dir as optional parameter (module should figure it out by itself what the tempdir is, regardless of platform). But later in the code (function delete_tmpdir) there is an explicit check if the path starts with '/tmp' and this couldn't be guaranteed anymore (module could use '/var/tmp').
What do you think about rewriting the code so it doesn't explicitly set tempdir in these calls and removing the check in delete_tmpdir ?
I think it would be best.
+1. In any case we should get rid of these "if sys... == 'win'..." statements.
But I totally miss the point of delete_tmpdir logic. What is wrong on deleting directories which osc created in any temporary directory user has defined?
Actually it's just a small "security" check (e.g. if you pass a wrong dir to delete_tmpdir()). But I have nothing against removing this function (one just need to double check the dir etc.). Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Hüwe wrote:
+1. In any case we should get rid of these "if sys... == 'win'..." statements. ... when setting tempdir.
There are some places in osc code where check for platform actually makes sense. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Does the msg below imply that osc can/should work on windows? I have a group wanting to set this up. -- Michael -----Original Message----- From: Pavol Rusnak [mailto:prusnak@suse.cz] Sent: Mon 5/18/2009 1:41 AM To: opensuse-buildservice@opensuse.org Subject: Re: [opensuse-buildservice] Re: [opensuse-svn] r7335 - in trunk/buildservice/src/clientlib/python/osc: . osc Marcus Hüwe wrote:
+1. In any case we should get rid of these "if sys... == 'win'..." statements. ... when setting tempdir.
There are some places in osc code where check for platform actually makes sense. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 5/18/2009 at 16:26,
wrote: Does the msg below imply that osc can/should work on windows? I have a group wanting to set this up. --
http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/ Somebody was to bored :) -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael_E_Brown@Dell.com wrote:
Does the msg below imply that osc can/should work on windows? I have a group wanting to set this up.
Yes, I submitted some patches which enable that: See http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/ for more info. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
This is not a command line, but GUI, program, but it run under windows
: MonoOSC , this answer to your need ?
2009/5/18 Pavol Rusnak
Michael_E_Brown@Dell.com wrote:
Does the msg below imply that osc can/should work on windows? I have a group wanting to set this up.
Yes, I submitted some patches which enable that:
See http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/ for more info.
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- If one day one reproaches you that your work is not a work of professional, say you that: Amateurs built the arch of Noah, and professionals the Titanic. --------------------------------------------------------------------------- Few people are done for independence, it is the privilege of the powerful ones. --------------------------------------------------------------------------- No key was wounded during the drafting of this message. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
You certainly do a great job of promoting MonoOSC. I'll let the guys know it is available.
Right now, we need a CLI program to be able to script our backend, but I'm sure there might be some people who want a GUI eventually.
--
Michael
-----Original Message-----
From: Petit Eric [mailto:surfzoid@gmail.com]
Sent: Tue 5/19/2009 4:52 AM
To: opensuse-buildservice@opensuse.org
Subject: Re: [opensuse-buildservice] osc on windows?
This is not a command line, but GUI, program, but it run under windows
: MonoOSC , this answer to your need ?
2009/5/18 Pavol Rusnak
Michael_E_Brown@Dell.com wrote:
Does the msg below imply that osc can/should work on windows? I have a group wanting to set this up.
Yes, I submitted some patches which enable that:
See http://stick.gk2.sk/blog/2009/05/osc-under-windows-and-mac-os-x/ for more info.
-- Best Regards / S pozdravom,
Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
-- Cordially. Small Eric Quotations of the days: --------------------------------------------------------------------------- If one day one reproaches you that your work is not a work of professional, say you that: Amateurs built the arch of Noah, and professionals the Titanic. --------------------------------------------------------------------------- Few people are done for independence, it is the privilege of the powerful ones. --------------------------------------------------------------------------- No key was wounded during the drafting of this message. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael_E_Brown@Dell.com wrote:
Right now, we need a CLI program to be able to script our backend
Don't hesitate to contact me if the build (or the instructions how to build) does not work for you. -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2009-05-18 08:41:20 +0200, Pavol Rusnak wrote:
Marcus Hüwe wrote:
+1. In any case we should get rid of these "if sys... == 'win'..." statements. ... when setting tempdir.
There are some places in osc code where check for platform actually makes sense.
Yes of course - I was just referring to the tempdir stuff. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (6)
-
Dominique Leuenberger
-
Marcus Hüwe
-
Michael_E_Brown@Dell.com
-
Michal Čihař
-
Pavol Rusnak
-
Petit Eric