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

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
User avatar
francois
Contributor
Contributor
Posts: 5068
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

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

Post#1 by francois » 13 Dec 2013, 23:53

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:
https://forum.porteus.org/viewtopic.php ... 6&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:
Last edited by francois on 25 Dec 2013, 21:54, edited 2 times in total.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5553
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#2 by brokenman » 15 Dec 2013, 22:58

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
wread
Module Guard
Module Guard
Posts: 1091
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

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

Post#3 by wread » 16 Dec 2013, 00:08

@francois
Why are you not satisfied with SBO?
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
francois
Contributor
Contributor
Posts: 5068
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

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

Post#4 by francois » 16 Dec 2013, 00:41

@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?
Voltaire: Le mieux est l'ennemi du bien.

neko
DEV Team
DEV Team
Posts: 955
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

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

Post#5 by neko » 16 Dec 2013, 04:14

@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".

User avatar
brokenman
Site Admin
Site Admin
Posts: 5553
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#6 by brokenman » 16 Dec 2013, 12:02

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
wread
Module Guard
Module Guard
Posts: 1091
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

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

Post#7 by wread » 16 Dec 2013, 19:18

@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!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

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

Post#8 by Rava » 18 Dec 2013, 06:06

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
Last edited by Rava on 19 Dec 2013, 05:10, edited 1 time in total.
Cheers!
Yours Rava

User avatar
brokenman
Site Admin
Site Admin
Posts: 5553
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#9 by brokenman » 18 Dec 2013, 17:08

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 5068
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

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

Post#10 by francois » 19 Dec 2013, 02:45

Great! :D
Voltaire: Le mieux est l'ennemi du bien.

User avatar
Rava
Contributor
Contributor
Posts: 1319
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

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

Post#11 by Rava » 19 Dec 2013, 05:12

@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...
Cheers!
Yours Rava

User avatar
brokenman
Site Admin
Site Admin
Posts: 5553
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#12 by brokenman » 19 Dec 2013, 16:23

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
francois
Contributor
Contributor
Posts: 5068
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

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

Post#13 by francois » 19 Dec 2013, 23:59

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.
Voltaire: Le mieux est l'ennemi du bien.

User avatar
francois
Contributor
Contributor
Posts: 5068
Joined: 28 Dec 2010, 14:25
Distribution: kde xfce porteus manjaro kubun
Location: Enfin l'été, le changement climatique attendu: le soleil.

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

Post#14 by francois » 20 Dec 2013, 16:54

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?
Voltaire: Le mieux est l'ennemi du bien.

User avatar
brokenman
Site Admin
Site Admin
Posts: 5553
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

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

Post#15 by brokenman » 22 Dec 2013, 12:36

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply