<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large"><br></div></div><div dir="ltr"><div dir="ltr"><div style="font-size:large"><br></div></div><div dir="ltr"><div dir="ltr"><div style="font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 12 Sept 2022 at 10:55, Benoit Minisini <<a href="mailto:benoit.minisini@gambas-basic.org" target="_blank">benoit.minisini@gambas-basic.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le 12/09/2022 Ã  11:37, Bruce Steers a Ã©crit :<br>
> <br>
> <br>
> On Sun, 11 Sept 2022 at 15:35, Bruce Steers <<a href="mailto:bsteers4@gmail.com" target="_blank">bsteers4@gmail.com</a> <br>
> <mailto:<a href="mailto:bsteers4@gmail.com" target="_blank">bsteers4@gmail.com</a>>> wrote:<br>
> <br>
> <br>
> <br>
> <br>
>  Â  Â On Sat, 10 Sept 2022 at 15:12, Benoit Minisini<br>
>  Â  Â <<a href="mailto:benoit.minisini@gambas-basic.org" target="_blank">benoit.minisini@gambas-basic.org</a><br>
>  Â  Â <mailto:<a href="mailto:benoit.minisini@gambas-basic.org" target="_blank">benoit.minisini@gambas-basic.org</a>>> wrote:<br>
> <br>
>  Â  Â  Â  Â Le 10/09/2022 Ã  14:25, Bruce Steers a Ã©crit :<br>
>  Â  Â  Â  Â  >  Â  Â Yes. 'gb.compress' is for compressing, not archiving.<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  >  Â  Â If you want to create compressed archives, use the<br>
>  Â  Â  Â  Â command-line tools.<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  >  Â  Â Regards,<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  >  Â  Â --<br>
>  Â  Â  Â  Â  >  Â  Â Benoît Minisini.<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  > Ahh , very well<br>
>  Â  Â  Â  Â  > I see there's /main/gbc/gbc_archive.c but it looks<br>
>  Â  Â  Â  Â internal/private is<br>
>  Â  Â  Â  Â  > there too much to do to update Uncompress to support listing and<br>
>  Â  Â  Â  Â  > extracting items or can gbc_archive be modified to extract<br>
>  Â  Â  Â  Â items and<br>
>  Â  Â  Â  Â  > work publicly?<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  > I assume gambas itself (gbc) can unarchive because a gambas<br>
>  Â  Â  Â  Â exe is an<br>
>  Â  Â  Â  Â  > archive (or am i wrong about that and it works differently?)<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  > Note: not interested in adding/making archives just extracting.<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  > Reason: I'm adding an update class to my progs that uses gitlab,<br>
>  Â  Â  Â  Â  > It checks version in .project file and downloads the archive<br>
>  Â  Â  Â  Â if newer,<br>
>  Â  Â  Â  Â  > then extracts contents to update/compile source.<br>
>  Â  Â  Â  Â  ><br>
>  Â  Â  Â  Â  > Respects<br>
>  Â  Â  Â  Â  > BruceS<br>
>  Â  Â  Â  Â  ><br>
> <br>
>  Â  Â  Â  Â I really don't see the problem with using SHELL or EXEC with 'zip',<br>
>  Â  Â  Â  Â 'tar', and so on.<br>
> <br>
> <br>
>  Â  Â aah fair enough.  Shell or Exec it is then :)<br>
>  Â  Â Respects<br>
>  Â  Â BruceS<br>
> <br>
> <br>
> <br>
> Maybe we (i could have a go) could expand Shell in gb.util a bit to be <br>
> more than MkDir, RmDir, Move?<br>
> (btw. i am considering Shell.class to be where we would put some <br>
> functions that are just for Shell/Exec use)<br>
> <br>
> Things i think (have previously thought) would be useful Shell commands <br>
> for everyone to have in gambas...<br>
> <br>
> Shell.ArchiveList(ArchivePath) As String[] '  could auto-handle various <br>
> filetypes.<br>
> Shell.ArchiveExtract(ArchivePath, DestFolder, Optional FileList As String[])<br>
> Shell.ArchiveAdd(ArchivePath, FileList As String[])<br>
> <br>
> Shell.PackageInstall(PkgName) ' basic installer that will handle most <br>
> installers and be fine for simple package names, returning error code if <br>
> any.<br>
> Eg.  Shell.PackageInstall("git")<br>
> <br>
> Some multi-platform compatible functions like this<br>
> <br>
> just some food for thought :)<br>
> Respects<br>
> BruceS<br>
> <br>
<br>
Not in 'gb.util', which cannot depend on any external library, and <br>
should not depend on external tools. 'gb.util' is only for adding less <br>
common small functions and features to the language.<br>
<br>
A common interface to the underlying various archive tools should have <br>
its own component.<br>
<br>
Installing package is something entirely system et distribution <br>
specific, so it should have its own component too.<br>
<br>
Moreover, this feature seems to have already been standardized with <br>
'PackageKit', so maybe one should look at it first.<br>
<br>
Regards,<br>
<br>
-- <br>
Benoît Minisini.<span class="gmail_default" style="font-size:large"></span><br></blockquote><div><br></div><div style="font-size:large" class="gmail_default">Aah yes, my understanding of the purpose of gb.util was incorrect.</div><div style="font-size:large" class="gmail_default"></div><div style="font-size:large" class="gmail_default">so components like gb.archiver and gb.packager<br></div><div style="font-size:large" class="gmail_default"><br></div><div style="font-size:large" class="gmail_default">Looking at PackageKit the main page mentions it's lack of functionality in a few areas , like dependencies for example.</div><div style="font-size:large" class="gmail_default"><h3>Quote: <span style="font-weight:normal"><a href="https://www.freedesktop.org/software/PackageKit/pk-faq.html">https://www.freedesktop.org/software/PackageKit/pk-faq.html</a></span><br><br>How does PackageKit handle dependencies?<br>PackageKit does not do<span style="font-weight:normal"> dependency resolution.
This problem has already been solved by the backend systems and we don't really
want to re-invent the wheel.<br>PackageKit does not have the fine-grained API to do everything.
For instance, synaptic should still use libapt as can do much more than can be
provided by PackageKit.
</span></h3><div>So possibly using the backends is the way to go?</div><div>backends and functionality are listed here.. <a href="https://www.freedesktop.org/software/PackageKit/pk-matrix.html">https://www.freedesktop.org/software/PackageKit/pk-matrix.html</a></div><div><table><tbody><tr><td><center>only aptcc</center></td>
<td><center>alpm</center></td>
<td><center>entropy</center></td>
<td><center>poldek</center></td>
<td><center>portage</center></td>
<td><center>slapt</center></td>
<td><center>dnf</center></td>
<td><center>zypp</center></td></tr></tbody></table></div><div>Maybe gambas environment is available to other pkg installers too?<br></div><div>I'll look into it and see if i can make something simple (non bloated)</div><div><br></div><div>As for archiving i think yes a simple Archiver class/component that's a common interface to support various popular archive types automatically could also be useful to many.</div><div><br></div><div>Cheers Ben<br></div><div>Respects</div><div>BruceS</div><div><br></div></div></div></div>
</div>
</div>