PDA

View Full Version : The PC-BSD Package Installer - General Question


05-23-2005, 03:08 PM
Hi,
to be honest - I didn't have installed pcbsd, but I read the article about "The PC-BSD Package Installer".
There is one thing I don't understand:
If every package for example kmail uses his own directory for all libarys, you must install for every kde-application kde? So normally you need a very large harddisk and a lot of memory. I think that isn't a good idea, so I guess there is something I don't understand.
Could someone be so kindly and give me some more information?

Thanks in advance
Niels

malbert_1
05-23-2005, 03:35 PM
Hello Niels,

Here's a link from the PCBSD site that might help explain the methodology behind the package installer:

http://www.pcbsd.com/?p=packages

Please let us know if this helps.
Best regards,
-- malbert_1

05-23-2005, 04:22 PM
Hello Niels,

Here's a link from the PCBSD site that might help explain the methodology behind the package installer:

http://www.pcbsd.com/?p=packages

Please let us know if this helps.
Best regards,
-- malbert_1
Unfortunately it doesn't help. I read this before, but for example firefox based on GTK. Is in the firefox-directory the whole gtk stuff?

pcbsdusr
05-23-2005, 07:42 PM
I really dont know if all the stuff is duplicated around the sytem, as i am new to BSD but... What is the size of your smallest hard drive? Sure, if (i mean if) some files are duplicated that shouln't be crucial as today's hard drives have spavce to waste. If things are really in that way, then you can use two apps which use different versions of GTK which cool. I really cant be sure if that really is the way it works thogh... Just a few thoughts...

I am glad so many poeople are curious about this OS. I sure am having fun with this!

bsd_usr
05-23-2005, 07:48 PM
From the way I gather it, is that the programs are installed in /usr/local/MyPrograms (I believe) and the command to run this is in /usr/local/bin (I believe. I'm not at my PCBSD computer right now, so I'm trying to go from memory. Which is not very good today. And I can't remember how it was yesterday).

It appears that the programs are not stored in the users home directory. With it formatted in this manner, it makes it much easier to install and remove progams without interfering with others that may use the same libraries.

I hope this makes since.

Dwayne

05-24-2005, 12:37 PM
What is the size of your smallest hard drive? Sure, if (i mean if) some files are duplicated that shouln't be crucial as today's hard drives have spavce to waste. If things are really in that way, then you can use two apps which use different versions of GTK which cool. I really cant be sure if that really is the way it works thogh... Just a few thoughts...


Well first of all my experience is that every harddisk is to small, but anyway that's not the point. You need a lot more of memory if every program has his own libs. That's the reason why shared libarys exist. And the RAM is as a matter of fact an expensive ressource.

05-24-2005, 12:42 PM
From the way I gather it, is that the programs are installed in /usr/local/MyPrograms (I believe) and the command to run this is in /usr/local/bin (I believe. I'm not at my PCBSD computer right now, so I'm trying to go from memory. Which is not very good today. And I can't remember how it was yesterday).

It appears that the programs are not stored in the users home directory. With it formatted in this manner, it makes it much easier to install and remove progams without interfering with others that may use the same libraries.

I hope this makes since.

Dwayne

Of cause it's easier to remove a program which has no dependencies, but I think the problem is really fine solved for example at debian. There you have a system where all parts fits together. On the other hand if there are no dependencies you need a lot of memory as I wrote before.

Or is the installer only for programs which are installed by a normal user not by root?

bsd_usr
05-24-2005, 01:08 PM
I'm still unclear as to what this has to do with memory. If the program is run by one user then there isn't a problem as it is loaded in memory and released when the program is closed (In theory this is supposed to happen). How many users will be running the same program, on the same computer at the same time. Correct me if I misunderstood the the last question or point about memory.

05-24-2005, 01:46 PM
I'm still unclear as to what this has to do with memory. If the program is run by one user then there isn't a problem as it is loaded in memory and released when the program is closed (In theory this is supposed to happen). How many users will be running the same program, on the same computer at the same time. Correct me if I misunderstood the the last question or point about memory.

As far as I know the computer loads a libary from /usr/lib/somestuff.so only onces, even if it's used by 100 programs. For example:
We have a libc at Linux-Systems, which need 1 KB at memory. This libary is necessary for 100 different programs, perhaps some deamons. If you put this libary to /ur/lib you need 1 KB if you put this libary to /usr/local/MyProg[1-100] you need 100 KB, because for the system it isn't the same libary.

Of course if 100 user starting the one program the libary libc needs only 1 KB. So the problem isn't the number of user.

bsd_usr
05-24-2005, 02:03 PM
If the library is already loaded into memory won't the program being loaded notice that the library is already loaded or will it load the library into a different memory location

BTW, thank you for clearing that up. At least it is getting a little clearer for me. :)

Thanks again,

Dwayne

05-24-2005, 02:25 PM
If the library is already loaded into memory won't the program being loaded notice that the library is already loaded or will it load the library into a different memory location

Sorry I'm not sure what you mean. A program normally ask the OS to get access for a special libary. The OS normally search beginning at the program directory and than searching the lib-path. If the OS find the lib the lib will be loaded except the lib is already loaded. But at this point a lib is defined by the complete path, i.e. /usr/local/myProgram/libc.so. So for the OS /usr/local/myProgram/libc.so and /usr/local/myOtherProgram/libc.so are different, even if they have the same hashcode. So both libaries will be loaded into different memories.
That's my knowledge about that, but I'm far away to be an expert.

So perhaps someone can correkt me and can explain why it is a good idea to work with myProgram-directories.

bsd_usr
05-24-2005, 02:38 PM
Actually this makes complete since and does indeed answer my question.

Dwayne

Ray
05-26-2005, 11:16 PM
I am not quite sure why this ever becomes an issue in this day and age. I appreciate that when I started in computers in 1963 and 1 x 50MB disk platter took Mogilla Gorilla to lift it and it fitted into a disk unit 3ft 6'' high x 3ft deep x 3ft wide, disk storage was a precious commodity. However in todays world an 80GB drive is now considered to be 'entry level' and much bigger drives are available.

In the scenario painted above about the duplication in memory, this would I believe only occur if you were running multiple programs at the same time, which could happen but would have very little effect on memory, which for most computers these days starts at 512mb and is managed quite adequately by the system. Items loaded into memory but no longer required should in a well constructed system be discarded.

After suffering many years of the Windows dll hell it is quite refreshing to know that somewhere someone is taking what I consider to be the most logical approach and containing programs in their own environment. I presume that space would become a minor irritation if you wanted to install every program, utility ever produced, but this would border on insanity as far as I am concerned. What people are most interested in are programs and utilities that they actually use and I am sure that installing these plus lots and lots of other routines will not impact upon our current and future storage situations.

Lets see how this approach affects us as we load more and more programs from the library, I feel very confident that we will never notice it.

Ray

tdjokic
05-26-2005, 11:44 PM
From http://www.pcbsd.com/?p=packages:

"This approach is something major OS's all learned to master very early on, (I.E. Windows ®, Mac ®) but the *nix world still struggles with."

What about that? I don''t know nothing, anybody ellse?

Ray
05-27-2005, 05:15 AM
"This approach is something major OS's all learned to master very early on, (I.E. Windows ®, Mac ®) but the *nix world still struggles with."

Don't quite understand that sentence myself, Windows only puts part of the application in it's own folder, the other parts go where they will normally cause the most harm to the system, causing other programs to stop working, bsod's and system reinstalls. Windows dll hell should certainly be avoided.

Ray

06-05-2005, 09:34 AM
yes this os every time you install a program it is going to install !every! library in the folder it is completley self contained i looked in a program folder and xmouse was in their .... does that answer your question it will reinstall all of the needed kdelibs gtklibs or whatever in the file so if you use ten programs that are kdelib based you are going to have ten copies of those libs....


im babling ill stop sorry its 2 in the moring and i just got off from work but does this answer your question

dean_fry
06-05-2005, 09:50 AM
yeah but in macosx you just have ONE file for the program and if you delete this the whole programm is deleted. i don't have a mac but a friend has one and his unreal tournament demo is only ONE big file and if he delete's it, it is "uninstalled"...

somebody correct me on this one!

pcbsdusr
06-05-2005, 07:48 PM
i am not sure they use a .pbi similar package... maybe the program searches for the packages it misses in the system...

i thought of a way to deal with this duplicated package issue but... it must be more complicated than it seems because almost all linuxes have the dependency hell program...

Here is what i thought:

Program developers know if their libs are compatible with the system ones.

When making a .pbi package, programs would only have duplicate packages if needed. if it was not necessary the program would just use the system libraries. (to use if programs were installed on the same directory as ports)

OR:

Several versions of the same library could be installed.
Imagibe library A is the original official library for the pc-bsd version you use.
1- program X uses that version - Not a problem, uses it directly
2- You install a .pbi of program Y and it uses a different version - Automatically, on the same directory the original lib is another folder called "name of the lib B" and the Y program will use that lib instead.


Sounds too easy for me so there should be trouble in making things like this. Hey, i am not an expert... Just trying to help..

Keep up the good work guys!

lazyilmaz
06-05-2005, 08:41 PM
Here's another idea... When you install program x, the system must register the library's of that program. And when you install program y the installer must first search for available library's and if the installer founds library's in the system then he shoulnd't copy unnecassary library's but instead he must use the available library's. Now the system know's that both programms are sharing library's. So when you remove program x the system will keep the shared library's, because program y is using them, and when you remove program y too the system now knows that the library's are not used anymore and can safely remove them. That way you don't have duplicate files and no dependency hell.

I'm just thinking simple :wink: maybe this is just a stupid idea.

dean_fry
06-05-2005, 09:09 PM
you know where THAT leads to don't ya?

a blown up REGISTRY and dependecy hell
we should take the best of both worlds not their failures... ;)

it's the first thing what came into my mind when i read it...

pcbsdusr
06-05-2005, 11:20 PM
LOL, windows registry with Linux's dependancy hell... that's almost a virus LOL

06-06-2005, 12:54 AM
the thing is the librarys are purposfully self contained dependency will always exist unless you do it the way it is currently being done with these pbis (copys of existing ones) the reason macosx doesnt hve this problem is because of unification (there are not multiple distros of macosx) but with linux or bsd (more so in linux) there are many distros and many different librarys and devolpers claim to support all of the systems and release versions of there programs that use outdated librarys etc so it has a dependancy issue cause the installer is old and ask for old librarys or diff versions etc. but with pbis it refers to the librarys directly in the file and has multiple copies blah blah blah. pcbsd does not have a monopoly so this is for now the best solution...i think

sorry for the not so well explanation but theres the reason

06-06-2005, 06:59 AM
I think i was not clear enough. Every program should have it's own library's in the PBI like now, but should only
install them if they are not already installed. That way you shoulnd't have any dependency problem's. And the registry should only be used for the library's.
Not like Windows which uses it for almost everything.

06-08-2005, 12:38 AM
how is the other program gonna know where the file is located...
every one knows that the store has eggs but every ones not sure if johny has the eggs so you can either call johny up and ask or go straight to the store

dean_fry
06-08-2005, 07:11 AM
well if we use a macosx like directory structure...the every app would first loook in the liibrary folder ;)

September
07-16-2008, 09:43 AM
PC-BSD has as its goals to be an easy to install and use desktop OS, which is built on the FreeBSD operating system. To accomplish this, it currently has a graphical installation, which will enable even UNIX novices to easily install and get it running. It will also come with KDE pre-built, so that the desktop can be used immediately. Currently in development is a graphical software installation program, which will make installing pre-built software as easy as other popular operating systems

TerryP
07-17-2008, 04:11 AM
poking into old threads further rouses my suspicions that your more interested in trying to spread your sig-block then contribute to the community.


This is not usenet.