Mailing Lists
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2023
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
List overview
Download
YaST Commits
November 2007
----- 2023 -----
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
yast-commit@lists.opensuse.org
24 participants
864 discussions
Start a n
N
ew thread
[yast-commit] r41706 - /trunk/restore/src/restore_bootloader.ycp
by locilka@svn.opensuse.org
01 Nov '07
01 Nov '07
Author: locilka Date: Thu Nov 1 15:09:47 2007 New Revision: 41706 URL:
http://svn.opensuse.org/viewcvs/yast?rev=41706&view=rev
Log: Good point: "Import module before using it" :) Modified: trunk/restore/src/restore_bootloader.ycp Modified: trunk/restore/src/restore_bootloader.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/src/restore_bootloader.y…
============================================================================== --- trunk/restore/src/restore_bootloader.ycp (original) +++ trunk/restore/src/restore_bootloader.ycp Thu Nov 1 15:09:47 2007 @@ -13,6 +13,8 @@ { + import "Bootloader"; + boolean ret = nil; ret = Bootloader::Read(); -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r41705 - in /trunk/python-bindings/src: Makefile.am YPython.cc YPython.h YPythonNamespace.cc
by juhliarik@svn.opensuse.org
01 Nov '07
01 Nov '07
Author: juhliarik Date: Thu Nov 1 15:08:41 2007 New Revision: 41705 URL:
http://svn.opensuse.org/viewcvs/yast?rev=41705&view=rev
Log: solved problem with adding namespace Modified: trunk/python-bindings/src/Makefile.am trunk/python-bindings/src/YPython.cc trunk/python-bindings/src/YPython.h trunk/python-bindings/src/YPythonNamespace.cc Modified: trunk/python-bindings/src/Makefile.am URL:
http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/Makefile.am?…
============================================================================== --- trunk/python-bindings/src/Makefile.am (original) +++ trunk/python-bindings/src/Makefile.am Thu Nov 1 15:08:41 2007 @@ -52,8 +52,6 @@ -lycp -ly2 \ -Xlinker --no-whole-archive \ -ly2util \ - -ly2 \ - -lYCPDeclarations \ -version-info 2:0 libYCP_la_LIBADD = libYCPTypes.la #libYCPDeclarations.la Modified: trunk/python-bindings/src/YPython.cc URL:
http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YPython.cc?r…
============================================================================== --- trunk/python-bindings/src/YPython.cc (original) +++ trunk/python-bindings/src/YPython.cc Thu Nov 1 15:08:41 2007 @@ -603,6 +603,23 @@ return Term_NewString(ycp_Term->asTerm()->name().c_str(), value); } +/** + * init namespace + * @param char * name of module + * @param char * name of function + * @return namespace of YCP + */ + +static Y2Namespace * getNs (const char * ns_name, const char * func_name) { + Import import(ns_name); // has a static cache + Y2Namespace *ns = import.nameSpace(); + if (ns == NULL) { + y2error ("... for a Python call of %s", func_name); + } else { + ns->initialize (); + } + return ns; +} /** * Convert Python Function to YCPCode. @@ -612,57 +629,28 @@ **/ YCPValue YPython::fromPythonFunToReference (PyObject* pyFun) { - - FunctionTypePtr sym_tp = new FunctionType(Type::Any); - PyObject *fun_code = PyFunction_GetCode(pyFun); - char *fun_name = PyString_AsString(((PyCodeObject *) fun_code)->co_name); + PyObject *fun_code = PyFunction_GetCode(pyFun); + string fun_name = PyString_AsString(((PyCodeObject *) fun_code)->co_name); string file_path = PyString_AsString(((PyCodeObject *) fun_code)->co_filename); - - //printf ("meno funckie %s\n", fun_name); - //printf ("meno suboru %s\n", file_path.c_str()); + //found last "/" in path size_t found = file_path.find_last_of("/"); //extract module name from path string module_name = file_path.substr(found+1); - - file_path = YCPPathSearch::find (YCPPathSearch::Module, module_name); - - if (file_path.empty()) - file_path = YCPPathSearch::find (YCPPathSearch::Include, module_name); - - if (file_path.empty()) - file_path = YCPPathSearch::find (YCPPathSearch::Client, module_name); - - if (file_path.empty()) { - y2error("Finding file where is function %s failed", fun_name); - return YCPNull(); - } - - //found last "/" in path - found = file_path.find_last_of("/"); - - string path = file_path.substr(0,found+1); - - setenv("PYTHONPATH", path.c_str(), 1); - - YPython::loadModule (file_path); - - //extract module name from path - module_name = file_path.substr(found+1); - //delete last 3 chars from module name ".py" - module_name.erase(module_name.size()-3); //delete ".py" + module_name.erase(module_name.size()-3); + - //found last "/" in path - Y2Namespace *ns = new YPythonNamespace (module_name); + Y2Namespace *ns = getNs (module_name.c_str(),fun_name.c_str()); if (ns) { - TableEntry *sym_te = ns->table ()->find (fun_name); + cout <<"ns bolo najdene!!! "<< endl; + TableEntry *sym_te = ns->table ()->find (fun_name.c_str()); if (sym_te == NULL) { - y2error ("No such symbol %s::%s", module_name.c_str(), fun_name); + y2error ("No such symbol %s::%s", module_name.c_str(), fun_name.c_str()); return YCPNull(); } SymbolEntryPtr sym_entry = sym_te->sentry(); @@ -670,7 +658,7 @@ return YCPReference(sym_entry); } else { - y2error("Creating namespace for function %s failed", fun_name); + y2error("Creating namespace for function %s failed", fun_name.c_str()); return YCPNull(); } Modified: trunk/python-bindings/src/YPython.h URL:
http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YPython.h?re…
============================================================================== --- trunk/python-bindings/src/YPython.h (original) +++ trunk/python-bindings/src/YPython.h Thu Nov 1 15:08:41 2007 @@ -70,14 +70,14 @@ **/ static YPython * yPython(); - /** + /** * Access the static _pMainDicts * **/ PyObject* pMainDicts(); - /** + /** * static _pMainDicts includes dictionaries of all imported python modules * **/ Modified: trunk/python-bindings/src/YPythonNamespace.cc URL:
http://svn.opensuse.org/viewcvs/yast/trunk/python-bindings/src/YPythonNames…
============================================================================== --- trunk/python-bindings/src/YPythonNamespace.cc (original) +++ trunk/python-bindings/src/YPythonNamespace.cc Thu Nov 1 15:08:41 2007 @@ -154,7 +154,7 @@ PyObject * fun_code; //code of function //Declarations (using YPCDelcarations python module) - YCPDeclarations *decl = YCPDeclarations::instance(); + //YCPDeclarations *decl = YCPDeclarations::instance(); //YCPDeclarations *decl = new YCPDeclarations(); FunctionTypePtr sym_tp; @@ -192,7 +192,7 @@ fun_code = PyFunction_GetCode(pFunc); num = ((PyCodeObject *) fun_code)->co_argcount; - + /* if (decl->exists((PyFunctionObject *)pFunc) && decl->numParams((PyFunctionObject *)pFunc) == num){ @@ -203,14 +203,14 @@ for (int i=0; i < tmp; i++){ sym_tp->concat(list_of_types[i]); } - }else{ + }else{*/ sym_tp = new FunctionType(Type::Any); //y2milestone ("Number of parameters: %d", num); //add types and number of arguments into SymbolEntry table for (long j = 0; j < num; j++) { sym_tp->concat(Type::Any); } - } + //} //y2milestone ("Callable function %s", PyString_AsString(item)); // symbol entry for the function SymbolEntry *fun_se = new SymbolEntry ( -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r41704 - /trunk/restore/src/Makefile.am
by locilka@svn.opensuse.org
01 Nov '07
01 Nov '07
Author: locilka Date: Thu Nov 1 14:59:02 2007 New Revision: 41704 URL:
http://svn.opensuse.org/viewcvs/yast?rev=41704&view=rev
Log: Modified makefile to install the new file Modified: trunk/restore/src/Makefile.am Modified: trunk/restore/src/Makefile.am URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/src/Makefile.am?rev=4170…
============================================================================== --- trunk/restore/src/Makefile.am (original) +++ trunk/restore/src/Makefile.am Thu Nov 1 14:59:02 2007 @@ -8,7 +8,8 @@ client_DATA = \ restore.ycp \ - restore_auto.ycp + restore_auto.ycp \ + restore_bootloader.ycp ynclude_DATA = \ helps.ycp \ -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
[yast-commit] r41703 - in /trunk/restore: VERSION package/yast2-restore.changes src/Restore.ycp src/restore_bootloader.ycp yast2-restore.spec.in
by locilka@svn.opensuse.org
01 Nov '07
01 Nov '07
Author: locilka Date: Thu Nov 1 14:56:53 2007 New Revision: 41703 URL:
http://svn.opensuse.org/viewcvs/yast?rev=41703&view=rev
Log: - All Bootloader function calls were moved to a separate YCP client restore_bootloader to break the build-dependency on yast2-bootloader. - 2.16.0 Added: trunk/restore/src/restore_bootloader.ycp Modified: trunk/restore/VERSION trunk/restore/package/yast2-restore.changes trunk/restore/src/Restore.ycp trunk/restore/yast2-restore.spec.in Modified: trunk/restore/VERSION URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/VERSION?rev=41703&r1=417…
============================================================================== --- trunk/restore/VERSION (original) +++ trunk/restore/VERSION Thu Nov 1 14:56:53 2007 @@ -1 +1 @@ -2.15.4 +2.16.0 Modified: trunk/restore/package/yast2-restore.changes URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/package/yast2-restore.ch…
============================================================================== --- trunk/restore/package/yast2-restore.changes (original) +++ trunk/restore/package/yast2-restore.changes Thu Nov 1 14:56:53 2007 @@ -1,4 +1,12 @@ ------------------------------------------------------------------- +Thu Nov 1 11:03:06 CET 2007 - locilka(a)suse.cz + +- All Bootloader function calls were moved to a separate YCP client + restore_bootloader to break the build-dependency on + yast2-bootloader. +- 2.16.0 + +------------------------------------------------------------------- Wed Aug 29 17:29:38 CEST 2007 - locilka(a)suse.cz - Fixed evaluation of 'nil' value that prevented the restore from Modified: trunk/restore/src/Restore.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/src/Restore.ycp?rev=4170…
============================================================================== --- trunk/restore/src/Restore.ycp (original) +++ trunk/restore/src/Restore.ycp Thu Nov 1 14:56:53 2007 @@ -26,7 +26,6 @@ import "Report"; import "Mode"; import "Summary"; - import "Bootloader"; import "Service"; import "Package"; import "Label"; @@ -1257,24 +1256,9 @@ { y2milestone("activating boot loader configuration"); - // read actual boot loader configuration - ret = Bootloader::Read(); - - if (ret == false) - { - y2error("Boot loader read failed"); - } - else - { - // write configuration - force re-installation of boot loader - Bootloader::SetWriteMode( $["save_all" : true] ); - ret = Bootloader::Write(); - - if (ret == false) - { - y2error("Boot loader write failed"); - } - } + // Bootloader function calls were moved to a client + // to break the build-dependency on yast2-bootloader + ret = (boolean) WFM::call ("restore_bootloader"); if (ret == false) { Added: trunk/restore/src/restore_bootloader.ycp URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/src/restore_bootloader.y…
============================================================================== --- trunk/restore/src/restore_bootloader.ycp (added) +++ trunk/restore/src/restore_bootloader.ycp Thu Nov 1 14:56:53 2007 @@ -0,0 +1,33 @@ +/** + * File: clients/restore_bootloader.ycp + * Package: Restore module + * Summary: Special client for restoring bootloader settings + * Authors: Ladislav Slezak <lslezak(a)suse.cz> + * Lukas Ocilka <locilka(a)suse.cz> + * + * $Id:$ + * + * All bootloader calls were moved here to break building dependency + * on yast2-bootloader + */ + + +{ + boolean ret = nil; + + ret = Bootloader::Read(); + + if (ret == false) { + y2error("Boot loader read failed"); + } else { + // write configuration - force re-installation of boot loader + Bootloader::SetWriteMode( $["save_all" : true] ); + ret = Bootloader::Write(); + + if (ret == false) { + y2error("Boot loader write failed"); + } + } + + return ret; +} Modified: trunk/restore/yast2-restore.spec.in URL:
http://svn.opensuse.org/viewcvs/yast/trunk/restore/yast2-restore.spec.in?re…
============================================================================== --- trunk/restore/yast2-restore.spec.in (original) +++ trunk/restore/yast2-restore.spec.in Thu Nov 1 14:56:53 2007 @@ -2,7 +2,7 @@ @HEADER@ -BuildRequires: yast2-bootloader perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite +BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite Requires: aaa_base Requires: bzip2 -- To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org For additional commands, e-mail: yast-commit+help(a)opensuse.org
1
0
0
0
← Newer
1
...
84
85
86
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200