Recent

Author Topic: An online package manager  (Read 10620 times)

aradeonas

  • Hero Member
  • *****
  • Posts: 824
An online package manager
« on: August 08, 2015, 03:27:06 pm »
Hi,

I saw Embarcadero's Getit that introduced in Delphi XE8 and I think it can help Lazarus and it's community very well.
As you know these days more IDE's make this systems and its good,collecting all packages and make it easy to use like a store.
Is there any work on this subject until now or any one like to work on this subject? If yes I want to help.

derek.john.evans

  • Guest
Re: An online package manager
« Reply #1 on: August 08, 2015, 03:40:41 pm »
Top idea! I thought about that after seeing how Linux/GCC stuff is installed now.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: An online package manager
« Reply #2 on: August 08, 2015, 05:51:14 pm »
Actually, this has existed for quite a long time (it's been there since 2.5.1 days). Even lazarus ships with LazarusPackageManager which is a front end of fppkg. However, I don't know what makes it seems halted and not publicly advertised so that people can contribute packages just like PEAR, PECL, CPAN or anything else that other languages have.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: An online package manager
« Reply #3 on: August 08, 2015, 10:23:13 pm »
Thanks Leledumbo,
It seems there is need for a new one.If any one want to help or have a point for me tell me so I consider it.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #4 on: August 09, 2015, 01:20:37 am »
See my answer in Lazarus mailing list.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Basile B.

  • Guest
Re: An online package manager
« Reply #5 on: August 09, 2015, 01:54:08 am »
.If any one ... have a point for me tell me so I consider it.
Something based on git would be awesome, especially to manage the package version. If by convention a package version is a git tag, then there is just a checkout to do.
Actually with git everything would be simple:
  • download: git clone.
  • update: git pull.
  • adjust version: git checkout <version>.
Even dependencies could be managed with git submodule.
The repositories would not need to be centralized (there are many git hosts, anybody can even run its own). Just the references would need to be centralized.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #6 on: August 09, 2015, 02:52:07 am »
Something based on git would be awesome, especially to manage the package version. If by convention a package version is a git tag, then there is just a checkout to do.
Actually with git everything would be simple:
  • download: git clone.
  • update: git pull.
  • adjust version: git checkout <version>.

We need a meta-package format and a way to search for and install those packages. Git does not help there. Git is a revision control system and can help in revisioning of course.
Could it be used as a low-level storage layer? Maybe, but I don't see any benefit compared to normal file system.
The packages will be loaded one by one as needed, thus "git clone" or "git pull" cannot be used. Also the package version will be in the package's name and other places. Different versions must be available for download. There is no reason to complicate that with a revision control system.

Quote
Even dependencies could be managed with git submodule.

That would be cumbersome. In fact git submodules are cumbersome for any purpose. Have you tried them?
A Lazarus package already has information about dependencies. The new meta-package can use the same information.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Basile B.

  • Guest
Re: An online package manager
« Reply #7 on: August 09, 2015, 05:33:23 am »
Yes of course I known git submodule. It works fine. It's just a reference to another git repository with the commits SHA as reference for the checkout (or the "revision" if you prefer the CVS terminology).

What you miss in my POV is that a git repository contains all the project history.

So when a project needs, for example, a dependency to be at v0.8.1 while the master is at v0.9.2, the package manager could simply call git checkkout v0.8.1...

But your answer doesn't surprise me at all.

Actually the idea is influenced by another packet manager & build tool. It uses git to download and set a dependency to the right revision. I don't like it much but it works fine, using git is a big win for it.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: An online package manager
« Reply #8 on: August 09, 2015, 07:50:04 am »
I saw IDES's that use Git for this subject but we should take the best one not easiest,maybe the easiest is the best,I dont know for sure and Im investigating.
Honestly I do know more about servers system and download,update,UI and site and not even a clue about Lazarus and FPC package system so its need to be checked but if any one in this area want to help its more than welcome ;)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #9 on: August 09, 2015, 10:07:27 am »
Yes of course I known git submodule. It works fine. It's just a reference to another git repository with the commits SHA as reference for the checkout (or the "revision" if you prefer the CVS terminology).

Maybe they are usefull for something, not sure.
I tried to have projects and their libraries in different Git repos and configure them as submodules. The idea was that checking out an old project revision would bring out the required library revisions, too.
Submodules were not suitable for that. They are only suitable for related projects but I don't see the real benefit.

Quote
What you miss in my POV is that a git repository contains all the project history.

So when a project needs, for example, a dependency to be at v0.8.1 while the master is at v0.9.2, the package manager could simply call git checkkout v0.8.1...

But your answer doesn't surprise me at all.

Now I understood that every package would have its own repository. Ok, then "git clone" and "git pull" would work.

Revision control tools make sense for textual data. It does not make sense to store the compressed meta-package there. The package source files must be stored instead. Then after a checkout there must be an automated process to build and compress a  meta-package. Tell me, what is the benefit compared to just compressing the packages once and leaving them in a file system?

Things would be different if the data was constantly changing and we had thousands of revisions. That is the case when revisioning a software development process. Git is very good in that. That's why I use it myself.
The online package server is different. There are 2 or 3 versions of each package that must be supported. They don't change once they are released. Clearly a revision control tool is not needed for that.
It is importand to always use the right tool for a given task.

Git can be used for developing the package sources where ever that happens.
Such a repository indeed contains all the history but it is a whole different process.

Quote
Actually the idea is influenced by another packet manager & build tool. It uses git to download and set a dependency to the right revision. I don't like it much but it works fine, using git is a big win for it.

Which one?
I have an open mind and want to learn about this topic.
So far I have not seen any benefit that Git would bring to the online package system. On the other hand it brings many problems and complications. For example Lazarus would then depend on Git libraries also on Windows. Git on Windows requires MinGW Unix emulation.
I would say it is a no-go.
« Last Edit: August 09, 2015, 11:04:08 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #10 on: August 09, 2015, 10:10:52 am »
I saw IDES's that use Git for this subject ...

Usually the integration of revision control tools is for the actual source code development, not for the IDE's own package system.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #11 on: August 09, 2015, 11:12:55 am »
So when a project needs, for example, a dependency to be at v0.8.1 while the master is at v0.9.2, the package manager could simply call git checkkout v0.8.1...

What if both v0.8.1 and v0.9.2 are needed?
It is a valid situation because different projects can depend on different library versions.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: An online package manager
« Reply #12 on: August 09, 2015, 02:04:12 pm »
So when a project needs, for example, a dependency to be at v0.8.1 while the master is at v0.9.2, the package manager could simply call git checkkout v0.8.1...

What if both v0.8.1 and v0.9.2 are needed?
It is a valid situation because different projects can depend on different library versions.
So how any one control this situation now?I always use the last ones and dont know how we can use many same package.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: An online package manager
« Reply #13 on: August 09, 2015, 02:23:51 pm »
Take Atom as an example :
https://atom.io/packages/list
It use Github and get zip and install it.
Or a better one in my opinion :
https://packagecontrol.io/ for Sublime
It host and control all the packages but is in a sync with personal or public repositories like Github or BitBucket :
https://packagecontrol.io/docs/channels_and_repositories
https://packagecontrol.io/docs/submitting_a_package

And we should consider hosting :
https://packagecontrol.io/stats
https://packagecontrol.io/about

Its not a small job

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4673
  • I like bugs.
Re: An online package manager
« Reply #14 on: August 09, 2015, 03:10:30 pm »
So how any one control this situation now?I always use the last ones and dont know how we can use many same package.

Package options has a 4-digit version definition.

In the package editor, in Required Packages section, you can define a minimum and maximum version for dependent packages. The package definition XML file has a place for this info.
For some reason the project inspector does not have that GUI. I think the version info for its dependent packages must be added to the project definition XML directly. It should be fixed I guess.

Anyway, the IDE is clever enough to identify packages by their version.
Typically only one version of IDE packages like components in the palette can be installed at a time, but packages used by projects and other packages can have many versions.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018