Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dependecies ? number of programs ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Snake007uk
Apprentice
Apprentice


Joined: 12 Jan 2003
Posts: 198
Location: London, UK

PostPosted: Fri Jan 09, 2004 5:35 am    Post subject: dependecies ? number of programs ? Reply with quote

what i dont understand is when i emerge say xfree, gnome, xchat, epiphany, etc...

why when i do emerge -p world i get liek a 100+ packages, yes i know gnome is made up of many packages etc..
but lets say xchat, ok it needs some libraries, so why not just get the libraries place them in say /lib/

and then when you emerge somehting it checks to see if the library it needs is present in /lib/ and if not gets it otherwise carrryon ?

rather then compile a whole package which has the library ???

can someone please explain this to me ??

Snake
_________________
Snake :)

Dual AMD MP 2800+, Asus A7M266-D, 1GB Ram, 18.1GB u160 HD, ATI Radeon 9600 Pro, Creative Audigy ZS, Intel SRCU31A, Linksys NIC, iiyama 18.1 4637bk lcd
Back to top
View user's profile Send private message
superjaded
l33t
l33t


Joined: 05 Jul 2002
Posts: 802

PostPosted: Fri Jan 09, 2004 7:59 am    Post subject: Reply with quote

In programming, there's a concept of "modularization" that is considered a "good thing."
This leads to reuseable code -- which makes less work for both the initial programmer and other programmers down the line who may find the code that initial programmer wrote useful.
With modularization, you have the separation of things -- many times a specific library will depend on OTHER specific libraries for certain function calls that may depend on other libraries for other function calls.

So, if I'm understanding your suggestion correctly (essentially only compiling a specific file from an ebuild, right?), not only would this be REALLY hard to keep track of, it would turn Portage into a mess of specific dependancies and such.

In the case of xchat, on the grand scheme of things, it doesn't have too many dependancies. Definitely no where near 100. Atleast after you get xfree installed.
Back to top
View user's profile Send private message
Snake007uk
Apprentice
Apprentice


Joined: 12 Jan 2003
Posts: 198
Location: London, UK

PostPosted: Fri Jan 09, 2004 5:57 pm    Post subject: Reply with quote

yes but dont you think all the libraries shouldb e in one big repository so when a pp needs it portage just gets it ? its the same as knwoing which program covers which dependency, so the way this would work is all libraries would be stored on local mirror, when portage compiles it just checks the ebuld for required libraries, and gets them.

yes in the case of xchat it needs gtk libraries and also Xfree to actualy display teh gui image, but that does not mean they should be compiled because they are needed, but when compiling something for example k3b, i only want k3b so why is xcdroast i believe it is also compiled ?? only packages taht arenned shoukld be compiled otherwise if only a library is need then the library downloaded, this would save space on user hard disk, and be much better.

i mean correct me if im wrong but it terms of windows, its like saying if you want MIRC, you have to compile windows (as you would need Xserver and Desktop environment, which makes sense, also i can understand the apckages that come with the DE), but then say if MIRC needs a DLL file which comes with say MS office, it compiles MS office ? dont you find that silly ?? should it just get the library rather then get the whole office package.

modularization is a good idea, but then having a library repositart IMO is better aswell, dont you agree ? yes and if library depends on another library, then why not just get that library, can you imagine the time saved in downloading also with compiling just one library rather then whole package?
_________________
Snake :)

Dual AMD MP 2800+, Asus A7M266-D, 1GB Ram, 18.1GB u160 HD, ATI Radeon 9600 Pro, Creative Audigy ZS, Intel SRCU31A, Linksys NIC, iiyama 18.1 4637bk lcd
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Fri Jan 09, 2004 8:16 pm    Post subject: Reply with quote

Snake007uk wrote:
yes but dont you think all the libraries shouldb e in one big repository

Never.
1. Different applications/ebuilds need different sets of libraries and they are not necessarily mutual exclusive.
2. The set of libraries an application depends on is variable, controlled by the USE flags you are using.

edit: Don't want to be offensive ... but I read you're from UK. Is my english so broken or yours? It's really hard to read, if english is not your native language...


Carlo
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
Snake007uk
Apprentice
Apprentice


Joined: 12 Jan 2003
Posts: 198
Location: London, UK

PostPosted: Fri Jan 09, 2004 8:22 pm    Post subject: Reply with quote

sorry about my english :s

its i get a bit excited when i type ;) so i do alot of typo's will check next time sorry.

also, i understand what you are saying about the use flags, but why does this change the fact about getting libraries direct rather then getting the whole application ?

e.g

application A needs --->libraray A
|
|
needs library B



so what portage would do is get those libraries from trhe repository, and compile them and then compile the program, no need to get a whole application for just one library ?

when a use flag is added the ebuild looks for that library and tells portage about it again poratge gets the library ?

am i actually missing something isnt this a better idea ?
can a develpoer please explain to me why they think this isnt a good idea?

if the library is already located in /lib (this is justa suggestion path doesnt have to be here) then portage doesnt need to get it the app can access it directly ?

im not suggesting that everything should be changed i just want to know why this wasnt thought of or if it was why linux apps didnt go this way ?
_________________
Snake :)

Dual AMD MP 2800+, Asus A7M266-D, 1GB Ram, 18.1GB u160 HD, ATI Radeon 9600 Pro, Creative Audigy ZS, Intel SRCU31A, Linksys NIC, iiyama 18.1 4637bk lcd


Last edited by Snake007uk on Fri Jan 09, 2004 8:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
Stormy Eyes
Veteran
Veteran


Joined: 09 Apr 2003
Posts: 1064
Location: Watching God spit-shine my boots.

PostPosted: Fri Jan 09, 2004 8:27 pm    Post subject: Reply with quote

Snake007uk wrote:

am i actually missing something isnt this a better idea ?
can a develpoer please explain to me why they think this isnt a good idea?


I'm not a Linux developer, but I can think of one hitch: who gets stuck with the thankless job of maintaining this "repository"?
Back to top
View user's profile Send private message
Snake007uk
Apprentice
Apprentice


Joined: 12 Jan 2003
Posts: 198
Location: London, UK

PostPosted: Fri Jan 09, 2004 8:31 pm    Post subject: Reply with quote

lol ok that not what im thinking about think of it this way, you as a developer make an application lets say a cd burning app ok. now your library is the first of its kind and chances are andother burning app will use it to carry out the task of burning so you just upload to a library repository, just like having app repository.

so now when the developer need to look for that library they can get it easily, when you emerge the program the developer doesnt need to put it with the rest of the program he can tell portage to get it from the repository, and portage would first check if this library is already installed if so it will just use that otherwise, it will get it.

the ONLY problem i could see is where the same library would want to be compiled with different USE flags and so you would need two copies of the library etc.. i would assume, i am not a developer as such so i wouldnt know, but sure there could be something like this.

dont you think this is a good idea?? just want opinions :)
_________________
Snake :)

Dual AMD MP 2800+, Asus A7M266-D, 1GB Ram, 18.1GB u160 HD, ATI Radeon 9600 Pro, Creative Audigy ZS, Intel SRCU31A, Linksys NIC, iiyama 18.1 4637bk lcd
Back to top
View user's profile Send private message
floffe
Guru
Guru


Joined: 24 Nov 2003
Posts: 414
Location: Linköping, Sweden

PostPosted: Fri Jan 09, 2004 8:58 pm    Post subject: Reply with quote

Portage does do that right? If I have have xfree and gnome installed, and want kde, it doesn't make me re-emerge xfree (unless there has been an update)?

Or for your cd-burning example, today I emerged xcdroast. As I already had cdrtools, it was just one or two dependencies I nedded. I don't really get your point?
Back to top
View user's profile Send private message
Stormy Eyes
Veteran
Veteran


Joined: 09 Apr 2003
Posts: 1064
Location: Watching God spit-shine my boots.

PostPosted: Fri Jan 09, 2004 9:10 pm    Post subject: Reply with quote

floffe wrote:
Portage does do that right? If I have have xfree and gnome installed, and want kde, it doesn't make me re-emerge xfree (unless there has been an update)?

Or for your cd-burning example, today I emerged xcdroast. As I already had cdrtools, it was just one or two dependencies I nedded. I don't really get your point?


Nor do I. I think that Snake's uptight because he's probably gone a while without emerging the whole world after an emerge sync. If you keep up, you won't have to rebuild hundreds of packages. I usually sync every night (cronjob) and emerge the world about twice a week. I usually don't have to rebuild more than a dozen packages at a time.

EDIT: It's kind of installing Debian for the first time, switching to unstable or testing and doing apt-get update && apt-get upgrade. The first time you do it, you're going to say "holy crispy crap!" when you see all the packages you'll be downloading. But after the first time, if you keep up you'll be fine.
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Fri Jan 09, 2004 9:31 pm    Post subject: Reply with quote

Snake007uk wrote:

Code:
application A needs --->libraray A
  |
  |
needs library B


And what happens, if Applications B needs llibrary A or B, too?

Snake007uk wrote:
so what portage would do is get those libraries from trhe repository, and compile them and then compile the program, no need to get a whole application for just one library?

Portage is more or less a (good) wrapper for the install methods the authors of the programs/libraries are using. Sometimes even these have to be patched. To break up those tarballs and fiddle around in the whole configuration code is not possible for every piece of software. Simply not enough man-power. And it's not desirable to do this endless job. No one would do it.

Snake007uk wrote:
when a use flag is added the ebuild looks for that library and tells portage about it again poratge gets the library ?

Not exactly. Portage looks if the ebuild that contains the library is installed - and if not tries to merge it.


Regarding your very first question: Use less USE flags! Use only the ones you really need.


Carlo
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
Snake007uk
Apprentice
Apprentice


Joined: 12 Jan 2003
Posts: 198
Location: London, UK

PostPosted: Fri Jan 09, 2004 11:28 pm    Post subject: Reply with quote

No im not uptight i was just "wondering" why ?? so i thought id ask, im not trying to change things, i just wanted to know something.


carlo:

if Application B need library A and B then, when you emerge Application B, portage would see that they are already there in /lib.

im not sure if im not explaining my self properly or something but let me think this through properly.

most application depend on other libraries, so now what im saying is RATHER the emerge a package (program) which contain those libraries why not just get the libraries needed ?

also another note to people I MY-SELF have run many distro's and Gentoo being my favourite the ONLY bad point which si going to be fixed is that the fact there is no "emerge security-updates" other then that i have used emerge know how it works and dont consider my self a noob, please dont flame me, i havent flamed anyone, its just a thought i had and thought id ask people in this forum.

e.g IF you want k3b why do u get xcdroast ? all you wanted in K3B, i understand that k3b also need Xfree to run because its a gui app which makes sense, but when a app needs a library WHY get a WHOLE PACKAGE.

so in my case all the libraries on the system would be placed in one place say /lib which every package would check against to see if any libraries needed are present.

hope this make sense now ?? :?
_________________
Snake :)

Dual AMD MP 2800+, Asus A7M266-D, 1GB Ram, 18.1GB u160 HD, ATI Radeon 9600 Pro, Creative Audigy ZS, Intel SRCU31A, Linksys NIC, iiyama 18.1 4637bk lcd
Back to top
View user's profile Send private message
Carlo
Developer
Developer


Joined: 12 Aug 2002
Posts: 3356

PostPosted: Sat Jan 10, 2004 1:00 am    Post subject: Reply with quote

Snake007uk wrote:
most application depend on other libraries, so now what im saying is RATHER the emerge a package (program) which contain those libraries why not just get the libraries needed ?

Because it is not maintainable (if we think of the same, but I don't believe it).

Snake007uk wrote:
also another note to people I MY-SELF have run many distro's and Gentoo being my favourite the ONLY bad point which si going to be fixed is that the fact there is no "emerge security-updates"

Gentoo is a young Distro. I'm sure this will happen. I agree with you in the point and there is a lot more to do. Go to bugs.g.o, type in portage and have a look at the bugs. There are more serious things, than emerge security-updates I would say.

Did you mean me with "flame..."? My english is not that good. Please excuse me, if I sound rude!?

Snake007uk wrote:
e.g IF you want k3b why do u get xcdroast ?

You don't. These are the dependencies of the latest k3b ebuild:
Code:
newdepend ">=sys-apps/portage-2.0.49-r8
   >=media-sound/mpg123-0.59
   >=media-sound/cdparanoia-3.9.8
   >=media-libs/id3lib-3.8.0_pre2
   mad? ( >=media-sound/mad-0.14.2b )
   oggvorbis? ( media-libs/libvorbis )"

RDEPEND="${RDEPEND} sys-apps/eject
   >=app-cdr/cdrtools-1.11
   >=app-cdr/cdrdao-1.1.7-r3
   media-sound/normalize
   dvdr? ( app-cdr/dvd+rw-tools )
   dvd? ( media-video/transcode media-libs/xvid )"

Plus a few ones from the eclasses it depends on (e.g. autoconf, kdelibs), but definitely not xcdroast.

qpkg -q xcdroast shows you which ebuilds depend on xcdroast.


Carlo
_________________
Please make sure that you have searched for an answer to a question after reading all the relevant docs.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum