Mailinglist Archive: yast-devel (91 mails)

< Previous Next >
Re: [yast-devel] y2r again -- success!
On Thu, 28 Jan 2016 18:09:06 +0000
Erico Mendonca <Erico.Mendonca@xxxxxxxx> wrote:

Got it! I managed to convert my module to Ruby using y2r.

Here’s what I did:

1) install openSUSE 13.1 from scratch (don’t forget to add C/C++
development tools) 2) install all updates and reboot (important!
there’s a newer yast2-core in the “oss” repo.) 3) install some needed
packages: # zypper in ruby-devel libxml2-devel libxslt-devel
unsquashfs

4) extract y2r-master.zip (from https://github/yast/y2r) and run (as
root): # gem install y2r

(beware that it needs to download some sources from the internet)

5) extract the base installation media root image:
# unsquashfs <openSUSE 13.1 DVD mount point>/boot/x86_64/root

This will create a “squashfs-root” directory. It contains all
possible YaST modules that may be referenced in the code.

6) run y2r:
# y2r2.0 -M squashfs-root/usr/share/YaST/modules <your YCP module>

And the magic happens.

Now on to debug the Ruby code :)


Great that you succeed, just please do not forget to check if you are
affected by well known bugs in y2r -
https://github.com/yast/y2r/blob/master/KNOWN_BUGS.md

especially escaped characters can do some mess. Usually easiest way to
check it is grep ycp source for escaped characters and manually fix
ruby sources.

If you need any help with debugging ruby source, don't hesitate to ask
here or on our IRC freenode#yast

Josef


Erico M. Mendonça
Dedicated Support Engineer
SUSE
Rua Joaquim Floriano, 466 – Ed. Corporate 12º andar, Itaim Bibi – São
Paulo – SP / Brasil Tel: +55 (11) 3345-3900
Cel: + 55 (61) 8594-9557
erico.mendonca@xxxxxxxx
www.suse.com






Em [DATE], "[NAME]" <[ADDRESS]> escreveu:

On Wed, 27 Jan 2016 20:05:19 +0000
Erico Mendonca <Erico.Mendonca@xxxxxxxx> wrote:

Hello all,

I finally had time to try converting my YCP module again. As
mentioned earlier, I had to upgrade my yast2-core to something
after 2.24.x. I tried upgrading just this package on openSUSE 12.3
(using the package from 13.1), but apparently it___d break a LOT
of stuff.

I decided to try upgrading the whole system to 13.1, recompiled
y2r___ and now it fails further while trying to load
LibStorage.so. I tried feeding it the LibStorage.so from the
installation image via LD_PRELOAD, but got an ___undefined symbol:
PL_thr_key___ error. Since the installation image used Perl 5.16.2
and I am now on Perl 5.18, I downgraded Perl to 5.16 with the same
results.

I saw in another forum that this missing symbol indicates that
this .so module was compiled in a pthread-enabled Perl interpreter,
and the one supplied with the system is not, which I find odd.
Where can I find the source to LibStorage.so so I can recompile
it, or is there a way to skip loading it in y2r?

No, there is no way to skip it, but it looks like strange upgrade
way, as in 13.1 we do not get such bug report.



Erico M. Mendon__a
Dedicated Support Engineer
SUSE
Rua Joaquim Floriano, 466 ___ Ed. Corporate 12__ andar, Itaim Bibi
___ S__o Paulo ___ SP / Brasil Tel: +55 (11) 3345-3900
Cel: + 55 (61) 8594-9557
erico.mendonca@xxxxxxxx
www.suse.com
N_____r__y___\___^__~_{.n_+__________?_r__i_m__0________-u____0_________
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx



--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
References