Re: Helloworld Anaconda add-on

[email protected] Wed, 06 Nov 2019 10:24:10 +0100
Newsgroups gmane.linux.redhat.anaconda.devel
Message-ID <[email protected]>
--===============6816959772635289137==
Content-Type: multipart/alternative; boundary="=-utrPl71eLzJkg42LmP3J"

--=-utrPl71eLzJkg42LmP3J
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Wed, 2019-11-06 at 17:08 +0800, edsionte wrote:
> yes! It works right now.  :)Thanks.

Great! :).
> And what's the difference between these two branch?=20

We are making bigger changes in Fedora Rawhide to switch Anaconda to a
modular Anaconda. Read here for more info:

https://rhinstaller.wordpress.com/2017/10/09/anaconda-modularisation/

The differences are mostly thanks to that.
Jirka
> <[email protected]> =E4=BA=8E2019=E5=B9=B411=E6=9C=886=E6=97=A5=E5=91=
=A8=E4=B8=89 =E4=B8=8B=E5=8D=884:36=E5=86=99=E9=81=93=EF=BC=9A
> > Ohh, I've missed that you are trying to create the addon on CentOS-
> > 7.
> > Right now, you are using master branch which is for Fedora Rawhide.
> > For CentOS-7 you have to use rhel7-branch
> > https://github.com/rhinstaller/hello-world-anaconda-addon/tree/rhel7-br=
anch
> > Try to use this and see if it will help you.
> > On Wed, 2019-11-06 at 16:20 +0800, edsionte wrote:
> > > Thanks your reply,
> > > =E2=80=9Cinst.updates=3Dhd:/sdb4:/images/updates.img =E2=80=9D  was m=
y writing
> > > error=EF=BC=8Csorry for that.
> > > Actually, I used "inst.updates=3Dhd:sdb4:/images/updates.img" as
> > > you said above, and the menu hasn't new category.I  have read :
> > > pyanaconda/ui/categories/__init__.pypyanaconda/ui/categories/syst
> > > em.py =20
> > >=20
> > > After comparing with these files, I found that =E2=80=9Chello-world-
> > > anaconda-addon/org_fedora_hello_world/categories/hello_world.py=E2=80=
=9D
> > > are missing the following  lines=EF=BC=9A
> > > displayOnHubGUI=3D"SummaryHub"displayOnHubTUI=3D"SummaryHub"sortOrder
> > > =3D 100
> > > displayOnHubGUI  default value is none. The comment in the code
> > > says that if this value is none, then this category will not be
> > > displayed.
> > >=20
> > > SO I add these lines in=20
> > >=20
> > > =E2=80=9Chello-world-anaconda-
> > > addon/org_fedora_hello_world/categories/hello_world.py=E2=80=9D.
> > > but, when the installer runs, click Continue button in Welcome
> > > page(chosse language), there is a error message page, and the
> > > More Info is shown=EF=BC=9A
> > > /usr/lib64/python2.7/sit-
> > > packages/pyanaconda/ui/gui/hubs/__init__.py, line 132, in
> > > _createBox()  spoke=3DspokeClass(self.data, self.storage,
> > > self.payload, self.instclass)
> > > =E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=
=A6TypeError: __init__() takes exactly 4 arguments (5 given)
> > >=20
> > > Now, what should I do next =EF=BC=9F :(
> > > <[email protected]> =E4=BA=8E2019=E5=B9=B411=E6=9C=886=E6=97=A5=E5=
=91=A8=E4=B8=89 =E4=B8=8B=E5=8D=883:48=E5=86=99=E9=81=93=EF=BC=9A
> > > > Hello,
> > > > You should use:
> > > > inst.updates=3Dhd:/dev/sdb4:/images/updates.img
> > > > or=20
> > > > inst.updates=3Dhd:sdb4:/images/updates.img
> > > >=20
> > > > For more info please see:
> > > > https://anaconda-installer.readthedocs.io/en/latest/boot-options.ht=
ml#inst-repo
> > > > It's using the same syntax as inst.updates.
> > > > Best Regards,Jirka
> > > > On Wed, 2019-11-06 at 13:25 +0800, edsionte wrote:
> > > > > Hi all,
> > > > > I want to test my first =E2=80=9Chello word=E2=80=9D Anaconda add=
on program.
> > > > >=20
> > > > > Firstly, I use this source code (=20
> > > > > https://github.com/rhinstaller/hello-world-anaconda-addon/) =EF=
=BC=8C
> > > > > and make a outfile updates.img.=20
> > > > > Then, I made a USB boot disk =EF=BC=88CentOS 7.4=EF=BC=89, and pl=
aced
> > > > > updates.img into the directory =E2=80=9Cimages/=E2=80=9D  of boot=
 disk.
> > > > >=20
> > > > > Then I used inst.updates=3Dhd:/sdb4:/images/updates.img boot
> > > > > option, There isn't a new helloworld Category on the
> > > > > installation menu.
> > > > >=20
> > > > > Is there anything wrong with steps above=EF=BC=9F =20
> > > > >=20
> > > > > Thanks.
> > > > > edison
> > > > >=20
> > > > > _______________________________________________Anaconda-
> > > > > devel-list mailing [email protected]
> > > > > https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--=-utrPl71eLzJkg42LmP3J
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<html dir=3D"ltr"><head></head><body style=3D"text-align:left; direction:lt=
r;"><div>On Wed, 2019-11-06 at 17:08 +0800, edsionte wrote:</div><blockquot=
e type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;p=
adding-left:1ex"><div dir=3D"ltr">yes! It works right now.&nbsp; :)<div>Tha=
nks.</div></div></blockquote><div><br></div><div>Great! :).</div><div><br><=
/div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px =
#729fcf solid;padding-left:1ex"><div dir=3D"ltr"><div><br></div><div>And wh=
at's the difference between these two branch?&nbsp;</div></div></blockquote=
><div><br></div><div><div>We are making bigger changes in Fedora Rawhide to=
 switch Anaconda to a modular Anaconda. Read here for more info:</div><div>=
<br></div><div><a href=3D"https://rhinstaller.wordpress.com/2017/10/09/anac=
onda-modularisation/">https://rhinstaller.wordpress.com/2017/10/09/anaconda=
-modularisation/</a></div><div><br></div><div>The differences are mostly th=
anks to that.</div><div><br></div><div>Jirka</div></div><div><br></div><blo=
ckquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf s=
olid;padding-left:1ex"><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas=
s=3D"gmail_attr">&lt;<a href=3D"mailto:[email protected]">jkonecny@redhat=
.com</a>&gt; =E4=BA=8E2019=E5=B9=B411=E6=9C=886=E6=97=A5=E5=91=A8=E4=B8=89 =
=E4=B8=8B=E5=8D=884:36=E5=86=99=E9=81=93=EF=BC=9A<br></div><blockquote type=
=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding=
-left:1ex"><div style=3D"text-align:left;direction:ltr"><div>Ohh, I've miss=
ed that you are trying to create the addon on CentOS-7.</div><div><br></div=
><div>Right now, you are using master branch which is for Fedora Rawhide. F=
or CentOS-7 you have to use rhel7-branch</div><div><br></div><div><a href=
=3D"https://github.com/rhinstaller/hello-world-anaconda-addon/tree/rhel7-br=
anch" target=3D"_blank">https://github.com/rhinstaller/hello-world-anaconda=
-addon/tree/rhel7-branch</a></div><div><br></div><div>Try to use this and s=
ee if it will help you.</div><div><br></div><div>On Wed, 2019-11-06 at 16:2=
0 +0800, edsionte wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0=
 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr">T=
hanks your reply,<div><br></div><div>=E2=80=9Cinst.updates=3Dhd:/sdb4:/imag=
es/updates.img =E2=80=9D&nbsp; was my&nbsp;writing error=EF=BC=8Csorry for =
that.</div><div><br></div><div>Actually, I used "inst.updates=3Dhd:sdb4:/im=
ages/updates.img" as you said above, and the menu hasn't new category.</div=
><div>I&nbsp; have read :</div><div><br></div><div>pyanaconda/ui/categories=
/__init__.py</div><div>pyanaconda/ui/categories/system.py&nbsp;&nbsp;<br></=
div><div><br></div><div>After comparing with these files, I found that =E2=
=80=9Chello-world-anaconda-addon/org_fedora_hello_world/categories/hello_wo=
rld.py=E2=80=9D are missing the following&nbsp; lines=EF=BC=9A</div><div><b=
r></div><div><b>displayOnHubGUI=3D"SummaryHub"</b></div><div><b>displayOnHu=
bTUI=3D"SummaryHub"</b></div><div><b>sortOrder =3D 100</b></div><div><b><br=
></b></div><div>displayOnHubGUI&nbsp; default value is<b> none</b>.&nbsp;</=
div><div>The comment in the code says that if this value is none, then this=
 category will not be displayed.<b><br></b></div><div><br></div><div>SO I a=
dd these lines in&nbsp;

=E2=80=9Chello-world-anaconda-addon/org_fedora_hello_world/categories/hello=
_world.py=E2=80=9D.</div><div><br></div><div>but, when the installer runs, =
click Continue button in Welcome page(chosse language), there is a error me=
ssage page,&nbsp;</div><div>and the<b> More Info</b> is shown=EF=BC=9A</div=
><div><br></div><div><b>/usr/lib64/python2.7/sit-packages/pyanaconda/ui/gui=
/hubs/__init__.py, line 132, in _createBox()</b></div><div><b>&nbsp; spoke=
=3DspokeClass(self.data, self.storage, self.payload, self.instclass)</b></d=
iv><div><b><br></b></div><div><b>=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=A6=E2=80=
=A6=E2=80=A6=E2=80=A6=E2=80=A6</b></div><div><b>TypeError: __init__() takes=
 exactly 4 arguments (5 given)</b><br></div><div><br></div><div>Now, what s=
hould I do next =EF=BC=9F&nbsp;</div><div>:(</div><div></div></div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">&lt;<a href=3D=
"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt; =
=E4=BA=8E2019=E5=B9=B411=E6=9C=886=E6=97=A5=E5=91=A8=E4=B8=89 =E4=B8=8B=E5=
=8D=883:48=E5=86=99=E9=81=93=EF=BC=9A<br></div><blockquote type=3D"cite" st=
yle=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><=
div style=3D"text-align:left;direction:ltr"><div>Hello,</div><div><br></div=
><div>You should use:</div><div><br></div><div>inst.updates=3Dhd:/dev/sdb4:=
/images/updates.img</div><div><br></div><div>or </div><div><br></div><div>i=
nst.updates=3Dhd:sdb4:/images/updates.img</div><div><br></div><div><br></di=
v><div>For more info please see:</div><div><br></div><div><a href=3D"https:=
//anaconda-installer.readthedocs.io/en/latest/boot-options.html#inst-repo" =
target=3D"_blank">https://anaconda-installer.readthedocs.io/en/latest/boot-=
options.html#inst-repo</a></div><div><br></div><div>It's using the same syn=
tax as inst.updates.</div><div><br></div><div>Best Regards,</div><div>Jirka=
</div><div><br></div><div>On Wed, 2019-11-06 at 13:25 +0800, edsionte wrote=
:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2p=
x #729fcf solid;padding-left:1ex"><div dir=3D"ltr">Hi all,<div><br></div><d=
iv>I want to test my first =E2=80=9Chello word=E2=80=9D Anaconda addon prog=
ram.</div><div><br></div><div>Firstly, I use this source code (&nbsp;<a hre=
f=3D"https://github.com/rhinstaller/hello-world-anaconda-addon/blob/master/=
Makefile" target=3D"_blank">https://github.com/rhinstaller/hello-world-anac=
onda-addon/</a>) =EF=BC=8C and make a outfile updates.img.&nbsp;</div><div>=
Then,&nbsp;I made a USB boot disk =EF=BC=88CentOS 7.4=EF=BC=89, and placed =
updates.img into the directory =E2=80=9Cimages/=E2=80=9D&nbsp; of boot disk=
.</div><div><br></div><div>Then I used inst.updates=3Dhd:/sdb4:/images/upda=
tes.img boot option, There isn't a new helloworld Category on the installat=
ion menu.</div><div><br></div><div><span style=3D"color:rgb(36,41,46);font-=
family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,Helvetica,Aria=
l,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;font-=
size:14px">Is there anything wrong with steps above=EF=BC=9F</span>&nbsp;&n=
bsp;<br></div><div><br></div><div>Thanks.</div><div>edison</div></div>
<pre>_______________________________________________</pre><pre>Anaconda-dev=
el-list mailing list</pre><a href=3D"mailto:[email protected]"=
 target=3D"_blank"><pre>[email protected]</pre></a><br><a href=
=3D"https://www.redhat.com/mailman/listinfo/anaconda-devel-list" target=3D"=
_blank"><pre>https://www.redhat.com/mailman/listinfo/anaconda-devel-list</p=
re></a></blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></body></html>

--=-utrPl71eLzJkg42LmP3J--

--===============6816959772635289137==
Content-Type: text/plain; charset=WINDOWS-1252
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

_______________________________________________
Anaconda-devel-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
--===============6816959772635289137==--