Re: [yast-devel] yast style guide
On Thu, Mar 27, 2008 at 03:11:50PM +0100, Arvin Schnell wrote: On Tue, Mar 25, 2008 at 12:51:27PM +0100, Martin Schmidkunz wrote: Hi everybody, after some discussion and work I would like to present a first draft of a YaST style guide to you: I am looking forward to you comments! - On page 6 is stated that a dialog with several screens requires Step XX of XX: in the heading. Suppose the number of screens is not fixed but depends on the user input in on of the screens. What to display in that case? The issue is even more complicated: Dialog A could be the last dialog but depending on input in dialog A a further dialog B can be displayed. So it's not possible to display the appropriate button Next vs. OK. Or should the button label change depending on a e.g. radio button? Please comment. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] yast style guide
On Tue, Mar 25, 2008 at 12:51:27PM +0100, Martin Schmidkunz wrote: Hi everybody, after some discussion and work I would like to present a first draft of a YaST style guide to you: I am looking forward to you comments! - A mistake: On page 6 it reads that the back button leads to the overview. I suppose that's only the case for the first screen of the mini-workflow. - And a question: Suppose we have two steps in a mini-workflow, A and B. Via A you enter B and make some changes there, e.g. write some text in a input-field. For some reason you want to go back to A and then with next again to B. Should the input already done in B still be there? I think yes. But for the workflow during installation this is not the case. cu Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Time for a change: Let's rename YaST
On Wed, Apr 02, 2008 at 02:15:17PM +0200, Lukas Ocilka wrote: Hmm, well, I just wanted to know opinions on the newly proposed name. There are a lot of reasons to rename it but I wanted to hear also opinions why not to do so. For instance: If we rename it to openYAST but don't change anything to justify then open people will just say: Yet another Stupid Marketing Action. cu Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] yast style guide
On Tue, Mar 25, 2008 at 12:51:27PM +0100, Martin Schmidkunz wrote: Hi everybody, after some discussion and work I would like to present a first draft of a YaST style guide to you: http://en.opensuse.org/Image:Ysg.pdf I am looking forward to you comments! - On page 20 the comboboxs miss labels. So they are not reachable via keyboard-short-cut. And it's undefined whether a label for a combobox should have a colon or not. (That's actually the thing I wanted to find in the styleguide.) - The combobox in the picture on page 5 seems broken. The label is the value. Or is it a menubutton? But why use a label and a menubutton? I would recomment to make the picture of the styleguide with real libyui code and also provide the code. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] YaST and kexec
On Mon, Apr 07, 2008 at 04:33:41PM +0200, Jozef Uhliarik wrote: On Monday 07 April 2008 16:01:06 you wrote: Hi, normally I don't criticise other peoples code but I just saw the kexec code in YaST. Just a call kexec -e! The current program and kernel is gone: No umount, no sync, no SCR flush, no start-script cleanup, no halt according to AutoYaST, no nothing. disks are unmount in this phase. It is really end of installation. If I call sync nothing will be written into disk ;-) But if you want I can add: sync, SCR flush, etc... As maintainer of the startup scripts I definitely want the steps done there to be executed. But you could also just make it the right way. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] new builtin sublist
On Wed, Apr 09, 2008 at 03:07:00PM +0200, Duncan Mac-Vicar Prett wrote: Arvin Schnell wrote: * @usage sublist ([ a, b, c], 0) - [ a, b, c ] * @usage sublist ([ a, b, c], 2) - [ c ] It does not beat ruby's elegance. ;-) Neither does it beat python's slice syntax elegance ;-) s = hello world s[6:] - 'world' from 6th on s[:5] - 'hello' upto 5th s[-5:] - 'world'from 5th backwards on s[:-6] - 'hello'upto 6th backwards s[2:8] - 'llo wo' from 2nd to 8th s[2:8:2] - 'low'from 2nd to 8th but only every second s[9:2:-2] - 'lo l' :) But having to write sublist(s, nil, -2, nil) doesn't look so cool. cu Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] YaST2 meeting Prague - 8.4.2008
On Thu, Apr 10, 2008 at 07:52:18AM +0200, Michal Zugec wrote: Log compression The y2logs in /var/log/YaST2 can be very large (20-30MB), but they compress very well. Now they're compressed with gzip (FaTE#300637) I can't see code in clients/copy_logs_finish.ycp to copy the compressed files to the installed system. We don't want Beta 1 without logfiles. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] new YCP builtins
On Wed, Jun 04, 2008 at 04:04:15PM +0200, Lukas Ocilka wrote: Arvin Schnell wrote: Hi YCP-Hackers, I've used some ITO time to implement two new YCP builtins: 1. splitlist (var x, list, block using x) Takes a list and a predicate function and splits the list where the predicate function says so. Returns a list of lists. Example: liststring l = [ 0, a, 1, 2, b, 3, 4 ]; splitlist(string s, l, { return isalpha(s); }); return is [ [ 0 ], [ a, 1, 2 ], [ b, 3, 4 ] ] The difference to splitstring is that the 'delimiter' is included in the result since that's the way I need it. If desired I could add a parameter that tells whether the 'delimiter' should be added to the previous list, the following list or not at all. Hmm, and do you really see any possibility where *else* such a builtin could be used? What are the use-cases? Appart from my use in storage you could split logfiles, e.g. split y2log at lines containing 'genericfrontend.cc ... Launched YaST2 component' to present the individual runs. Or maybe even split /var/log/messages in several hierarchy and display the result in a tree widget so it's easy to fold/unfold messages you don't care about. But I understand that the use-cases are limited. Why should we have it? Code reuse. Onlt builtins can have variable types. * In conflict with the current /splitstring/ where the delimiter is not included. I consider that to be a limitation of splitstring and I could improve splitlist to be compatible depending on a parameter. ciao Arvin -- Arvin Schnell, [EMAIL PROTECTED] Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] new YCP builtins
On Thu, Jun 05, 2008 at 10:16:27AM +0200, Martin Vidner wrote: I recognize that new functions make programming easier, so I would like to see more of them. On the other hand, new builtins come in the global namespace and thus create conflict with existing identifiers (it has been the case with every improvement to YCP: default, getenv...). So we have to make a digression and put the new features into a namespace or whatever, so that the language stays backward compatible. Very true! That's infact the reason reducelist is called reducelist and not reduce: There is a variable in bootloader called reduce. I had the same problem when adding sublist and I didn't add floor and ceil due to that same reason. I am thinking of allowing type names as namespaces for builtins: It seems that I should prototype this pretty soon so that we can move forward. Great, something for our ITO Friday :) ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] DnsServerAPI.pm
On Tue, Jun 10, 2008 at 01:21:22PM +0200, Lukas Ocilka wrote: The current DnsServerAPI module works without yast2-dns-server being installed. First time it is used, it reports (into log) that the package is not installed and that the dns-related functions will not work. I like that approach: Reduce the functionallity if something is not installed. Of course this must be a understandable omission, e.g. you cannot open a firewall port in nfs-server configuration if the firewall module is not installed. I must admit I looked at the code and didn't understand how the wrapper works. But wouldn't it be useful if the language supports this? E.g. in Python the import statement is just a normal function and can be put in a try block: try: import firewall except ImportError: popup reduced functionallity... log firewall module missing show_open_port_button = False ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Request for new Builtin
On Fri, Jun 13, 2008 at 02:58:48PM +0200, Ladislav Slezak wrote: Hi, Arvin Schnell wrote: Hi, it's ITO Friday again and I would like to add a tiny builtin to YCP. integer::range(integer n) integer::range(integer s, integer n) [...] Do we really need a new builtin for that? For string related functions we have String.ycp. There is also Map.ycp so I think there should be Integer.ycp with such functionality. (see SVN yast2/library/types/src) True, but overloading is not possible in a module. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Request for new Builtin
On Fri, Jun 13, 2008 at 02:43:55PM +0200, Arvin Schnell wrote: Hi, it's ITO Friday again and I would like to add a tiny builtin to YCP. integer::range(integer n) I have now added that one as Integer::Range in Integer.ycp. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[yast-devel] reduce builtin
Hi, it's ITO Friday again. I still have an improved patch for the reduce function (http://en.wikipedia.org/wiki/Reduce_%28higher-order_function%29) lying around (see attachment). It adds two versions of the function: 1) One that takes an initial value. integer sum = list::reduce(integer x, integer y, 0, [ 1, 2, 3 ], { return x + y; }); integer product = list::reduce(integer x, integer y, 1, [ 1, 2, 3 ], { return x * y; }) 2) One were the initial value is the value of the first list entry. Here the list must of course have at least one entry. integer min = list::reduce(integer x, integer y, [ 1, 2, 3 ], { return x y ? x : y; }); integer max = list::reduce(integer x, integer y, [ 1, 2, 3 ], { return x y ? x : y; }); The behaviour is now analogous to Python's reduce so it shouldn't be completely screwed. The patch contains no binary incompatibility to libycp or the bytecode. Please comment. ciao Arvin Index: YCPBuiltinList.cc === --- YCPBuiltinList.cc (revision 48433) +++ YCPBuiltinList.cc (working copy) @@ -1083,6 +1083,121 @@ static YCPValue +l_reduce1 (const YCPSymbol x, const YCPSymbol y, const YCPList list, const YCPCode expr) +{ +/** + * @builtin list::reduce + * @id reduce_1 + * @short Reduces a list to a single value. + * @param flex1 x + * @param flex1 y + * @param listflex1 list + * @param blockflex1 expr + * @return flex1 + * + * TODO + */ + +if (list.isNull()) +{ + return YCPNull(); +} + +if (list-size() 1) +{ + ycp2error(Bad list %s for 'reduce', list-toString().c_str()); + return YCPNull(); +} + +SymbolEntryPtr xs = x-asEntry()-entry(); +SymbolEntryPtr ys = y-asEntry()-entry(); + +YCPValue ret = list-value(0); + +for (int i = 1; i list-size(); i++) +{ + xs-setValue(ret); + ys-setValue(list-value(i)); + + YCPValue tmp = expr-evaluate(); + if (tmp.isNull()) + { + ycp2error(Bad 'reduce' expression %s, expr-toString().c_str()); + continue; + } + if (tmp-isVoid()) + { + ycp2error(The expression for 'reduce' returned 'nil'); + continue; + } + if (tmp-isBreak()) + { + break; + } + + ret = tmp; +} + +return ret; +} + + +static YCPValue +l_reduce2 (const YCPSymbol x, const YCPSymbol y, const YCPValue initial, const YCPList list, const YCPCode expr) +{ +/** + * @builtin list::reduce + * @id reduce_2 + * @short Reduces a list to a single value. + * @param flex1 x + * @param flex2 y + * @param flex1 value + * @param listflex2 list + * @param blockflex1 expr + * @return flex1 + * + * TODO + */ + +if (list.isNull()) +{ + return YCPNull(); +} + +SymbolEntryPtr xs = x-asEntry()-entry(); +SymbolEntryPtr ys = y-asEntry()-entry(); + +YCPValue ret = initial; + +for (int i = 0; i list-size(); i++) +{ + xs-setValue(ret); + ys-setValue(list-value(i)); + + YCPValue tmp = expr-evaluate(); + if (tmp.isNull()) + { + ycp2error(Bad 'reduce' expression %s, expr-toString().c_str()); + continue; + } + if (tmp-isVoid()) + { + ycp2error(The expression for 'reduce' returned 'nil'); + continue; + } + if (tmp-isBreak()) + { + break; + } + + ret = tmp; +} + +return ret; +} + + +static YCPValue l_tolist (const YCPValue v) { /** @@ -1143,5 +1258,14 @@ { 0 } }; +// must be static, registerDeclarations saves a pointer to it! +static declaration_t declarations_ns[] = { + { list, , NULL, DECL_NAMESPACE }, + { reduce, flex1 (variable flex1, variable flex1, const list flex1, const block flex1), (void *)l_reduce1, DECL_LOOP|DECL_SYMBOL|DECL_FLEX }, + { reduce, flex1 (variable flex1, variable flex2, const flex1, const list flex2, const block flex1), (void *)l_reduce2, DECL_LOOP|DECL_SYMBOL|DECL_FLEX }, + { 0 } +}; + static_declarations.registerDeclarations (YCPBuiltinList, declarations); +static_declarations.registerDeclarations (YCPBuiltinList, declarations_ns); }
Re: [yast-devel] reduce builtin
On Fri, Jun 20, 2008 at 01:02:31PM +0200, Martin Vidner wrote: On Fri, Jun 20, 2008 at 10:01:16AM +0200, Arvin Schnell wrote: it's ITO Friday again. I still have an improved patch for the reduce function (http://en.wikipedia.org/wiki/Reduce_%28higher-order_function%29) lying around (see attachment). It adds two versions of the function: 1) One that takes an initial value. integer sum = list::reduce(integer x, integer y, 0, [ 1, 2, 3 ], { return x + y; }); integer product = list::reduce(integer x, integer y, 1, [ 1, 2, 3 ], { return x * y; }) 2) One were the initial value is the value of the first list entry. Here the list must of course have at least one entry. integer min = list::reduce(integer x, integer y, [ 1, 2, 3 ], { return x y ? x : y; }); integer max = list::reduce(integer x, integer y, [ 1, 2, 3 ], { return x y ? x : y; }); The behaviour is now analogous to Python's reduce so it shouldn't be completely screwed. The patch contains no binary incompatibility to libycp or the bytecode. Please comment. Hey, that's nice. I notice that the variant with an external initializer uses 2 different types. That is worth pointing out explicitly (as an advanced example): Sure, I'll mention it in the docu. Hmm, would it make sense to use list::shift and implement reduce_internal using reduce_external? Maybe, but we would require list::shift in C++. Since it wouldn't affect the YCP interface it can always be improved. If noone objects, the next steps would be completing the docs (mainly examples, corner cases), adding test cases, svn, autobuild. Yes, I'll do so. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[yast-devel] Important Changes to Storage
Hi Hackers, for fate #302971 I had to implement a lock for libstorage. This has some consequences for everyone using storage in YaST. The initialisation of libstorage fails if there is another process holding a lock. I have extended Storage::InitLibstorage to display a popup in that case (unfinished). The user can retry to initialise libstorage. The problem is that so far nobody explicitly initialises libstorage. This is more or less required now since you have to take action when locking fails (e.g. gracefully abort). So call Storage::InitLibstorage(readonly) before doing any other storage calls. You can set readonly to true if you are sure your code and no code you call modifies storage. If you do not call Storage::InitLibstorage() the first storage function will do so. But if initialisation fails all storage functions requiring libstorage return nil (if they return anything) or crash (if they don't check for proper initialisation). Comments for improvement to the situation are welcome. ciao Arvin -- Arvin Schnell, [EMAIL PROTECTED] Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Important Changes to Storage
On Sun, Aug 03, 2008 at 05:08:02PM +0200, Arvin Schnell wrote: Hi Hackers, for fate #302971 I had to implement a lock for libstorage. This has some consequences for everyone using storage in YaST. Two more notes: - In trunk/storage/libstorage/examples you can find the program TestLock to test locking. - With the env. var. YAST2_STORAGE_NO_LOCKING you can disable locking. Might be useful for testsuites. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] use ALog::Item
On Wed, Aug 06, 2008 at 05:41:49PM +0200, Martin Vidner wrote: On Wed, Aug 06, 2008 at 04:57:13PM +0200, Michael Andres wrote: On Wed, Aug 06, Martin Vidner wrote: ALog::Item(/etc/ntp.conf: added 'server ntp.example.org') ALog::Item(enabled /etd/init.d/ntp) ALog::Item(started /etd/init.d/ntp) ALog::CommitPopup() will lead to ALog::Note(set up ntp from local server) Isn't this what the loglevel 6 (E_USR) was intended for? An absract of changes done to the system which is also loged into a separate file. Yes. The basic requirement is simple: better logging. Naturally the design is simple too: a function for the better logging. (I put it into a namespace to make room for its brother, a commit message from the admin.) E_USR and analogically y2user(fmt, ...) seems to imply the constraints shared by the other logging functions: the same log file, the same format... Log file and format should be possible to change. The problem with ALog::Item is that it doesn't understand %1 syntax. Always using sformat is clumsy. Also ALog::Item is not accessible from C++ (in case anybody needs that). Access from libstorage seems idealistic since libstorage uses limal/blocxx stuff for logging. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] use ALog::Item
On Thu, Aug 07, 2008 at 03:20:53PM +0200, Martin Vidner wrote: On Wed, Aug 06, 2008 at 05:53:58PM +0200, Arvin Schnell wrote: On Wed, Aug 06, 2008 at 05:41:49PM +0200, Martin Vidner wrote: On Wed, Aug 06, 2008 at 04:57:13PM +0200, Michael Andres wrote: Isn't this what the loglevel 6 (E_USR) was intended for? An absract of changes done to the system which is also loged into a separate file. Yes. The basic requirement is simple: better logging. Naturally the design is simple too: a function for the better logging. (I put it into a namespace to make room for its brother, a commit message from the admin.) E_USR and analogically y2user(fmt, ...) seems to imply the constraints shared by the other logging functions: the same log file, the same format... Log file and format should be possible to change. I'm not sure what you mean. During the design or at runtime? I mean it should be easy to implement a new log macro y2user in C++ that logs into a different file with a different format. Accessing that from YCP would also be easy and you get the %1 things for free. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] use ALog::Item
On Wed, Aug 06, 2008 at 05:53:58PM +0200, Arvin Schnell wrote: On Wed, Aug 06, 2008 at 05:41:49PM +0200, Martin Vidner wrote: On Wed, Aug 06, 2008 at 04:57:13PM +0200, Michael Andres wrote: On Wed, Aug 06, Martin Vidner wrote: ALog::Item(/etc/ntp.conf: added 'server ntp.example.org') ALog::Item(enabled /etd/init.d/ntp) ALog::Item(started /etd/init.d/ntp) ALog::CommitPopup() will lead to ALog::Note(set up ntp from local server) Isn't this what the loglevel 6 (E_USR) was intended for? An absract of changes done to the system which is also loged into a separate file. Yes. The basic requirement is simple: better logging. Naturally the design is simple too: a function for the better logging. (I put it into a namespace to make room for its brother, a commit message from the admin.) E_USR and analogically y2user(fmt, ...) seems to imply the constraints shared by the other logging functions: the same log file, the same format... Log file and format should be possible to change. The problem with ALog::Item is that it doesn't understand %1 syntax. Always using sformat is clumsy. Also ALog::Item is not accessible from C++ (in case anybody needs that). Access from libstorage seems idealistic since libstorage uses limal/blocxx stuff for logging. Since I now have a related feature (#305159) I had a look at the feature requests (#100386 and #303700). If logging is really required on such a detailed level then the logging has to be done in libstorage (C++) since the YCP code doesn't have that detailed knowledge. Callbacks would be another possibility. But I suppose logging is also required when libstorage is used by other programs so callbacks would only move the problem to those programs. Have a nice weekend Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Enforcing okButton and cancelButton
On Thu, Sep 04, 2008 at 03:45:36PM +0200, Stefan Hundhammer wrote: On Donnerstag, 4. September 2008, Jiří Suchomel wrote: Because of this: // Most YCP developers never use the return value of UI::OpenDialog(). That is a fact, and it was meant as a statement of fact. But... What should I do? Open a dialog stating that I coulnd't open a dialog? Or log an error and abort (what happens already)? Any action will just make the code unreadable for almost no benefit. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Enforcing okButton and cancelButton
On Thu, Sep 04, 2008 at 04:09:40PM +0200, Lukas Ocilka wrote: Arvin Schnell wrote: On Thu, Sep 04, 2008 at 03:45:36PM +0200, Stefan Hundhammer wrote: On Donnerstag, 4. September 2008, Jiří Suchomel wrote: Because of this: // Most YCP developers never use the return value of UI::OpenDialog(). That is a fact, and it was meant as a statement of fact. But... What should I do? Open a dialog stating that I coulnd't open a dialog? Or log an error and abort (what happens already)? But what you actually *can* do, is really checking whether opening the dialog was successful and only in that case you can close it. See this common example: [...] I will not clutter code with that stuff. With this brand new concept of object oriented programming the effect would be easy to achieve. Create an object that opens the dialog and remembers the status. In the destructor close the dialog. The dialog would even be closed when returning in the middle of the function. Just like fstream objects in C++. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[yast-devel] Minutes of Nürnber g YaST meeting 2008-10-07
Minutes of Nürnberg YaST meeting 2008-10-07 --- Present: aschnell, dmacvicar, gs, jdsn, ma, mantel, schubi, sh, snwint, tgoettlicher Minutes: aschnell - Beta 3 deadline is coming. - Usual complains about the amount of bug reports and the missing time between betas to fix them. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[yast-devel] Blinking Abort Button
Hi, does anybody have an idea what is going on here: https://bugzilla.novell.com/show_bug.cgi?id=441512#c6 I thought the label of the abort button might be set to Abort Installation (Label::AbortInstallationButton) but that label is only used in Wizard::BackAbortInstallationNextButtonBox and Wizard::AbortInstallationAcceptButtonBox and those functions are never used. Any ideas before I have to insert milestones at random places and run the live installation? ciao Arvin -- Arvin Schnell, [EMAIL PROTECTED] Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [yast-devel] Use URL::HidePassword() when logging an URL
On Wed, Nov 26, 2008 at 11:47:53AM +0100, Stefan Hundhammer wrote: On Mittwoch, 26. November 2008, Ladislav Slezak wrote: And of course, this won't help if Y2DEBUG is enabled. We would need a new datatype or a flag in the interpreter to fix it with Y2DEBUG enabled. I don't think this can be done in the general case: Both the YCP interpreter and the UI are logging entire statements or statement snippets. You can never tell what part of that might contain confidential data like passwords. Example: UI::OpenDialog(`VBox(..., `Password( _( Password: ), b1g*s3cr3t, ...); In full debug mode, the YCP interpreter will write this to the log, and if there is a YCP or a UI syntax error or another UI exception, the offending statement (which might easily contain something like the above example) will be logged. A nice feature would be to tell YCP that a string is a password and thus the string is never logged. ciao Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[yast-devel] libycp and iterators
Hi, I have made some changes to libycp most of you don't have to care about: The iterators for YCPMap and YCPList are now not self defined classes anymore but simply typedefs for the STL iterators. Thus they provide more operators now (e.g. operator--) and are better usable for STL algorithms because they contain informations about their iterator category (bidirectional and random access). Instead of: for (YCPMapIterator pos = map-begin (); pos != map-end (); ++pos) key = pos.key() value = pos.value() Please use: for (YCPMap::const_iterator pos = map-begin(); pos != map-end(); ++pos) key = pos-first value = pos-second That is used a few times outside of libycp. The old class YCPMapIterator does still work but I would like to remove it in a few months. ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] Nürnber g YaST team meeting minutes 2009-02-24
Nürnberg YaST team meeting minutes 2009-02-24 Present: aschnell, gs, jdsn, ma, mantel, schubi, snwint, tgoettlicher Absent: aorlovskyy, dmacvicar Minutes: aschnell aschnell: - Bug fixing - Code cleanup esp. modifications that affects other modules e.g. AutoYaST. gs: - Bug fixing jdsn: - Bug fixing - Wants to update YaST server to 11.1 ma: - Bug fixing - Explained problem that repositories on CD/DVD cannot be refreshed properly since there exists no connection between repositories and medium (only URL). So during refresh the medium present at that time is simply used even though the repository expects another medium. mantel: - Bug fixing - Working on RPM for puppet. Analysing modifications required for puppet to work on openSUSE. schubi: - Web-client code and API cleanup - Looking at translations for web-client. snwint: - Bug fixing. Some last minutes requests for SLES. - ITO: Improve X86 emulator used during monitor probing. tgoettlicher: - Looking and partly fixing bugs inherited from sh. - Recited question from Prague YaST team whether to create Code11-SP1 branch in svn now. Common opinion: No, too early. Possibly solution: Migrate to git. We all wish Duncan a quick recovery. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] Install packages by supplements from YCP?
On Wed, Feb 25, 2009 at 02:42:39PM +0100, Ladislav Slezak wrote: is it possible to install packages from YCP by using the supplements information? E.g. xfsprogs.spec contains Supplements: filesystem(xfs). I want to do something like this: Package::InstallAll([filesystem(xfs)]); Unfortunately this does not work. The minor problem is that the rpm check call is not properly escaped: 2009-02-25 14:29:24 3 muffin(17814) [bash] ShellCommand.cc(shellcommand):78 sh: -c: line 0: syntax error near unexpected token `(' 2009-02-25 14:29:24 3 muffin(17814) [bash] ShellCommand.cc(shellcommand):78 sh: -c: line 0: `rpm -q --whatprovides filesystem(xfs)' Well, missing shell quoting is likely a bug if not a security issue. The real problem is that Package::InstallAll() expects list of packages, not supplements. There is Pkg::PkgQueryProvides() call, but it works with provides set, supplements is something different :-( To support this functionality we would add a new pkg-binding. If you really need it then open a bug report or a FATE entry. Thanks, I'll do so. Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] Change to Storage Target Map
Hi, I would like to make a change to the storage target map. Currently hard disks used by dm multipath or dm raid can contain partitions in the target map. I want to remove those partitions entries in from the target map: So currently: /dev/mapper/isw_cfcdifeiii_test : $[ devices : [ /dev/sdc, /dev/sdd ], partitions : [ $[ detected_fs : `ext3, device : /dev/mapper/isw_cfcdifeiii_test_part1, fsid : 253, ... /dev/sdc : $[ partitions : [ $[ detected_fs : `ext3, device : /dev/sdc1, fsid : 253, ... used_by : isw_cfcdifeiii_test, used_by_device : /dev/mapper/isw_cfcdifeiii_test, used_by_type : `UB_DMRAID, ... will become: /dev/mapper/isw_cfcdifeiii_test : $[ devices : [ /dev/sdc, /dev/sdd ], partitions : [ $[ detected_fs : `ext3, device : /dev/mapper/isw_cfcdifeiii_test_part1, fsid : 253, ... /dev/sdc : $[ partitions : [ // HERE IS THE DIFFERENCE ] ... used_by : isw_cfcdifeiii_test, used_by_device : /dev/mapper/isw_cfcdifeiii_test, used_by_type : `UB_DMRAID, The change shouldn't affect any code. Those partitions entries are unreliable and cannot be used anyway. If you see a problem please say so now. The motivation behind this is simple: In the future libstorage can be changed to not even probe partitions on hard disks used by dm multipath or dm raid. That probing has caused bugs in the past. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] yast2-storage and libstorage
Hi, for those compiling yast from svn: libstorage is now a own project and not included in the yast svn anymore. Currently you can find libstorage: - buildservice project YaST:Head package libstorage - git.opensuse.org/project/libstorage ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] yast2 firstboot issue ...
On Thu, Jun 18, 2009 at 03:47:43PM +, Michael Meeks wrote: Hi guys, I'm having rather a mare of a time with firstboot - I've switched our Moblin:UI/Image-opensuse image away from SLE11 to base from openSUSE11.1 - and (it seems) in the process much has broken. For example, first-boot's X server no longer responds to any input ;-) this (it transpires) is because neither dbus nor hal are started - and our X server requires these to be there to get input. Who starts dbus and hal at firstboot (from init.d/boot) ? I suppose firstboot is identical to the second stage of normal installation. In that case hal and dbus are started by the YaST start scripts (in S06-services). ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] Is it allowed to modify one same list via foreach?
On Wed, Dec 02, 2009 at 02:22:06PM +0100, Johannes Meixner wrote: Hello, is such code allowed: list string words = [ Jane, John ]; integer index = -1; foreach( string word, words, { index = index + 1; words[index] = Hello + word; } ); Is in any case the result words == [ Hello Jane, Hello John ] ? Use maplist: words = maplist(string word, words, { return Hello + word; }); If it is not allowed, how to copy a list? Does list string words = [ Jane, John, Joe ]; list string copy = words; result two totally separated lists words and copy or does copy contain only a reference which points to words so that remove( copy, 1 ); would actually result copy == words == [ Jane, Joe ] ? No, a copy is made. AFAIR even in an efficient way using reference counting. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] questions concerning yast2-testsuite
Hi, I have some problems with the yast2 testsuite. When I run tests in storage y2base cannot find the libstorage bindings since they are not installed in the system. So I need to modify the Makefile.am get unfortunately gets overwritten by the testsuite. Is there any mechanism to handle specific changes to the files from the testsuite skeleton? Also I would like to change testsuite.exp to run all tests even after a failure. Objections? -foreach file $filenames { - if {[testsuite-run $file] 0} { -return - } -} +foreach file $filenames { testsuite-run $file } caio Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] questions concerning yast2-testsuite
On Fri, Dec 11, 2009 at 11:52:40AM +0100, Klaus Kaempf wrote: * Arvin Schnell aschn...@suse.de [Dec 11. 2009 11:44]: Hi, I have some problems with the yast2 testsuite. When I run tests in storage y2base cannot find the libstorage bindings since they are not installed in the system. So I need to modify the Makefile.am get unfortunately gets overwritten by the testsuite. Is there any mechanism to handle specific changes to the files from the testsuite skeleton? Hmm, YaST used to have command line options to add search pathes for includes (-I) and modules (-M). Is this what you're looking for ? No really. I know how to setup the paths with: YCPCFLAGS = -M ../../../bindings/ycp YCPC_LD_LIBRARY_PATH = ../../../bindings/src/.libs YCPC_Y2DIR = ../../../bindings/src/.libs But I cannot simply add them to the Makefile.am as that file gets overridden with the skeleton version. I also need SUBDIRS and EXTRA_DIST modifications to Makefile.am and modifications to runtest.sh. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] questions concerning yast2-testsuite
On Fri, Dec 11, 2009 at 12:40:11PM +0100, Martin Vidner wrote: Yes, this gets overwritten. But the testsuite is one part of classic YaST where I plan to do actual new development, having seen in rubyland that it does not have to be just a nusisance. So, let's work on fixing that. Do you have a patch? Yes, attached. It does these things: 1) I need extra files I have placed in a data dir so I need SUBDIRS. 2) I have YCP include files places in lib dir so I need EXTRA_DIST. 3) Continues with tests after failures. 4) Sets search paths. 5) I want to very only the Dump lines from the log so an extra grep has need inserted in runtest.sh ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] Y2DIR can contain multiple paths now
Hi, Y2DIR can contain multiple paths separated by : now. If you encounter any problems let me know. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
[yast-devel] NFSv4 in storage target-map
Hi, we have added NFSv4 support in yast2-storage. The detected_fs and used_fs in the target-map can be `nfs or `nfs4. Here is an example with one NFSv3 and one NFSv4 mount: /dev/nfs : $[ device : /dev/nfs, name : nfs, partitions : [ $[ detected_fs : `nfs, device : loki:/real-home/aschnell, fstopt : nosuid,relatime,rsize=8192,wsize=8192,namlen=255,nolock,timeo=600,retrans=2,sec=sys,mountaddr=10.10.222.40,mountvers=3,mountproto=udp, fstype : NFS, mount : /suse/aschnell, mountby : `device, name : loki:/real-home/aschnell, size_k : 867382072, type : `nfs, used_fs : `nfs ], $[ detected_fs : `nfs4, device : thalassa:/a, fstopt : defaults, fstype : NFS, mount : /test1, mountby : `device, name : thalassa:/a, size_k : 49542144, type : `nfs, used_fs : `nfs4 ] ], type : `CT_NFS ] ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] branches?
On Fri, Jul 02, 2010 at 10:05:25AM +0200, Arvin Schnell wrote: Hi, how about making branches for openSUSE 11.3 and Code11 SP2? Some hackers here always had strong opinions about branching but I cannot recall those. Since there was no response I created a SuSE-Linux-11_3-Branch branch for YaST now. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] Direction of YaST Architecture?
On Mon, Jan 31, 2011 at 10:53:51AM +0100, Klaus Kaempf wrote: Arvin, thanks a lot for stepping forward and starting this dicussion ! * Arvin Schnell aschn...@suse.de [Jan 28. 2011 16:50]: So what seems desirable and feasible? Some ideas: Which goals would you achieve by implementing these ideas ? From the company point of view I see these goal: - Keep YaST maintainable with a few people, not necessarily those that developed it the last ten years. - Easier integration of existing libraries, e.g. augeas, since we still have to implement new features. Right now we start to implement btrfs based snapshots where we will have a C++ library for the basic funcionality. - Make it easier for external contributions. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] Direction of YaST Architecture?
On Tue, Feb 01, 2011 at 12:48:57PM +0100, Josef Reidinger wrote: Maybe it could be interesting to define our requirements on language. from my POV it should: 1) be easy testable 2) high-level ( in general we don't care about programming language performance as we do many time consuming tasks and if we need good performance in some part then use bindings (see below)) 3) easy debugging (it is really annoying debug ycp via debugger) 4) easy profiling (it is hard to find bottle neck) 5) easy bind libraries, especially in C and C++ 6) object oriented with exception ( it is related to 2 as it would be great if we can easy share object ( now we share functions and global variables and it is sometime really pain. Exception is good for error handling. It e.g. allow easy decide if error is from user or programmer and allow proper error message) 7) have at least medium community and codebase so we are not alone to maintain it or be one of two maintainers 8) be enough mature, so we don't need to fight with language 9) allow easy sharing code like python eggs, ruby gem or perl cpan so we can share our work where it make sense and have more users ( or easy use same code also in other our products - just try remember if other our product use any code written in YCP) 10) Small runtime environment for installation medium. 11) Good licence. 12) Allow to reduce module dependencies. E.g. in YCP if an import fails the program terminates. In Python it is possible to use try import and simply reduce the functionality at runtime. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] WIP in SVN
On Tue, Jun 14, 2011 at 05:37:26PM +0200, Martin Vidner wrote: On Tue, Jun 14, 2011 at 04:47:02PM +0200, Jiri Suchomel wrote: Dne Út 14. června 2011 16:28:38 Martin Vidner napsal(a): + import YaPI::SubscriptionTools; Where is this module? I guess yast2.rpm should have a dependency on it. Yes, sure. But there are some unresolved things, so this is still WIP. I've just put my current work to svn. Hmm, since yast2.rpm is a dependency for almost everything, please make sure that it stays clean in case we need to release it because of something else. I have this problem right now: After a tiny change I cannot make a new package for factory. Please make a new package by Friday for the next milestone. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org For additional commands, e-mail: yast-devel+h...@opensuse.org
Re: [yast-devel] Re: [yast-commit] r66442 - /trunk/add-on-creator/src/AddOnCreator.ycp
On Fri, Oct 14, 2011 at 03:35:17PM +0200, Jiri Suchomel wrote: Dne Pá 14. října 2011 12:08:13 Ladislav Slezak napsal(a): Dne 14.10.2011 11:25, jsuch...@svn2.opensuse.org napsal(a): - SCR::Execute (.target.bash, sformat (cp %1 %2/, file_path, tmpdir)); + SCR::Execute (.target.bash, sformat (cp -- %1 %2/, file_path, tmpdir)); You could also change %1 to '%1' + add String::Quote() when changing all these commands... Yes, I thought about it for first, but then I realized that some other commands to which I pass the file path containing quote cannot handle it anyway, so it would be futile. What programms cannot handle the quotes? The shell parses the string so this should not confuse any program. Or wasn't .target.bash used in thoses cases? ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] y2dir ?
On Thu, Feb 16, 2012 at 09:07:40AM +0100, Per Jessen wrote: I'm trying to use Y2DIR to temporarily fix an iscsi issue during installation, but I simply cannot get it to work. As far as I can tell from /var/log/yast2/y2log, my Y2DIR setting is being ignored. I've tried starting yast: a) Y2DIR=/my2 yast b) export Y2DIR=/my2 yast In /my2 I have the following: # ls -l /my2 total 120 -rw-r--r-- 1 root root 87067 Feb 15 06:49 IscsiClientLib.ybc -rw-r--r-- 1 root root 28721 Feb 15 06:49 IscsiClientLib.ycp AFAIR modules still have to be in a modules directory. You have to follow the same structure as in /usr/share/YaST2. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] unable to kill off IMSM dialog box
On Fri, Feb 24, 2012 at 12:39:08PM -0600, Mike Coleman wrote: Hi, I'm trying to install onto an IMSM (fakeraid) drive with autoyast, and it seems to work okay, except that I cannot figure out a way to kill off the useless (to me) dialog box, which says You are running on the Intel(R) Matrix Storage Manager... ...Volume0 ... Do you want MD Partitionable RAID subsystem to manage these partitions? The default here is 'Yes', which works for me, and which looking in the code seems to mean use mdadm (whereas 'No' would mean use dmraid). I've tried adding imsmdriver config:type=symbolIMSM_MDADM/imsmdriver, but this doesn't seem to help. That does not work since the autoyast profile is loaded after the first probing where libstorage gives the popup. I've tried setting the device to /dev/md or /dev/md0, but this doesn't work. I've tried passing a kernel parameter of LIBSTORAGE_IMSM_DRIVER=mdadm or =IMSM_MDADM--no luck. LIBSTORAGE_IMSM_DRIVER=mdadm should work. Which version of SUSE are you using? Can you provide the YaST logs? Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Snapper: Missing directory /.snapshots makes snapper fail
On Tue, Mar 27, 2012 at 02:21:12AM +0200, Marcel Treis wrote: Hi, i just installed openSUSE 12.1 (x86_64). I tried to use Snapper but using the Yast2 plugin failed as well as sudo snapper create. var/log/snapper.log told me: libsnapper(3529) Snapshot.cc(nextNumber):362 - mkdir failed errno:2 (No such file or directory) Using strace i found that snapper needs the directory /.snapshots. After creating this directory, everything seems to be fine, i can now create snapshots, and Yast automatically creates them. Perhaps snapper could auto-magically create the directory if needed? Snapper creates that directory (as a subvolume) when you call snapper create-config ... as YaST does during installation. Perhaps the complete snapper.log shows why that failed. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] libxcrypt and and other reasons for build failures
On Wed, Mar 28, 2012 at 01:53:20PM +0200, Jiri Suchomel wrote: Dne St 28. března 2012 12:31:13, Gabriele Mohr napsal(a): Am 26.03.2012 14:45, schrieb Lukas Ocilka: On 03/26/2012 02:40 PM, Jiri Suchomel wrote: Dne Po 26. března 2012 14:17:09, Arvin Schnell napsal(a): Not really related, but still: some packages currently do not build because of failing testsuites. This is (at least partly) because of Gabi's change in FileUtils::Exists which now returns true only when .target.stat returns non- empty map. Some of our testuites rely on default (nil) value of .target.stat and expect FileUtils::Exists to return true. So please check as well if this is not a case for your modules. I have reverted my change in FileUtils::Exists(). It's unnessary to check the return of SCR::Read(.target.stat, target) for != nil because it will never return nil but an empty map if the file doesn't exist (should have had a closer look before doing the change). I have submitted yast2-2.22.5 to Factory (request id 111523) and with it the testsuites of affected modules should run again. Greetings Gabi Ouch! And I've already adapted my testsuites to your changes... If you instruct the testsuite SCR to return a useful map for .target.stat instead of nil your adaptions do not hurt and seem to be the right approach anymay. The problem with Fileutils::Exists was that its behaviour has changed when SCR::Read(.target.stat, ...) returns nil, which it never does for the real SCR. But it happens with the fake testsuite SCR unless the return value for .target.stat is specified. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Re: YCP substring() Was: YCP String operator [] and UTF-8
On Tue, Apr 03, 2012 at 11:07:57AM +0200, Ladislav Slezak wrote: Dne 3.4.2012 10:15, Klaus Kaempf napsal(a): Ooops, I just realized that the problem is actually in substring() function, [] operator works only with lists, maps or terms in YCP. (I'm using so many languages...). I used substring() to get one character. So the problematic call is actually: substring(áa, 1, 1); which returns \0xF1 instead of a as I expected. The documentation does not tell whether the substring() argument units are in bytes or characters. http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/substring-rest.html YCP has the function lsubstring: http://doc.opensuse.org/projects/YaST/openSUSE11.3/tdg/lsubstring-rest.html For many functions though there is no UTF-8 aware version, e.g. search, tolower, deletechars, findfirstof, ... Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] YCP String operator [] and UTF-8
On Thu, Apr 05, 2012 at 11:02:35AM +0200, Josef Reidinger wrote: I still think that main problem is that we want unicode strings in YaST, but we use in backend string. I think that now it is right time to try to switch string implementation to wstring and be ready to such change. I can create set of patches if someone is interested in it and test it. I also had a look at this. But changing the main member variable of YCPString from std::string to std::wstring is not trivial possible since the function value_cstr exposes it and that function is used not only in yast2-core. I also noticed that glibc does not provide regex functions for wchar_t. Here we would have to use boost adding a dependencies on libboost_regex. So maybe just fixing the few builtins is easier. My idea is to use std::string operations when the YCPStrings are ASCII, std::wstring otherwise. I checked how many YCPString are used and how many of these are non-ascii: Starting yast2 storage (in german locale) constructs about 15000 YCPStrings of which only 400 are non-ascii (almost all help texts). So the idea seems sane. You can find a patch in ~aschnell/Export/yast2-core-utf8.1.diff. Be aware that it changes to ABI of libycp, so you have to recompile a lot of stuff. Comments? Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Table sorting and locales in YaST UI
On Fri, May 04, 2012 at 10:51:51AM +0200, Jiri Srain wrote: Actually, anything that starts with a number should IMHO be sorted numerically according the number alone. The text, which is possibly appended to the number, should be taken into account only if there are two items with the same number (not the case mentioned above). Just for completeness, I don't think that we need to solve exceptions like e.g. date (where sorting should work according to the date), however, I'm not aware of any single place in YaST where it could be used. Sorting sizes in human format (e.g. 1.3 GB, 2.2 kB, 4.5 MB) could be used in the partitioner. But even if that would work sorting in the partitioner will remain disabled (use 'keepSorting) since the devices are sorted very special according to types (e.g. hard disk, LVM) and other information e.g. partition number or name. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Review Request (yast2-core)
Hi, I noticed that YaST prints garbage when the logfile cannot be opened. The problem is that strerror_r may leave buf untouched so you have to print the returned pointer (when using the GNU version of strerror_r). ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany Index: liby2util-r/src/y2log.cc === --- liby2util-r/src/y2log.cc (revision 68092) +++ liby2util-r/src/y2log.cc (working copy) @@ -119,10 +119,10 @@ FILE * newstderr = fdopen( dupstderr, a ); if ( newstderr == NULL ) { - char buf[100]; + char buf1[100]; //bnc#493152#c22 - strerror_r(errno, buf, sizeof(buf)-1); - fprintf( Y2LOG_STDERR, y2log: Can't fdopen new stderr: %s.\n, buf); + const char* buf2 = strerror_r(errno, buf1, sizeof(buf1)-1); + fprintf(Y2LOG_STDERR, y2log: Can't fdopen new stderr: %s.\n, buf2); } else { fcntl (fileno (newstderr), F_SETFD, fcntl (fileno (newstderr), F_GETFD) | FD_CLOEXEC); @@ -130,9 +130,9 @@ } } else { -char buf[100]; - strerror_r(errno, buf, sizeof(buf)-1); - fprintf( Y2LOG_STDERR, y2log: Can't dup stderr: %s.\n, buf ); + char buf1[100]; + const char* buf2 = strerror_r(errno, buf1, sizeof(buf1)-1); + fprintf(Y2LOG_STDERR, y2log: Can't dup stderr: %s.\n, buf2); } return 1; } @@ -150,10 +150,10 @@ logfile = fopen (logname, a); } if (!logfile !log_simple) { - char buf[100]; - strerror_r(errno, buf, sizeof(buf)-1); - fprintf (Y2LOG_STDERR, y2log: Error opening logfile '%s': %s.\n, - logname, buf); + char buf1[100]; + const char* buf2 = strerror_r(errno, buf1, sizeof(buf1)-1); + fprintf(Y2LOG_STDERR, y2log: Error opening logfile '%s': %s.\n, + logname, buf2); return NULL; } }
Re: [yast-devel] Snapper destructor
On Mon, Aug 13, 2012 at 11:03:44PM +0200, Erik Westrup wrote: Hello, when I issue snapper commands sometime the program leaves a logfile in CWD called Snapper destructor with contents like Is the file really called Snapper destructor or something like snapper.log? What are the CWDs you see that file? Do you use the command line tool snapper or the yast gui? 2012-08-12 00:01:01 MIL libsnapper(725) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 01:01:01 MIL libsnapper(597) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 02:01:01 MIL libsnapper(1232) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 03:01:01 MIL libsnapper(634) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 04:01:02 MIL libsnapper(596) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-13 22:01:01 MIL libsnapper(549) Snapper.cc(~Snapper):85 - Snapper destructor From the periodic times it seems likely that the file is created by the hourly cron job. I'm starting to get annoyed by these files. How come they are produced and how can I disable them? It will need more investigation to say that. The log message itself is clear but it should be contained in /var/log/snapper.log (when snapper is called as root but that's the only reasonable use currently). And if for some reason logging happens to another file there should be much more log messages, e.g. from the constructor. Can you provide the file /var/log/snapper.log so we can check whether the other log entries are there? Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Snapper destructor
On Mon, Aug 13, 2012 at 11:03:44PM +0200, Erik Westrup wrote: Hello, when I issue snapper commands sometime the program leaves a logfile in CWD called Snapper destructor with contents like 2012-08-12 00:01:01 MIL libsnapper(725) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 01:01:01 MIL libsnapper(597) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 02:01:01 MIL libsnapper(1232) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 03:01:01 MIL libsnapper(634) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-12 04:01:02 MIL libsnapper(596) Snapper.cc(~Snapper):85 - Snapper destructor 2012-08-13 22:01:01 MIL libsnapper(549) Snapper.cc(~Snapper):85 - Snapper destructor I'm starting to get annoyed by these files. How come they are produced and how can I disable them? Now I have an idea what is going wrong. In that case the file is only be created when snapper reports an error. Maybe you can verify that. I'll improve the code for the next release. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Snapper destructor
On Tue, Aug 14, 2012 at 05:14:07PM +0200, Erik Westrup wrote: On Tue 2012-08-14, Arvin Schnell wrote: On Mon, Aug 13, 2012 at 11:03:44PM +0200, Erik Westrup wrote: Hello, when I issue snapper commands sometime the program leaves a logfile in CWD called Snapper destructor with contents like Is the file really called Snapper destructor or something like snapper.log? What are the CWDs you see that file? Do you use the command line tool snapper or the yast gui? Yes it's called Snaapper destructor. I've tried to find out when these are created to verify my memories that the files is created in CWD and not in $HOME (which is CWD most of the time for me atm) but I've not succeded in this. I use the cli tool. I forgot to mention -- this is not on my OpenSuse box but my Arch Linux computer. Can you provide the file /var/log/snapper.log so we can check whether the other log entries are there? Thanks, but the log is from another time period. Anyway, since you use Arch Linux I suppose you have compiled snapper from the sources. Please try the latest version with the fix I added today. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Re: [PATCH 0/3] Snapper: propose some configuration options
On Wed, Aug 22, 2012 at 04:14:58PM +0200, Ondrej Kozina wrote: Hi Ondrej We would like to get snapper into Fedora official repository (and hopefully extend snapper's user/test base). Unfortunately Fedora doesn't support Ext4 snapshots in any way, so I have to to disable this feature inside snapper tool. Sure, I can create private patches for Fedora only which would cut out these snapshots, but I think it would be nice to have configuration option that would disable some unwanted features eventually. So I propose some very simple patch set that let you choose what snapshot types you want to disable. Thanks for the patches, I have applied them. If there are more things you need to integrate snapper in Fedora please let me know. Kind Regards, Arvin PS: openSUSE also does not provide ext4 snapshot support by default. The user has to install a special kernel and e2fsprogs. -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] YAST_IS_RUNNING possible values????
On Wed, Jan 09, 2013 at 05:13:45PM -0700, Roberto Angelino wrote: Yast Gurus, I have a question from my customer about this variable and what possible values their meaning are? Do we have any documentation available? Possible values set by YaST are yes and instsys. One place where the variable is used is parted: It behaves different during filesystem resize if it's set. AFAIR some RPM macros also use it. I'm not aware of any documentation. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] possible bug report: snapper dumps core
On Tue, Feb 05, 2013 at 07:09:37AM +0100, cars...@ags.tu-bs.de wrote: Hey, I'm running snapper on Arch Linux, using lvm thin provisioning for the snapshots. It seems to be working fine (I can create, mount, delete,... snapshots). However, after a command completes, some boost thread seems to die: what(): boost thread: thread not joinable: Invalid argument Aborted (core dumped) Thanks for reporting this. I don't have to problem here but I have found a similar bug (https://github.com/lodle/Desurium/issues/348). Apparently the boost thread interface has changed with boost 1.52. Could you try to integrate this patch: diff --git a/server/Background.cc b/server/Background.cc index dfc06e4..eada0e7 100644 --- a/server/Background.cc +++ b/server/Background.cc @@ -42,7 +42,9 @@ Backgrounds::Backgrounds() Backgrounds::~Backgrounds() { thread.interrupt(); -thread.join(); + +if (thread.joinable()) + thread.join(); } Another place to check for thread.joinable() could be Client::~Client(). If this is the wrong place for such a report, or, since it's not suse-related, there is no general interest, please tell me. If the patch doesn't help could you please open an issue on github. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Snapper configuration problem
On Thu, Jun 20, 2013 at 07:34:12PM +0800, Teng-Feng Yang wrote: Hi, I have cloned the latest source from the snapper git repo recently and use it to create and manage snapshots on thin volume created by dm-thin modules. Everything works perfectly until I want to allow users of group Domain/Backup Operators to create snapshot on this thin volume. I cannot set the ALLOW_GROUP parameter in the snapper config file to Domain/Backup Operators, since snapper takes space as the separator between groups. Therefore, Domain/Backup Operators will be processed as two separate groups Domain/Backup and Operators. Is it possible to allow such group in snapper config file? Hi Teng-Feng, right now it's not possible to have groups with spaces. According to the groupadd manpage this is not allowed. But as I have just learned via Samba you can get such group names. Since you have compiled snapper from source you can change it. In server/MetaSnapper.cc in line 190 change boost::split(groups, tmp, boost::is_any_of( \t), boost::token_compress_on); to, e.g. boost::split(groups, tmp, boost::is_any_of(:), boost::token_compress_on); Then groups have to be split by :. Unfortunately I cannot simply make that change upstream as it will break the configuration for other users. Please open an issue on GitHub so that I can find a proper solution. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Ruby code in SCR
On Fri, Jun 21, 2013 at 10:40:29AM +0200, Josef Reidinger wrote: On Thu, 20 Jun 2013 15:14:54 +0200 Klaus Kaempf kkae...@suse.de wrote: * Josef Reidinger jreidin...@suse.cz [Jun 20. 2013 13:37]: Idea is that installation should drive it. Agreed. SCR is implemented in way, that you must use SCR and SCR must be aware where it runs, so it is done on low level. Exactly. Put all the 'knowledge' into SCR and shield SCR users from this. And this is where I see problem. Let consider two main use cases for community developers who want to add new module to YaST or reuse part of YaST. 1) There is already config tool for qt and have library and I want to integrate it into YaST to get all benefits like three UIs, share with other parts of YaST, reuse code in other parts or use such configuration in add-on during install. ( we already use it e.g. for dbus calls, but I see there a much more opportunities ) So what I must do is to replace all system touching calls with SCR. For me it is really big obstacle as you must change almost complete program or have problem to reuse existing library. If you use high level call, then you can just said I need config library and run my GUI. And if it is in installation in add-on, then installation ensure that library and your client code is in place and call it in chroot, so you don't need any change. Is there actually a way to prevent developers to bypass SCR and simply use Ruby file operations or modules to access the system? And we shouldn't forbid others from what we do ourself, see libzypp and libstorage. Both don't use SCR. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Example module for demonstration refactoring
On Mon, Jul 29, 2013 at 11:19:42AM +0200, Martin Vidner wrote: On Mon, Jul 29, 2013 at 11:10:30AM +0200, Josef Reidinger wrote: Hi, as ruby conversion knocking on a door I want to make after conversion small demonstration how ruby can improve code. I don't want write hypothetical module but change real module. Does anyone have idea which relative small (network is not small :) module can be used as demonstration? I plan to demonstrate things like advanced testing in ruby, represent internal structures as objects or error handling with exceptions. FWIW, here are line counts of ruby files from the result directory: s390 0 Zero lines is not much. Was the module even converted? ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] YaST Ruby final conversion integration - DONE
On Wed, Jul 31, 2013 at 03:42:04PM +0200, David Majda wrote: we are pleased to announce that the final Ruby conversion of YaST YCP code to Ruby is over. The converted source was committed to Git [1], passed through Jenkins and builds successfully in YaST:Head [2]. Could you please reenable openSUSE 12.3 in YaST:Head so that we can install the great new packages on our systems? Or what is the best way to start development? ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Help: Lost in Ruby
Hi, I would like to use some classes in the converted ruby code but I have problems with function lookup. I have figured out how to call functions (e.g. ArrangeButtons from include/partitioning/ep-lib.rb in my class method by using module_function :ArrangeButtons in ep-lib.rb. The problem now is that the method deep_copy cannot be found inside ArrangeButtons. It works if I use include PartitioningEpLibInclude inside my class but I don't like to extend the classes with lots of general utility functions. So what's the correct way here? Attached is a patch. The error message is: Client call failed with undefined method `deep_copy' for Yast::PartitioningEpLibInclude:Module and backtrace [/usr/share/YaST2/include/partitioning/ep-lib.rb:503:in `ArrangeButtons', /usr/share/YaST2/include/partitioning/ep-all.rb:183:in `create', ... ciao Arvin diff --git a/src/include/partitioning/ep-all.rb b/src/include/partitioning/ep-all.rb index 1fd3f3b..176bda4 100644 --- a/src/include/partitioning/ep-all.rb +++ b/src/include/partitioning/ep-all.rb @@ -32,7 +32,12 @@ module Yast Yast.import PackageSystem end -def CreateAllPanel(user_data) + +class AllPanel TreePanelClass::Panel + + # include PartitioningEpLibInclude # don't like this + +def create(user_data) user_data = deep_copy(user_data) _IsAvailable = lambda do |client| #in the installed system, we don't care if the client isn't there @@ -175,7 +180,8 @@ module Yast table_header, table_contents ), -ArrangeButtons(buttons) +PartitioningEpLibInclude::ArrangeButtons(buttons) +# ArrangeButtons(buttons) ) ) ) @@ -211,7 +217,7 @@ module Yast end -def HandleAllPanel(user_data, event) +def handle(user_data, event) user_data = deep_copy(user_data) event = deep_copy(event) _CheckAndInstallPackages = lambda do |pkgs| @@ -351,5 +357,8 @@ module Yast nil end + +end + end end diff --git a/src/include/partitioning/ep-lib.rb b/src/include/partitioning/ep-lib.rb index 66c2b3a..39a4407 100644 --- a/src/include/partitioning/ep-lib.rb +++ b/src/include/partitioning/ep-lib.rb @@ -550,6 +550,9 @@ module Yast deep_copy(ret) end +module_function :ArrangeButtons + + def ChangeWidgetIfExists(wid, property, value) value = deep_copy(value) UI.ChangeWidget(Id(wid), property, value) if UI.WidgetExists(Id(wid)) diff --git a/src/include/partitioning/ep-main.rb b/src/include/partitioning/ep-main.rb index 57c7d72..752ea80 100644 --- a/src/include/partitioning/ep-main.rb +++ b/src/include/partitioning/ep-main.rb @@ -113,10 +113,7 @@ module Yast # TODO: somehow use AlwaysHideDisk data = { -:all = { - :create = fun_ref(method(:CreateAllPanel), void (any)), - :handle = fun_ref(method(:HandleAllPanel), void (any, map)) -}, +:all = { x: PartitioningEpAllInclude::AllPanel.new() }, :hd = { :create = fun_ref(method(:CreateHdMainPanel), void (any)), :handle = fun_ref(method(:HandleHdMainPanel), void (any, map)) diff --git a/src/modules/TreePanel.rb b/src/modules/TreePanel.rb index dea420e..935a9d1 100644 --- a/src/modules/TreePanel.rb +++ b/src/modules/TreePanel.rb @@ -45,20 +45,30 @@ module Yast @empty_panel = VBox(VStretch(), HStretch()) end + +class Panel Client# is Client the right class? + + def create(user_data) + end + + def refresh(user_data) + end + + def handle(user_data, event) + end + + def destroy(user_data) + end + +end + + def CallCreate tmp = Ops.get(@data, @current_item) - create_func = Convert.convert( -Ops.get(tmp, :create), -:from = any, -:to = void (any) - ) - if create_func != nil user_data = Ops.get(tmp, :user_data) -create_func.call(user_data) + tmp[:x].create(user_data) end - nil -end def CallRefresh tmp = Ops.get(@data, @current_item)
Re: [yast-devel] Help: Lost in Ruby
On Fri, Aug 09, 2013 at 04:58:22PM +0200, David Majda wrote: Hi, Dne 7.8.2013 12:01, Arvin Schnell napsal(a): Hi, I would like to use some classes in the converted ruby code but I have problems with function lookup. [...] So what's the correct way here? I didn't examine your patch in detail, but it seems to me that you are mixing Ruby concepts (classes, modules) with ones inherited from YaST (mainly includes). My general recommendations are the following: * If you create a new class, put it into a separate file, don't make it inherit from anything in Yast:: and don't make it part of any YaST client, module or include. That will ensure separation of concepts. One class per file is also usual convention in Ruby world. Where should the new file be placed and how do I include it? Remember, I'm new to Ruby. * If you need to use a YaST module in your class, then just import it and use it -- that should work well. With Yast.import, right? * If you need to use a YaST include in the class, include it via Ruby include as a Ruby module and call its initialize_* method (if any) manually in the constructor. You correctly note that this is ugly. The better way is probably to extract the include functionality you need into a separate Ruby class/module, use it in your class, and just delegate to the extracted part in the include. That sound like it involves moving lots of code, more or less all ep-*.rb files. And even then all calls to the extracted functions must be changed to include a namespace, e.g. from doit() to Foo.doit(). Since all mistakes only show up at runtime that's hopeless. * If you need to use any part of Ruby bindings (e.g. UI shortcuts) in your class, just include the appropriate module. This may lead to some duplication if you do it in many classes, which we will probably need to address soon (in order to prevent everybody doing his own thing). I would do so in a dozen of classes. Thanks for the help, but I think for the near future I have to put my ideas on ice. ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Bug in Ruby code with arg_ref
Hi, we had a strange bug in yast-storage with the Ruby code for adding new LVM logical volumes (also see bng #834330). In ep-lvm-lib.rb the function EpCreateLogicalVolume has a local variable data. That variable is passed by reference to DlgCreateLogicalVolume in ep-lvm-dialogs.rb along with a reference to the function Commit. Commit use data. So the code looks roughly like this: def EpCreateLogicalVolume(device) data = { ... } _Commit = lambda do do something with data end data_ref = arg_ref(data); DlgCreateLogicalVolume(data_ref, fun_ref(_Commit, symbol ())) data = data_ref.value; end def DlgCreateLogicalVolume(data, _Commit) modify data _Commit.call end The problem is that data when used in Commit has wrong values; it's neither the original value set in EpCreateLogicalVolume nor the value set in DlgCreateLogicalVolume but some mixture. It's caused by the fact that data = data_ref.value happens after calling Commit. We fixed this by passing data to Commit explicitely. ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] simple ruby client to test SCR code?
Hi, what is the simplest Ruby based client to test SCR code? I tried something like this: module X include Yast r = SCR.Execute(path(.target.bash), /usr/bin/true) Builtins.y2milestone(r) end but here path is undefined. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Yast and CI
On Wed, Sep 11, 2013 at 02:58:32PM +0200, Josef Reidinger wrote: testing: current it test only changes in master branch. How important for you if we automatic test also pull requests and maintenance branches? Related question is how important for us is to have generated package.spec file as it quite block more generic solutions. Automatic pull requests for branches would be nice. Packaging for old distros usually requires a development system for that distro. Generating the spec file looks like a must to me. Manual editing VERSION and LIBVERSION changes is error-prone. autosubmit: Are you satisfied with current autosubmit to Yast:Head? And what about automatic submit to factory? What is criteria to submit to Yast:Head and to factory? Do you want it automatic or some someautomatic or manual step is better from your POV? I never know whether the autosubmit to factory works. Right now I'm expecting submitrequests but there aren't any. I have no idea where to look for a status or problem. The build node (for YaST:Head) should use packages from openSUSE:Factory. E.g. libbtrfs-devel is not available in 12.3 but required for yast2-snapper now. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Action Needed: Devtools Cleaning - what tools do you use?
On Wed, Sep 25, 2013 at 03:09:01PM +0200, Josef Reidinger wrote: Hi, I plan to clean a bit ... ergh, clean almost whole yast2-devtools. At first I would like to mention why I think it is important and what is benefits and then how I would like to do it. So please write which tools from yast2-devtools you use for current master development and how you use it. If you don't write it, there is quite big chance that such tool will be removed. ycp_puttext is needed once in a while. Should of course be updated to work with Ruby. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] devtools problem
Hi, AFAIS the check for ycpc has been removed from yast2-devtools so YCPC is no longer defined in Makefile.am. But it's still used in /devtools/admin/Makefile.am.common. As a result I currently cannot run make pckage-local for yast2-storage. ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Packages not dropped and not in Yast:Head
On Wed, Oct 09, 2013 at 10:45:04AM +0200, Josef Reidinger wrote: Hi, when I creating jobs on jenkins I found that we have bunch of modules that is not dropped ( no single README.md ) and also not in Yast:Head, so in fact testing on opensuse is not possible. What has README.md to do with package dropping? Below is list of such modules ( please comment if modules are living or should be dropped and reason why it is not in yast:head ): s390 Still needed for S/390 on SLE. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] YaST installer - the future development (for 13.2/SLE12, aka the new installer) - more details
On Wed, Oct 16, 2013 at 07:55:13PM +0400, Andrey Borzenkov wrote: В Wed, 16 Oct 2013 16:58:02 +0200 Ladislav Slezak lsle...@suse.cz пишет: Dne 26.9.2013 20:07, Ladislav Slezak napsal(a): Hi all, The SUSE YaST team started developing some major YaST features for SUSE Linux Enterprise 12 (SLE12) installer and we would like to include these features in the next openSUSE-13.2 release. [...] More details about the current proposal will be published later. So here we go: https://github.com/yast/yast-installation/wiki/New-Installer There are details, proposals, ideas and thoughts how to improve the YaST installer. Some features are optional and likely won't make it into SLE12/openSUSE-13.2 (like the installation server proposal) due to complexity and lack of developers. If you have any questions, comments... feel free to ask here. Is btrfs based layout on topic here or should I bring it up on factory? The default filesystem or partitioning layout are not decided within the YaST team. So indeed opensuse-factory should be a better place for discussions about that. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Using Frames on SLES11SP3
On Fri, Nov 08, 2013 at 04:17:17AM -0700, Suresh K Hosamani wrote: Hi, I have a small piece of code, if I run it in ncurses mode, it frame contents are displayed in a box, but if I run the same code in gtk it doesnt display it in box. I once reported the missing frame as a bug (https://bugzilla.novell.com/show_bug.cgi?id=791897) but was told that it's on purpose (https://github.com/libyui/libyui-gtk/blob/master/src/YGFrame.cc#L11). Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] YaST vs Yast?
On Thu, Jan 09, 2014 at 09:54:11AM +0100, Ladislav Slezak wrote: Dne 9.1.2014 08:41, Steffen Winterfeldt napsal(a): [...] That depends on what you mean. Do you just want to refer to the project officially as 'Yast'? Fine with me. Oh, sorry for not being clear... Yes, I meant the project name. Or do you want to replace YaST with Yast everywhere where it's used as in file names like /var/lib/YaST2/ or X-SuSE-YaST-* in desktop files or whereever else in the code? Changing path names, script names, tags in files, etc... is dangerous and I would object it. In that case it would be even more inconsistent after the change so I'm against it. And I'm even more against it if renaming path is also intended. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] who is the maintainer?
Hi, while reassigning yast-maintainers bugs I noticed that once again the maintainer/bugowner information is inconsistent: The content of the MAINTAINER file in git differs from the output of 'osc maintainer' or 'osc bugowner'. This leads to confusion. We had this problem before and apparently fail to solve the inconsistency long term. So I propose to drop the MAINTAINER file in git and rely on osc. Instead we can have a AUTHORS files so that people not knowing about osc can still reach the authors. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] who is the maintainer?
On Thu, Jan 09, 2014 at 11:48:06AM +0100, Arvin Schnell wrote: while reassigning yast-maintainers bugs I noticed that once again the maintainer/bugowner information is inconsistent: The content of the MAINTAINER file in git differs from the output of 'osc maintainer' or 'osc bugowner'. This leads to confusion. We had this problem before and apparently fail to solve the inconsistency long term. So I propose to drop the MAINTAINER file in git and rely on osc. Instead we can have a AUTHORS files so that people not knowing about osc can still reach the authors. During a telco we reached following conclusion: - The buildservice is the offical source for maintainer information. - The MAINTAINER files will be changed to include a note: use 'osc maintainer / bugowner package-name' to query the maintainer and bugowner - Martin will commit a README that will also include notes how to reach developers. Martin, it would be cool if you could also update the MAINTAINER files during the README mass-commit. - The MAINTAINER files could be removed in the future when everybody has learn to use osc. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] until in ruby
Hi, I was looking for a until loop in Ruby and found this: begin code end until condition It is heavily used in the generated code. Unfortunately the Ruby inventor himself doesn't like this and would like to remove it, see: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6741 AFAIS there's no real until loop in Ruby. The common suggestion is to use loop: loop do code break condition end Is that true? Or do newer Ruby version offer a real until loop? Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Request 214790 changed to superseded (submit openSUSE:Factory/yast2-storage)
Visit https://build.opensuse.org/request/show/214790 State of request 214790 was changed by aschnell: declined - superseded Comment: superseded by 215017 Actions: - submit YaST:Head/yast2-storage = openSUSE:Factory/yast2-storage -- Configure notifications at https://build.opensuse.org/user/notifications openSUSE Build Service (https://build.opensuse.org/) -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Request 215238 changed to declined (submit openSUSE:Factory/yast2-s390)
On Mon, Jan 27, 2014 at 01:43:33PM +0100, Tomáš Chvátal wrote: Visit https://build.opensuse.org/request/show/215238 State of request 215238 was changed by scarabeus_factory: review - declined Comment: revoke as it is not really needed on Facotyr as the code is s390 specific. The package is already part of openSUSE:Factory. Why reject an update? Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Request 215269 created by jreidinger (delete openSUSE:Factory/yast2-s390)
On Mon, Jan 27, 2014 at 02:11:14PM +0100, Steffen Winterfeldt wrote: On Mon, 27 Jan 2014, Josef Reidinger wrote: Visit https://build.opensuse.org/request/show/215269 Description: It is exclusive only for s390, so no reason to have it in factory. Actions: - delete package openSUSE:Factory/yast2-s390 Seriously, why? Just because someone rejected a patch? The package has lived peacefully in Factory for years. And great that the maintainer isn't even asked. Maybe someone else wants to take over maintainership. After all I don't know what I have to do with that package anymore. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] [RFC] make Builtins.y2milestone(), y2...() obsolete?
On Tue, Feb 04, 2014 at 11:16:27AM +0100, Ladislav Slezak wrote: another change in yast2-ruby-bindings-3.1.7 is a new Yast::Logger module which wraps Y2Logger mentioned in the previous mail. The latest version of yast2-storage doesn't build on openSUSE 12.3 anymore and it seems to be due to the new logging: Client call failed with 'undefined method `synchronize' for #Mutex:0xfa0eb0' and backtrace [/usr/lib64/ruby/1.9.1/singleton.rb:139:in `instance', /usr/lib64/ruby/vendor_ruby/1.9.1/yast/y2logger.rb:70:in `log', /usr/share/YaST2/modules/Storage.rb:324:in `InitLibstorage', /home/abuild/rpmbuild/BUILD/yast2-storage-3.1.10/testsuite/tests/helper1b.rb:11:in `initialize_helper1b', /usr/lib64/ruby/vendor_ruby/1.9.1/yast/yast.rb:135:in `include', /home/abuild/rpmbuild/BUILD/yast2-storage-3.1.10/testsuite/tests/empty1.rb:22:in `main', /home/abuild/rpmbuild/BUILD/yast2-storage-3.1.10/testsuite/tests/empty1.rb:30:in `top (required)', /usr/lib64/ruby/vendor_ruby/1.9.1/yast/wfm.rb:184:in `eval', /usr/lib64/ruby/vendor_ruby/1.9.1/yast/wfm.rb:184:in `run_client'] So please either fix the issue or remove openSUSE 12.3 from YaST:Head. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Never include anything in global namespace
On Fri, Feb 28, 2014 at 03:41:14PM +0100, Josef Reidinger wrote: I just would like to remind that noone should include/extend anything to global namespace in his ruby code. It affects clients, modules, libs and also includes. The most visible part is `include Yast` which cause that all modules living in Yast namespace start living in global namespace and start colliding with ruby classes and modules. But also other smaller modules can cause problem. Sadly Ruby uses the term include for something fundamentally different to most other languages, most prominently C (and YCP). No wonder mistakes like that happen. Also see: http://stackoverflow.com/questions/318144/what-is-the-difference-between-include-and-require-in-ruby Oddly enough, Ruby's require is analogous to C's include, while Ruby's include is almost nothing like C's include. http://ruby.about.com/b/2008/10/23/a-quick-peek-at-ruby-include-vs-require.htm This can be confusing as the include verb is used very differently in other languages. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] rpmlint warnings
On Tue, Mar 04, 2014 at 03:44:15PM +0100, Martin Vidner wrote: Hi, an openSUSE reviewer has just dropped by to remind us that our packages produce too many rpmlint warnings. In particular, here: ERRORS: $ grep [1-9].errors *.log kupdateapplet.log:[ 132s] 4 packages and 0 specfiles checked; 3 errors, 19 warnings. libstorage.log:[ 1027s] 6 packages and 0 specfiles checked; 1 errors, 13 warnings. libyui.log:[ 95s] 3 packages and 0 specfiles checked; 1 errors, 3 warnings. skelcd-control-openSUSE-LangAddOn.log:[ 46s] 2 packages and 0 specfiles checked; 2 errors, 3 warnings. yast2-branding-openSUSE.log:[ 62s] 2 packages and 0 specfiles checked; 2 errors, 10 warnings. yast2-devtools.log:[ 29s] 3 packages and 0 specfiles checked; 1 errors, 4 warnings. yast2-hardware-detection.log:[ 117s] 2 packages and 0 specfiles checked; 1 errors, 8 warnings. yast2-ldap.log:[ 124s] 2 packages and 0 specfiles checked; 1 errors, 8 warnings. yast2-perl-bindings.log:[ 172s] 2 packages and 0 specfiles checked; 2 errors, 4 warnings. yast2-pkg-bindings.log:[ 353s] 2 packages and 0 specfiles checked; 1 errors, 2 warnings. yast2-python-bindings.log:[ 144s] 2 packages and 0 specfiles checked; 4 errors, 4 warnings. yast2-slide-show.log:[ 127s] 4 packages and 0 specfiles checked; 1 errors, 31 warnings. yast2-slp.log:[ 148s] 2 packages and 0 specfiles checked; 1 errors, 6 warnings. yast2-snapper.log:[ 214s] 2 packages and 0 specfiles checked; 1 errors, 11 warnings. The error is: yast2-snapper.x86_64: E: devel-file-in-non-devel-package (Badness: 50) /usr/lib64/YaST2/plugin/libpy2ag_snapper.so That does not look like an error in yast2-snapper but in rpmlint. Regards, Arvin -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] transfer HA-related yast2 module to nwang
On Wed, Apr 02, 2014 at 03:45:00PM +0800, Dongmao Zhang wrote: Dear list. I would like to transfer the maintainer of yast2 modules below to Nick Wang who is now a member of our Bejing HA team. I have changed the MAINTAINER file in github's repository. So please Please also change the maintainer and bugowner information in the build services. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] snapper timeline_limit not working as expected...
On Wed, May 28, 2014 at 09:51:10AM +, Zorn, Sascha wrote: I've recently started to use snapper to snapshot a subvolume and set the TIMELINE config to: # cleanup hourly snapshots after some time TIMELINE_CLEANUP=yes # limits for timeline cleanup TIMELINE_MIN_AGE=1800 TIMELINE_LIMIT_HOURLY=2 // should keep two hourly's TIMELINE_LIMIT_DAILY=20 TIMELINE_LIMIT_MONTHLY=12 TIMELINE_LIMIT_YEARLY=0 But I now see this: snapper -c dev list Type | # | Pre # | Date | User | Cleanup | Description | Userdata ---++---+--+--+--+-+- single | 0 | | | root | | current | single | 21 | | Mon 26 May 2014 12:01:02 AM CEST | root | timeline | timeline | single | 45 | | Tue 27 May 2014 12:01:02 AM CEST | root | timeline | timeline | single | 69 | | Wed 28 May 2014 12:01:02 AM CEST | root | timeline | timeline | single | 71 | | Wed 28 May 2014 02:01:02 AM CEST | root | timeline | timeline | single | 72 | | Wed 28 May 2014 03:01:03 AM CEST | root | timeline | timeline | single | 73 | | Wed 28 May 2014 04:01:02 AM CEST | root | timeline | timeline | single | 74 | | Wed 28 May 2014 05:01:01 AM CEST | root | timeline | timeline | single | 75 | | Wed 28 May 2014 06:01:02 AM CEST | root | timeline | timeline | single | 76 | | Wed 28 May 2014 07:01:02 AM CEST | root | timeline | timeline | single | 77 | | Wed 28 May 2014 08:01:02 AM CEST | root | timeline | timeline | single | 78 | | Wed 28 May 2014 09:01:02 AM CEST | root | timeline | timeline | single | 79 | | Wed 28 May 2014 10:01:02 AM CEST | root | timeline | timeline | single | 80 | | Wed 28 May 2014 11:01:02 AM CEST | root | timeline | timeline | 21 and 45 seems to be DAYLIES. But 69-80 are 11 snapshots, with 70 missing. So maybe 69 is a daily as well. (12 AM is really confusing me. BTW, is there a way to change the timeformat?) But I'm just wondering what is going on here with 71-80? This is certainly more than 2 hourlys. Snapper creats a snapshot every hour and deletes snapshots once a day. After that cleanup the number of snapshots will match the numbers from the config file. But after some hours the number of snapshots will have increased again. I've used rsnapshot before and configured cron to run two hourly's a day. I though with TIMELINE_LIMIT_HOURLY=2 would also only keep two snapshots. No, snapper work different that rsnapshot as explained above. I don't like the rsnapshot algorithm since it assumes your system is running all the time. With snapper you can have your system run infrequently and still have a snapshot about once a month in the long run. Also it would be nice if the description could be updated to timeline - daily to indicate it is kept because of some rule. That could mean that the description of a snapshots changes over time. E.g. a snapshot that is keep today due to the hourly limit could be keep tomorror due to the daily limit. Kind Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Yast Development after SLE 12
On Thu, Jun 12, 2014 at 04:30:06PM +0200, Lukas Ocilka wrote: - Which parts deserve the refactoring (e.g., those that we often touch, those, that are not understandable anymore, buggy, ...)? Which are your most-favorite ones? Every module I have seen has code that needs refactoring. - How deep should the refactoring be, we have to keep the current API, but what should be considered the API as we might be the only users? Very deep, e.g. the target map of storage is a error prone interface. - Where and how to run automatic integration tests? Will openQA help? We could build our own installation image the same way we did it for the New Installer, testing this image automatically is just another logical step. This is the most important point I see. So far adding testcases (which is required!) is often not done because we don't have existing testsuites or changing the code to be testable requires a big rewrite. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Yast Development after SLE 12: What
On Thu, Jul 03, 2014 at 03:52:29PM +0200, Martin Vidner wrote: What to refactor I have used dirty cheap tricks to produce some initial metrics to help us decide what to refactor, on a package level. Pepa has also suggested other metrics, but they work on file level and are not so cheap. Top 10 results are inlined, complete in attachments. 2) Features 3) Bugs Have you noticed Features and Bugs have the exact same packages in top 7 places? Nice ;) Did you check how features and bugs correlate to code size? Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Moving stuff from /sbin /bin /lib /lib64 to /usr/*
On Mon, Jul 07, 2014 at 02:11:48PM +0200, Lukas Ocilka wrote: On 7.7.2014 14:07, Josef Reidinger wrote: I have general question and I think answer to it should be somewhere written as documented decision. Why we use absolute path to binary? I think proper set PATH in environment should be goal and use common path. Also from security point of view it is quite useless because if PATH is attacked, then also any real root action is attacked. Sure, I myself also prefer the shorter way, but I think it was because of security. Let's ask our security expert if this is really the case, or whether it has changed meanwhile. Bug https://bugzilla.novell.com/show_bug.cgi?id=794084 mentions some reasons. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Moving stuff from /sbin /bin /lib /lib64 to /usr/*
On Mon, Jul 07, 2014 at 02:23:36PM +0200, Josef Reidinger wrote: On Mon, 7 Jul 2014 14:17:40 +0200 Arvin Schnell aschn...@suse.de wrote: On Mon, Jul 07, 2014 at 02:11:48PM +0200, Lukas Ocilka wrote: On 7.7.2014 14:07, Josef Reidinger wrote: I have general question and I think answer to it should be somewhere written as documented decision. Why we use absolute path to binary? I think proper set PATH in environment should be goal and use common path. Also from security point of view it is quite useless because if PATH is attacked, then also any real root action is attacked. Sure, I myself also prefer the shorter way, but I think it was because of security. Let's ask our security expert if this is really the case, or whether it has changed meanwhile. Bug https://bugzilla.novell.com/show_bug.cgi?id=794084 mentions some reasons. Regards, Arvin I see some reasons, but I worry that we need to proper fix PATH But how, esp. if we want to make parts of YaST available as libraries (modules/gems)? From my point of a library should work with any PATH variable. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Moving stuff from /sbin /bin /lib /lib64 to /usr/*
On Mon, Jul 07, 2014 at 03:01:40PM +0200, Josef Reidinger wrote: On other hand absolute path can make troubles to use library/gem on non-suse systems or even on older suse systems, which is wrong from my POV. Yes, that's why I dislike all this moving of binaries. So I think resolution can be use PATH for common binaries and for specific binaries use absolute path. Paving the path to security issues? I suppose developers just use a library and expect it to be safe independent of PATH. For libstorage that's my objective. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Moving stuff from /sbin /bin /lib /lib64 to /usr/*
On Mon, Jul 07, 2014 at 03:30:52PM +0200, Josef Reidinger wrote: On Mon, 7 Jul 2014 15:22:24 +0200 Arvin Schnell aschn...@suse.de wrote: On Mon, Jul 07, 2014 at 03:01:40PM +0200, Josef Reidinger wrote: On other hand absolute path can make troubles to use library/gem on non-suse systems or even on older suse systems, which is wrong from my POV. Yes, that's why I dislike all this moving of binaries. I agree, I also do not see benefit of this step. So I think resolution can be use PATH for common binaries and for specific binaries use absolute path. Paving the path to security issues? I suppose developers just use a library and expect it to be safe independent of PATH. For libstorage that's my objective. Maybe we can look around how other tools do this task and collect possible ideas how to solve it? Sure, I just grepped for bin/ in my upstream git repos directory and found e.g. (more than 200): ./hwinfo/src/hd/block.c: hd_data-lsscsi = read_file(|/usr/bin/lsscsi -t 2/dev/null, 0, 0); ./hwinfo/src/hd/net.c: str_printf(buf, 0, |/usr/sbin/ethtool -e %s 2/dev/null, hd-unix_dev_name); ./linux-pam/modules/pam_xauth/pam_xauth.c: /usr/bin/X11/xauth ./linux-pam/modules/pam_namespace/pam_namespace.c: if (execle(/bin/rm, /bin/rm, -rf, pptr-instance_prefix, NULL, envp) 0) ./glibc/stdio-common/test-popen.c: output = popen(/bin/cat, m); ./xfsprogs/libdisk/dm.c: else if (!access(/sbin/dmsetup, R_OK|X_OK)) ./libyui/libyui-gtk/src/YGDialog.cc: ret = system (/usr/bin/xterm ); ./libzypp/zypp/KeyRing.cc: #define GPG_BINARY /usr/bin/gpg2 ./libzypp/tests/zypp/PluginFrame_test.cc: PluginScript scr( /bin/cat ); And in all systemd service files I couldn't find a single Exec statement without a full path. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] yast Mode.* variables
On Tue, Jul 22, 2014 at 11:54:23AM +0200, Steffen Winterfeldt wrote: Having just learned about the Mode.autoupgrade variable I did some research and found a total of 12 instances of Mode.* (maybe I missed some): I think they should not only be prominently documented but preferably the number should be reduced. They are a nuisance and one of the reasons yast is so hard to debug. There's always some use case with some unexpected combination of them. This just asks for trouble. I second that. When I was fixing some bugs for the yast2-s390 module it was (and still is) unclear to me what combination of Mode and Stage settings are possible and how e.g. the Read, Write, Import, Export functions should behave depending on the settings. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] very unimpressed by found changes
On Fri, Jul 25, 2014 at 10:52:26AM +0200, Josef Reidinger wrote: When I open Fstab options after having selected volume label as the default mount by, why for a freshly formatted target / partition with volume label is UUID preselected instead of Volume Label? Question for Arvin - added to CC. As long as you have not set a label the mount method cannot be by-label. It's also unclear e.g. whether you *create* the volume before or after you have set the default mount-by method. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Why not place refactoring in backlog
On Wed, Jul 30, 2014 at 03:32:50PM +0200, Josef Reidinger wrote: I found this nice article[1] that nicely and visible summarize all my arguments why refactoring should not be separated tasks, but integral part of all work. I think it deserve reading. In general I agree with the article but it doesn't apply to YaST since we already have years of backlog for refactoring. So for us making it correct does not take a little bit longer but likely several times as long. Also doing a bit refactoring always has the risk of regressions and without unit tests *and* integration tests these are hard to discover so often I just do not dare. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Why not place refactoring in backlog
On Thu, Jul 31, 2014 at 10:33:02AM +0200, Josef Reidinger wrote: In this case it is not so easy, but there is ways. E.g. one of possible ways is to write test as part of change, then refactor as you are more brave to do it. There is also parts which is very hard to test as it have many side-effects or keep states. I think in such situation you can do minimal modification to make it more testable, write test that proves it and then refactor it more deeply. e.g. in this pull request - https://github.com/yast/yast-bootloader/pull/127 I at first modify changeOrderInDeviceMapping to not modify directly @device_mapping, but have it as parameter, write tests for it and then add functionality I need with additional tests. In general any change that improve isolation of method greatly helps with testing of it. Another think I am trying to do, is to break it more in earlier phases ( like when I implement features as my impression is that each feature contain at least one bug :), so I made bigger changes and were more brave, writed tests for it and when some regressions apeared, then I improve tests to prevent it and also can refactor more aggressive this new code when it is needed. I could also give examples where I refactored something during feature development but I can also give examples where it did not work: - Last year I tried to make some dialog in yast2-storage object oriented. As discussed on this list with the strange ruby mixin a major rewrite would have been required. - One bug requests a small partition (within the size of cylinders). Since YaST calculates in cylinders this is problematic. Changes will require modification to various modules (e.g. libstorage, yast2-storage, yast2-bootloader, likely also AutoYaST). Didn't happen due to no time at all - at least on my side. So I still have not seen a reasonable concept how to improve the situation with YaST. One thing I consider a requirement are automated integration test as discussed before. But half a year later still no progress. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] What to do with bugs for unmaintained modules?
On Mon, Aug 11, 2014 at 05:31:18PM +0200, Lukas Ocilka wrote: On 11.8.2014 17:13, Steffen Winterfeldt wrote: Hi, there's quite some bugs in yast2-maintainers for modules without official maintainer. Instead of asking around, trying the previous maintainer, or the unlucky last patch submitter I suggest to prepend [MODULE_NAME] to the subject and leave the bug in yast2-maintainers. And everyone looking for something to do and/or feeling responsible in this area can pick it up and assign to him/herself. What do you think? I'm looking at it from a bit different point of view, but your suggested solution would work. Is just adding the module-name also OK for P1, L3 and ship-stoppers and alike? Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] snapper.io, broken link to youtube video's
On Tue, Aug 12, 2014 at 11:43:16PM +0200, S. Giebels wrote: On http://snapper.io/ the video Greg Kroah-Hartman and Matthias Eckermann play sysadmins and ruin a web server configuration. Links to: www.youtube.com/v/9H7e6BcI5Fo?start=209 Works but only with flash-player. Link URL should probably be: www.youtube.com/watch?v=9H7e6BcI5Fo?t=209 Here the start time does not work. After some research I have changed the URL to http://www.youtube.com/watch?v=9H7e6BcI5Fot=3m29s which works with and without flash-player and starts at the correct time. Thanks for reporting. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] SLE12 GIT branch? - match contents
On Tue, Sep 02, 2014 at 11:09:15AM +0200, Lukas Ocilka wrote: PLS, also remember that I'd like to branch SLE12-SP1 maintenance from master to keep the development of master/openSUSE/SLE12-SP1 as close as possible - as long as possible. Do I understand this right: You want to base YaST on SLE12 SP1 on master in about a year instead of SLE12? Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] SLE12 GIT branch? - match contents
On Tue, Sep 02, 2014 at 11:24:41AM +0200, Lukas Ocilka wrote: On 2.9.2014 11:20, Arvin Schnell wrote: On Tue, Sep 02, 2014 at 11:09:15AM +0200, Lukas Ocilka wrote: PLS, also remember that I'd like to branch SLE12-SP1 maintenance from master to keep the development of master/openSUSE/SLE12-SP1 as close as possible - as long as possible. Do I understand this right: You want to base YaST on SLE12 SP1 on master in about a year instead of SLE12? Yes, I already wrote about it a few ... hmm, months ago. There will be a lot of refactoring in master, but we are going to maintain SLE 12 for many years, so the same refactoring should go to SLE 12 SP1. In fact, there are plans for having SLE and openSUSE much closer than before. More to be announced soon, hopefully. An announcement is a requirement since your proposal does not match the current maintenance model. Regards, Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] An idea for integration tests
On Fri, Sep 26, 2014 at 03:24:13PM +0200, Ancor Gonzalez Sosa wrote: Since I was tired of the Trello card I spent the whole workshop working on and being inspired by Flavio's talk, I switched my mind this morning to the integration tests card. I had an idea for writing tests with much less stubbing (using a virtual system) than I think is worth trying. Explained (together with some braindumping) at https://public.pad.fsfe.org/p/yast-integration-tests Unfortunately for this approach several components do not interact via SCR with the system, e.g. libzypp and libstorage. Also any stock rubygem we want to use will not care about SCR. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] openQA development restarted
On Thu, Oct 02, 2014 at 01:30:04PM +0200, Ancor Gonzalez Sosa wrote: The goal of this mail is not only reporting what can we expect from the nearest future, but to collect more ideas. According to our recent thread about integration tests, we also want: - Easy way to install additional packages in the test. Since currently the repositories are not registered it is difficult for a test to do so. The test does not know whether it's running on openSUSE, staging:X or SLES12:Update:Test. - Easy way to run a bunch of scripts, that is without having to deal with needles. E.g. the scripts should simply report success/failure via the exit status. - Run tests not only for openSUSE Factory but also for SLE and all updates. - openQA itself is not so easy to work with, e.g. finding out why the tests do not start. Also several workarounds were required last time I tried it, e.g. ip -6 r a to unreachable 2600:806:310::100/128. - Possibility to run tests with selfmade RPMs. E.g. when I get a pull request from the community I want to see that all tests still work even before merging the pull request on git and making a submit request in the buildservice. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
[yast-devel] Storage Redesign
Hi, my hackweek project was to evaluate using the boost graph library (BGL) in libstorage. For me the project was interesting and successful. I have documented it at https://github.com/aschnell/libstorage-bgl-eval/wiki. The code is also available there. So now I would like to redesign the storage part of YaST. Here are the main steps required: - Extend libstorage-bgl-eval to fully support disks, partitions and simply filesystems (probing, committing, testmodes, testsuite). - Try to make a compatibility layer. - Make the new API robust against API and ABI changes. - Export new API to Ruby (help would be good) for use by all YaST modules. - Get a simply installation working (two partitions, ext4 and swap). - Extend libstorage-bgl-eval to current libstorage functionality. Maybe drop a few features, e.g. loop-back devices (once used for encryption). - Make the new API suit the needs of all YaST modules (input from other developers required). If required add utility functions. - Make all code in YaST use new API (task for several developers). - Make expert partitioner use new features, e.g. use disks without partition table for filesystems. - Rewrite storage proposal (specification required!). - Finally drop target-map (as decided during workshop). - Drop compatibility layer. In the end yast2-storage would ideally only contain dialogs and no logic for other YaST modules (since all of that moved to libstorage). But if some utility functions are easier to implement in Ruby they can stay there. I assume that altogether the redesigning will take more than half a year. Anyway I think it is required to keep the code maintainable and be prepared for new feature requests. Some existing features request might already be implemented along the way (e.g. https://fate.suse.com/316251). ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Travis integration
On Mon, Nov 03, 2014 at 11:52:51AM +0100, Ladislav Slezak wrote: Hi all, The Travis integration was my hackweek project, which I successfully finished last week. All relevant Yast modules now have Travis builds enabled. Nice, and please post the URL where we can see the travis status. ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org
Re: [yast-devel] Storage Redesign: diagrams in wiki
On Wed, Nov 05, 2014 at 01:51:47PM +0100, Martin Vidner wrote: On Fri, Oct 24, 2014 at 02:53:06PM +0200, Arvin Schnell wrote: Hi, my hackweek project was to evaluate using the boost graph library (BGL) in libstorage. For me the project was interesting and successful. I have documented it at https://github.com/aschnell/libstorage-bgl-eval/wiki. The code is also available there. Thanks for the write up! Some questions about the diagrams in the document: - why do nodes have numbers which are not unique? Each device objects has a unique id to identify it across graphs (the device name is not usable for that, see comment in source code). This id is displayed in the action graph, but since a single object may need more actions (e.g. create partition and set type) the id is not unique in that graph. - what do [f] [l] [fl] mean? First and last action for a device object. - the node colors seem to mean node type; the last graph should be much more colorful, shouldn't it? Well, currently the colors are: - green - create (or format for filesystems) - red - delele - blue - modify - gray - nop Sure more colors can be added ;) ciao Arvin -- Arvin Schnell, aschn...@suse.de Senior Software Engineer, Research Development SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org To contact the owner, e-mail: yast-devel+ow...@opensuse.org