Re: [gentoo-portage-dev] Hello! portage UI

2006-03-15 Thread Paul de Vrieze
On Tuesday 14 March 2006 17:48, tvali wrote:
 2006/3/14, Marius Mauch [EMAIL PROTECTED]:
  Brian wrote:
   On Tue, 2006-14-03 at 13:14 +0200, tvali wrote:
  Ok, i was, yes, speaking about kde.
  
  I will check out this Porthole :) I was actually thinking more
   about c ++, but nothing against python -- i was quite a fan of
   python when i first found it.
  
   I believe Kuroo is in C, maybe c++
 
  For the record: Kuroo is known to be conceptually broken (uses the
  cache directly), but the author is looking to fix that in a future
  version. Generally writing portage utils in languages other than
  python is difficult as you can't use the primary API directly.

 There seems not to be c++ bintings to python, anyway there is
 dev-python/sip. I havent done such thing, but i suppose that it would
 not be impossible to start portage inside Kuroo as a thread, then
 interact with this thread, having sip between them. If it's used for
 creation of PyQt, such two-way interaction should be possible.

Actually, C++ being strongly related to C, can just use the C python 
api's. As such it could directly interface with python, and use the 
python portage api.

Paul

-- 
Paul de Vrieze
Gentoo Developer
Mail: [EMAIL PROTECTED]
Homepage: http://www.devrieze.net


pgpyvIdbNhH88.pgp
Description: PGP signature


Re: portage from C (was Re: [gentoo-portage-dev] Hello! portage UI)

2006-03-15 Thread tvali
sorry
lines
char tt;
for (tt=0; tt40; tt++)
  fputc(tt, inputf);

/.../

fputc(EOF, inputf);

are not needed at all and do nothing -- i was just testing a thought
before i catched how those pipes and forks work in linux :) i have
mostly done things in windows and c++ and WinApi so i dont catch
everything immedietly yet :)

2006/3/16, tvali [EMAIL PROTECTED]:
 So I was the last one :)

 My example is using python interpreter -- it's maybe simpler to use in
 many cases, but theoretically slower.

 It is, anyway, not so advanced to import portage, but you can add that line ;)

 2006/3/15, solar [EMAIL PROTECTED]:
  On Wed, 2006-03-15 at 21:42 +0100, Kevin F. Quinn (Gentoo) wrote:
   On Wed, 15 Mar 2006 09:52:13 -0500
   solar [EMAIL PROTECTED] wrote:
  
On Wed, 2006-03-15 at 10:51 +0100, Paul de Vrieze wrote:
   
[snip]
   
 Actually, C++ being strongly related to C, can just use the C
 python api's. As such it could directly interface with python, and
 use the python portage api.
   
If you could demonstrate an 'import portage' and a simple
printf(PORTDIR=%s\n, PORTDIR); in C I'd be highly interested.
  
   Try attached :)  Had a go 'coz I was curious.  Compile with:
  
   gcc -o getportdir getportdir.c -lpython2.4
  
   Does the equivalent of:
  
   #!/usr/bin/portage
   import portage;
   print portage.settings[PORTDIR];
  
   (more or less).  Docs on the API itself (which comes with Python) are at
   http://docs.python.org/api/api.html
 
  thanks Kevin,
   marienz also put 3 examples together to demonstrate it.
 
  /me feels like a kid in a candy store.
 
  thanks guys.
 
 
  --
  solar [EMAIL PROTECTED]
  Gentoo Linux
 
  --
  gentoo-portage-dev@gentoo.org mailing list
 
 


 --
 tvali
 (e-mail: [EMAIL PROTECTED]; msn: [EMAIL PROTECTED];
 icq: 317-492-912)

 Ühe eesti internetifirma lehel kohtasin tsitaati:
 If you don't do it excellently, dont do it at all. Because if it's not
 excellent, it won't be profitable or fun, and if you're not in
 business for fun or profit, what the hell are you doing here?
 Robert Townsend





--
tvali
(e-mail: [EMAIL PROTECTED]; msn: [EMAIL PROTECTED];
icq: 317-492-912)

Ühe eesti internetifirma lehel kohtasin tsitaati:
If you don't do it excellently, dont do it at all. Because if it's not
excellent, it won't be profitable or fun, and if you're not in
business for fun or profit, what the hell are you doing here?
Robert Townsend

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Hello! portage UI

2006-03-14 Thread tvali
Ok, i was, yes, speaking about kde.
I will check out this Porthole :) I was actually thinking more about
c++, but nothing against python -- i was quite a fan of python when i
first found it.

I'm new to gentoo, so could you tell me, where i find some clear manual for doing the following:
* Download gentoo source of Porthole
* Change that source
* Build my version of it in such way that my portage tree is OK after that

Are --fetchonly and --usepkgonly somehow related to that?
2006/3/14, Brian [EMAIL PROTECTED]:
On Tue, 2006-14-03 at 00:39 +0200, tvali wrote:For KDE there are 2 projects that come to mind Kuroo, and another onethat was designed to run in Konguerer, but I don't remember the name.Kuroo is being actively developed right now, I don't recall seeing
anything recently on the other one.If your thinking of something being coded in python so that it caninteract with and use portage code for information retrieval then checkout Porthole.It is a gtk app not KDE, but will run on a KDE desktop.
It sounds like it already does things similar to what you had in mind.If you wanted to port the gui code from pygtk to pyQt, I am sure thatthere would be a number of KDE users that would be pleased.I would
definitely consider adding an optional KDE interface to it. :)--Brian [EMAIL PROTECTED]--gentoo-portage-dev@gentoo.org
 mailing list-- tvali(e-mail: [EMAIL PROTECTED]; msn: [EMAIL PROTECTED]
;icq: 317-492-912)Ühe eesti internetifirma lehel kohtasin tsitaati:If
you don't do it excellently, dont do it at all. Because if it's not
excellent, it won't be profitable or fun, and if you're not in business
for fun or profit, what the hell are you doing here?Robert Townsend


Re: [gentoo-portage-dev] Hello! portage UI

2006-03-14 Thread Brian
On Tue, 2006-14-03 at 16:55 +0200, tvali wrote:
 Ok, i will finish this chat about making portage cache, then learn
 portage code, then write basic sql modules and when this thing is
 running, i am more able to be involved in portage GUI as i can
 understand background of portage, then ...i hope you have time to wait
 for me :)
 

I have lots of time to wait for you... just don't have much time for
coding :(

-- 
Brian [EMAIL PROTECTED]

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Hello! portage UI

2006-03-14 Thread Marius Mauch

Brian wrote:

On Tue, 2006-14-03 at 13:14 +0200, tvali wrote:


Ok, i was, yes, speaking about kde.

I will check out this Porthole :) I was actually thinking more about c
++, but nothing against python -- i was quite a fan of python when i
first found it.



I believe Kuroo is in C, maybe c++


For the record: Kuroo is known to be conceptually broken (uses the cache 
directly), but the author is looking to fix that in a future version.
Generally writing portage utils in languages other than python is 
difficult as you can't use the primary API directly.


Marius
--
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Hello! portage UI

2006-03-14 Thread tvali
I looked over that:

SIP also makes it easy to take a Python application (maybe a
prototype) and selectively implement parts of the application (maybe
for performance reasons) in C or C++.

This could mean that portage could be made fully compatible with c++
app? Again, havent tried/tested, just assuming :)

2006/3/14, tvali [EMAIL PROTECTED]:
 2006/3/14, Marius Mauch [EMAIL PROTECTED]:
  Brian wrote:
   On Tue, 2006-14-03 at 13:14 +0200, tvali wrote:
  
  Ok, i was, yes, speaking about kde.
  
  I will check out this Porthole :) I was actually thinking more about c
  ++, but nothing against python -- i was quite a fan of python when i
  first found it.
  
  
   I believe Kuroo is in C, maybe c++
 
  For the record: Kuroo is known to be conceptually broken (uses the cache
  directly), but the author is looking to fix that in a future version.
  Generally writing portage utils in languages other than python is
  difficult as you can't use the primary API directly.

 There seems not to be c++ bintings to python, anyway there is
 dev-python/sip. I havent done such thing, but i suppose that it would
 not be impossible to start portage inside Kuroo as a thread, then
 interact with this thread, having sip between them. If it's used for
 creation of PyQt, such two-way interaction should be possible.

 http://www.riverbankcomputing.co.uk/sip/index.php

  Marius
  --
  gentoo-portage-dev@gentoo.org mailing list
 
 


 --
 tvali
 (e-mail: [EMAIL PROTECTED]; msn: [EMAIL PROTECTED];
 icq: 317-492-912)

 Ühe eesti internetifirma lehel kohtasin tsitaati:
 If you don't do it excellently, dont do it at all. Because if it's not
 excellent, it won't be profitable or fun, and if you're not in
 business for fun or profit, what the hell are you doing here?
 Robert Townsend



--
tvali
(e-mail: [EMAIL PROTECTED]; msn: [EMAIL PROTECTED];
icq: 317-492-912)

Ühe eesti internetifirma lehel kohtasin tsitaati:
If you don't do it excellently, dont do it at all. Because if it's not
excellent, it won't be profitable or fun, and if you're not in
business for fun or profit, what the hell are you doing here?
Robert Townsend

-- 
gentoo-portage-dev@gentoo.org mailing list



Re: [gentoo-portage-dev] Hello! portage UI

2006-03-13 Thread Brian
On Tue, 2006-14-03 at 00:39 +0200, tvali wrote:
 Hello!
 
 I am thinking about making user interface for portage.
 
 I see the possibility to browse portage tree, turning different
 filters on and off, as it's most important feature. I dont think that
 it should contain any functions for updating, emerging or unmerging or
 syncing at it's beginning, as i think that i havent used portage long
 enough to make a clear design of such a tool.
 
 Anyway, package browser would be usable for me as a new user of
 portage.
 
 I describe shortly, what i see as it's functionality:
 * General UI, which looks like a classical e-mail client with
 folder-list on left panel, mail-list on top and one e-mail on bottom.
 Additionally, top and bottom panel should be together in right panel.
 * Left panel contains 2 main folders -- one is to access folders
 in /usr/portage/, another contains keywords like kdebase-meta (or
 kde-base) -- which has packages like kdegraphics-meta inside it (click
 +). This other tree should be hand-made tree + others folder, last
 containing all package groups, which are not included in this tree. At
 least, i think that automation may not be possible -- it depends on
 structure, which i dont know.
 * Right panel, which contains tabs -- first tab is for top/bottom
 panels, other are web browsers (konqueror).
 * Top panel contains package list like detailed view of folders
 * Botton panel contains details -- also button for opening www-address
 of package in new tab.
 + there should be search feature.
 + some special folders should be added: --update world, which contains
 all outdated packages jpc. As it would be slow, portage or this UI
 should be cache such things and clean this cache when --sync happens.
 
 It is possible that integration into Konqueror could be simple and
 usable (like portage:/ protocol).
 
 In future, additional features like tray-icon for autosync and
 notifications, also adding packages to world and removing, could be
 considered; code should be build in such way that is would be possible
 to add them later in different ways.
 
 -- 
 tvali

For KDE there are 2 projects that come to mind Kuroo, and another one
that was designed to run in Konguerer, but I don't remember the name.
Kuroo is being actively developed right now, I don't recall seeing
anything recently on the other one.

If your thinking of something being coded in python so that it can
interact with and use portage code for information retrieval then check
out Porthole.  It is a gtk app not KDE, but will run on a KDE desktop.
It sounds like it already does things similar to what you had in mind.

If you wanted to port the gui code from pygtk to pyQt, I am sure that
there would be a number of KDE users that would be pleased.  I would
definitely consider adding an optional KDE interface to it. :)


-- 
Brian [EMAIL PROTECTED]

-- 
gentoo-portage-dev@gentoo.org mailing list