Page 1 of 2

PPM: What is under the hood? What would you propose?

Posted: 13 Dec 2013, 23:53
by francois
WHAT IS UNDER THE HOOD?
@brokenman:
Can you tell us what is under the hood of PPM. In simple terms if you may? For example how the dependencies are resolved for the repository of porteus modules. Is there some dependency resolution for salix, alien and debian repositories?

WHAT WOULD YOU PROPOSE TO BE UNDER THE HOOD OF PPM?
Not satisfied with SB0, I have in mind trying to work on a better way to build from source. Is it that I do not know enough about building from source to be able to use optimally SBO or that some alternative solutions would be better.

A first one is to build packages with src2pkg. There is also VicktorNova seems to be working on intereting solution based on AUR:
viewtopic.php?f=114&t=2386&start=30

It is experimental for now but seems to work. This would be a great addition to PPM. And thus adding to trying to stay multisource in terms of pasture grounds.

Looking at other ways to install and manage packages, I fell on a few interesting threads, here is one:
http://www.linuxquestions.org/questions ... er-703676/
http://slackware.wordpress.com/2007/10/ ... age-tools/

Amongst other tools, amypkg is a simple package manager cli mode, lightning fast to install slackware packages:
http://sourceforge.net/projects/amypkg/

It is said to resolve dependencies. But does it do it really? If so, I wonder if we could adapt it and change its code to get it build porteus packages. The problem is that it does not remove packages, however with modules downloaded in appropriate folders in the module section, this should be a small issue.

But as I think aboiut it, maybe should we move that discussion in the development section. However, if you do not have time for such issues now or later, lets drop the topic :wink:

Re: PPM: What is under the hood? What would you propose?

Posted: 15 Dec 2013, 22:58
by brokenman
Sorry for the delayed response Francois. A little busy with stuff at the moment. As you know, the package manager has various functions from searching for libraries to converting packages. I assume you are interested in how she resolves dependencies for given packages so i will try to explain in brief.

The server contains an information file called LIBS.TXT which contains all the libraries a package offers, and all the libraries it requires. After the user chooses a package, PPM creates a list of all required libraries for the chosen package and then parses LIBS.TXT for the mother package of the library. If no mother is found it begins parsing the slacky and slackware database for the mother package. Once the mother package is found it is added to the list of packages to be processed for dependencies. This loop continues until no more mother packages are found. If any orphan libraries are left the user receives a warning. This is an extremely simplified account of what goes on so i hope it suffices. Back when we first started talking about writing a package manager i didn't want to reply on a third party application as these often fall to the way side or we have no control of fixing bugs. The down side is that i am not the worlds best coder so bugs are unavoidable. It is maturing now and i am interested in rewriting it without all the bells and whistles that it currently has (module tools and extras) and just keeping it as a streamlined package manager.

I'll take a look at some of these newer options you have mentioned. I would like a CLI package manager for text mode users.

Re: PPM: What is under the hood? What would you propose?

Posted: 16 Dec 2013, 00:08
by wread
@francois
Why are you not satisfied with SBO?

Re: PPM: What is under the hood? What would you propose?

Posted: 16 Dec 2013, 00:41
by francois
@brokenman:
1) Do you have to build by hand libtext for each package to be assembled with the appropriate libraries?

2) Amypkg seems interesting as a cli interface. However, we would have to intercept the procedure before it installs the package on the system, so to deviate the processus to installation of xzm packages.

3) When PPM downloads a package with its given libraries, would it be possible instead of sending them directly to the module folder to send them to /modules/name-of-package folder, as in /module/pychess-and-deps? This way we could get to know what belongs with what.

Thanks.

@wread:
I use to like the concept of sbo, but I have seldom be able to build a package from sbo without an error message. Thus in the end, the practical result is that I did built very few packages with sbo. Maybe we should open a thread on sbo and have some examples of simple package building and more complicated package building, so that forum members get acquainted with its functioning. Maybe that thread could also be a troubleshooting thread for sbo. Also, I had the impression that the sbo repository was kind of limited. Although, this could be only an impression. In addition, maybe some procedure should be explained as how to feed sbo with any linux source package. Is this possible?

Re: PPM: What is under the hood? What would you propose?

Posted: 16 Dec 2013, 04:14
by neko
@brokenman:
>> "i am interested in rewriting it"

When PPM will be rewritten, I expect that, rather than hard-coding,
messages in the program are written using the multi-language method like "gettext".

Re: PPM: What is under the hood? What would you propose?

Posted: 16 Dec 2013, 12:02
by brokenman
Francois
1) Do you have to build by hand libtext for each package to be assembled with the appropriate libraries?
No.

2) I had a very quick look at amypkg last night.

3) This is not the best way as sometimes one package is required by multiple applications. Perhaps a folder called 'libraries' ?

Incidentally i almost never have problems compiling from SBo. If you have the correct headers and all build time dependencies it should go smoothly.

Neko
Thanks i will certainly look into this when the time comes. I apologize for not being more multinational during the writing of the first version. Your work has been incredible. I'll send you a PM about this.

Re: PPM: What is under the hood? What would you propose?

Posted: 16 Dec 2013, 19:18
by wread
@francois
For sure you are not building with SBo the correct way. In my experience SBo builds are bullet proof.

For Example: supouse you want to build juan.xzm, ok , You must download first the slackbuild file juan.tar.gz, go to Downloads and open it with Ark, open the folder juan -it is empty-, now download juan-2.2.2-tar.bz2 into empty folder juan, click it open with Ark again.

Now open a konsole in the folder juan and type ./juan (press tab to compete) and enter. Go pick up a cup of tea and come back; you will have juan.SBo.txz ready (follow instructions, it is in /tmp). Right click it and make xzm2txz and in short time you will have your Porteus juan.SBo.xzm.

It never fails, normally...

Regards!

Re: PPM: What is under the hood? What would you propose?

Posted: 18 Dec 2013, 06:06
by Rava
francois wrote:2) Amypkg seems interesting as a cli interface. However, we would have to intercept the procedure before it installs the package on the system, so to deviate the processus to installation of xzm packages.
This should be no issue at all. It's a simple bash script; we could either fork into a version that pleases us, or just take the code snippets we can use and put it into our own project... like, "porteus-package-manager_cli" or such name... :D

Re: PPM: What is under the hood? What would you propose?

Posted: 18 Dec 2013, 17:08
by brokenman
I had a quick look at amypkg and it is a rather small script. It essentially does exactly what PPM does. It runs the package in question through an ldd check to find missing libraries and then searches for the mother package of the library. You can see this in the function amypkg_filedeps()

This script could easily be modified to work with Porteus (as in create porteus modules). I'll check it out after xmas.

Re: PPM: What is under the hood? What would you propose?

Posted: 19 Dec 2013, 02:45
by francois
Great! :D

Re: PPM: What is under the hood? What would you propose?

Posted: 19 Dec 2013, 05:12
by Rava
@brokenman
Great, but we should think about merging it with PPM and PPM's upcoming cli version, so that, under the hood, we have the same code / the same functions in both...

Re: PPM: What is under the hood? What would you propose?

Posted: 19 Dec 2013, 16:23
by brokenman
If i write a CLI version it will not include the full functionality of the GUI version. PPM is a huge task. The CLI version will support only porteus and slackware and will resolve dependencies for both.

Re: PPM: What is under the hood? What would you propose?

Posted: 19 Dec 2013, 23:59
by francois
This would be a very interesting addition to porteus os. Amypkg seemed to be lightning fast. Isn't it? However, maybe I am forgetting about downloading time and package conversion.

Re: PPM: What is under the hood? What would you propose?

Posted: 20 Dec 2013, 16:54
by francois
As src2pkg could transform .deb or .rpm into txz, do you think that using a prospective porteus amypkg derivative with it would provide a powerfull cli alternative to PPM gui?

Re: PPM: What is under the hood? What would you propose?

Posted: 22 Dec 2013, 12:36
by brokenman
Really, slackyd does everything that amypkg does and more. I havn't used src2pkg but i will try to incorporate something similar into the cli.

What features would you like to see in the CLI. So far i am thinking.

Search for packages by keyword
Get info on packages (decsription, size etc)
Download slackware packages (no dep resolution here)
Download Porteus packages (with dep resolution)
Find dependencies for an installed package (and download them)
Build package from source
Install/mount/list/convert packages