[Porteus 5.0's USM replacement] getmod: A wrapper for slapt-get to build modules

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
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0's USM replacement: slapt-get, getmod

Post#91 by Ed_P » 30 Sep 2022, 20:02

This approach works.

Code: Select all

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# wget https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz /tmp
--2022-09-30 16:00:44--  https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz
Resolving download.salixos.org (download.salixos.org)... 37.59.61.63
Connecting to download.salixos.org (download.salixos.org)|37.59.61.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133208 (130K) [text/plain]
Saving to: ‘gslapt-0.5.9-x86_64-4gv.txz’

gslapt-0.5.9-x86_64-4 100%[======================>] 130.09K   316KB/s    in 0.4s    

2022-09-30 16:00:45 (316 KB/s) - ‘gslapt-0.5.9-x86_64-4gv.txz’ saved [133208/133208]

/tmp: Scheme missing.
FINISHED --2022-09-30 16:00:45--
Total wall clock time: 1.7s
Downloaded: 1 files, 130K in 0.4s (316 KB/s)
root@porteus:/home/guest# ls /tmp
MozillaUpdateLock-A956882C70C4F623          dbus-EUKCpt5PF8=  tmpaddon
Temp-f8be8719-bbb2-4332-887f-602a82f927c6/  mozilla_guest0/
root@porteus:/home/guest# 
Added in 3 minutes 32 seconds:

Code: Select all

root@porteus:/home/guest# 
root@porteus:/home/guest# wget https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz /tmp/gslapt
--2022-09-30 16:04:11--  https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz
Resolving download.salixos.org (download.salixos.org)... 37.59.61.63
Connecting to download.salixos.org (download.salixos.org)|37.59.61.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133208 (130K) [text/plain]
Saving to: ‘gslapt-0.5.9-x86_64-4gv.txz.1’

gslapt-0.5.9-x86_64-4 100%[======================>] 130.09K   317KB/s    in 0.4s    

2022-09-30 16:04:13 (317 KB/s) - ‘gslapt-0.5.9-x86_64-4gv.txz.1’ saved [133208/133208]

/tmp/gslapt: Scheme missing.
FINISHED --2022-09-30 16:04:13--
Total wall clock time: 1.5s
Downloaded: 1 files, 130K in 0.4s (317 KB/s)
root@porteus:/home/guest# ls /tmp
MozillaUpdateLock-A956882C70C4F623          dbus-EUKCpt5PF8=  tmpaddon
Temp-f8be8719-bbb2-4332-887f-602a82f927c6/  mozilla_guest0/
root@porteus:/home/guest# 
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#92 by Rava » 30 Sep 2022, 23:54

Ed_P wrote:
30 Sep 2022, 20:05
guest@porteus:~$ su
Password:
root@porteus:/home/guest# wget [URL]
I think it's better when you run that as root as you did 3 minutes 32 seconds later.

But, you downloaded the file into $PWD (unless you specify a path, e.g. via adding

Code: Select all

-O /path/to/whatever/name.xzm
like so:

Code: Select all

guest@porteus:~$ wget https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz -O /tmp/whatever.xzm
--2022-10-01 01:36:27--  https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz
Resolving download.salixos.org (download.salixos.org)... 37.59.61.63
Connecting to download.salixos.org (download.salixos.org)|37.59.61.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133208 (130K) [text/plain]
Saving to: ‘/tmp/whatever.xzm’

/tmp/whatever.xzm   100%[===================>] 130.09K   183KB/s    in 0.7s    

2022-10-01 01:36:28 (183 KB/s) - ‘/tmp/whatever.xzm’ saved [133208/133208]

guest@porteus:~$ md5sum gslapt-0.5.9-x86_64-4gv.txz /tmp/whatever.xzm /mnt/sda4/tmp/gslapt-0.5.9-x86_64-4gv.txz 
md5sum: gslapt-0.5.9-x86_64-4gv.txz: No such file or directory
f89a591aecc5cd1cab72423da2b7d66c  /tmp/whatever.xzm
f89a591aecc5cd1cab72423da2b7d66c  /mnt/sda4/tmp/gslapt-0.5.9-x86_64-4gv.txz
this is the reason your file was not in /tmp.
By default without the e.g. -O option wget will always download the file into the current directory aka $PWD .
_______________________________________________

What I oversaw previously, and what did happen with your downloads as well (the one you did as root and the one you did as guest that ended in a file named ‘gslapt-0.5.9-x86_64-4gv.txz.1’ is this:
Length: 133208 (130K) [text/plain]
It should be something like this instead:

Code: Select all

Length: 127676 (125K) [application/x-troff-man]
or even

Code: Select all

Length: 121180 (118K)
I presume your FFx took the info about the link being declared as

Code: Select all

[text/plain]
literally and therefore tried to open it as text.

I tried opening https://download.salixos.org/x86_64/15. ... 64-4gv.txz in Palemoon (by inserting the URL in the URL area itself) and it also opens it as text:
Image
Nothing wrong with that since the server declared a binary file as type
[text/plain]
and Palemoon and FFx just did was told (opening a text/plain file as a text file by displaying its contents) :)
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#93 by Rava » 01 Oct 2022, 00:44

A different issue, still concerning the gslapt-0.5.* but meant as a general question on Slackware versioning conventions:

By testing several downloads (to determine what MIME type the servers did give these files via actual wget downloading), I also got these:
gslapt-0.5.3f-x86_64-1jsc.txz
gslapt-0.5.3h-x86_64-1sl.txz
Are such characters after a numerical version number official Slackware versioning?
Like 0.1a, 0.1b, […], 0.1f, 0.1g, 0.1h ?

Would it not have been better to use this schemata instead:
gslapt-0.5.3.6-x86_64-1jsc.txz
gslapt-0.5.3.8-x86_64-1sl.txz
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Porteus 5.0's USM replacement: slapt-get, getmod

Post#94 by ncmprhnsbl » 01 Oct 2022, 04:02

did no one realize: you gots a package manager? you know, like what this topic's about.. and even better a wrapper to make a module :O

Code: Select all

getmod gslapt
about gslapt: it's nice and all, but it's only really good for installing packages (to changes for example) .. it's somewhat of an impediment to making a module
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0's USM replacement: slapt-get, getmod

Post#95 by Ed_P » 01 Oct 2022, 04:35

Thanks Rava, the -O option worked.

Code: Select all

guest@porteus:~$ wget https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz -O /tmp/gslapt-0.5.9-x86_64-4gv.txz
--2022-09-30 20:34:19--  https://download.salixos.org/x86_64/15.0/salix/xap/gslapt-0.5.9-x86_64-4gv.txz
Resolving download.salixos.org (download.salixos.org)... 37.59.61.63
Connecting to download.salixos.org (download.salixos.org)|37.59.61.63|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 133208 (130K) [text/plain]
Saving to: ‘/tmp/gslapt-0.5.9-x86_64-4gv.txz’

/tmp/gslapt-0.5.9-x86 100%[======================>] 130.09K   316KB/s    in 0.4s    

2022-09-30 20:34:21 (316 KB/s) - ‘/tmp/gslapt-0.5.9-x86_64-4gv.txz’ saved [133208/133208]

guest@porteus:~$ ls /tmp
MozillaUpdateLock-A956882C70C4F623  Temp-f8be8719-bbb2-4332-887f-602a82f927c6/
dbus-BHG4H5VJMz=                    gslapt-0.5.9-x86_64-4gv.txz
tmpaddon
guest@porteus:~$ 
ncmprhnsbl wrote:
01 Oct 2022, 04:02
did no one realize: you gots a package manager? you know, like what this topic's about.. and even better a wrapper to make a module :O

Code: Select all

getmod gslapt
:ROFL: Good point ncmp.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#96 by Rava » 01 Oct 2022, 06:08

Testuser wrote:
30 Sep 2022, 18:54
Guys from this forum I got Gslapt-get.xzm (GUI version of slapt-get). With this we can search for a package and it will download all the dependencies as well.

But at start of installation the program is exiting. Dont know why.
When it is because of the missing gksu - I posted "gslapt-0.5.9 for Port 5.0" as module here gslapt-0.5.9 for Port 5.0 - GUI for slapt-get (Slackware Packages Installation, Graphical USM alternative) with the instructions on how fix that for all programs that use gksu by doing a symlink as root in the terminal.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0's USM replacement: slapt-get, getmod

Post#97 by Ed_P » 01 Oct 2022, 06:53

As I noted in your gslapt-0.5.9 for Port 5.0 thread I had no gksu problem with Porteus 5.0's Cinnamon system.
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#98 by Rava » 01 Oct 2022, 07:32

Ed_P wrote:
01 Oct 2022, 06:53
As I noted in your gslapt-0.5.9 for Port 5.0 thread I had no gksu problem with Porteus 5.0's Cinnamon system.
Because you su to root manually. My post refers to the guest user wanting to start it, not the user root.
See details in the other thread here: gslapt-0.5.9 for Port 5.0 - GUI for slapt-get (Slackware Packages Installation, Graphical USM alternative) (Post by Rava #90374)
Cheers!
Yours Rava

rych
Warlord
Warlord
Posts: 622
Joined: 04 Jan 2014, 04:27
Distribution: Porteus 5.0 x64 OpenBox
Location: NZ
Contact:

Porteus 5.0's USM replacement: slapt-get, getmod

Post#99 by rych » 01 Oct 2022, 07:57

ncmprhnsbl wrote:
01 Oct 2022, 04:02
about gslapt: it's nice and all, but it's only really good for installing packages (to changes for example) .. it's somewhat of an impediment to making a module
I agree and already have to make a hard choice between the 2 package managers/module makers: pmod (with optional mirrors enabled in slackpkgplus.conf) and getmod. I tend to prefer pmod. What about you? And it's GUI enough for me, that's the least of my problems. Bigger problems is that Slackware 15 is getting old already and some packages simply don't exist in Slackware whichever. So AppImage or binary builds for other systems are to the rescue. That is, to me, a multifaceted replacement/improvement over the old USM which was often broken although very GUI etc. Thank you the makers of pmod and getmod.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#100 by Rava » 01 Oct 2022, 08:17

rych wrote:
01 Oct 2022, 07:57
Thank you the makers of pmod and getmod.
Do you happen to know who the creators or pmod and getmod are?
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Porteus 5.0's USM replacement: slapt-get, getmod

Post#101 by Ed_P » 02 Oct 2022, 03:55

ncmprhnsbl wrote:
01 Oct 2022, 04:02
about gslapt: it's nice and all, but it's only really good for installing packages (to changes for example) .. it's somewhat of an impediment to making a module
Valid point. I think I will do nothing for 5 minutes, do the install, then find the changes made with the install (Re: Find Files in -specific- folders... (Post by brokenman #11199)) and then make a module with the changes. :)
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Porteus 5.0's USM replacement: slapt-get, getmod

Post#102 by francois » 07 Oct 2022, 00:44

getmod and pmod, who is the author? The solution is in the the script:

Code: Select all

root@porteus:/home/guest# updatedb
root@porteus:/home/guest#
root@porteus:/home/guest# mlocate pmod
/etc/pam.d/groupmod
/sbin/depmod
/usr/local/bin/pmod
/usr/sbin/groupmod
root@porteus:/home/guest# mlocate getmod
/usr/sbin/getmod
:D
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Porteus 5.0's USM replacement: slapt-get, getmod

Post#103 by francois » 07 Oct 2022, 00:55

So slapt-get is just to set up what is needed for the porteus getmod wrapper. The salix repository 15.1 seems to provide a good lot of pasture.

Works well, I have built sboui with getmod. But will sboui be needed?

Hail to the Big dev who is the creator of everything! B)
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#104 by Rava » 07 Oct 2022, 02:03

francois wrote:
07 Oct 2022, 00:44
getmod and pmod, who is the author? The solution is in the the script:
It is?

less /usr/local/bin/pmod only tells me this
## a simple wrapper for slackpkg
and less /usr/sbin/groupmod
## A simple wrapper for slapt-get to build the Porteus module.
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Porteus 5.0's USM replacement: slapt-get, getmod

Post#105 by Rava » 07 Oct 2022, 07:39

Code: Select all

root@porteus:/Porteus_modules# getmod -m spek-0.8.3_07c13da27d-x86_64-1salix15.0Reading Package Lists...Done
Suggested packages:
  alsa-lib bzip2 elfutils eudev gcc libffi libjpeg-turbo libpng pcre xz zlib 
  brotli cairo cdparanoia elfutils fontconfig freetype fribidi graphite2 
  harfbuzz libX11 libXau libXdmcp libXext libXrender libXv libdrm libglvnd 
  libgudev libogg libtheora libunwind libvisual libvorbis libxcb libxml2 mesa 
  opus orc pixman wayland 
The following NEW packages will be installed:
  aspell hunspell enchant expat graphene gstreamer pango gst-plugins-base gtk+3 
  hyphen libmanette libwpe woff2 wpebackend-fdo webkit2gtk wxGTK3 spek 
0 upgraded, 0 reinstalled, 17 newly installed, 0 to remove, 0 not upgraded.
Need to get 43.0MB of archives.
Do you want to continue? [y/N] y
Just know that on /Porteus_modules there was enough free space, but getmod seems not to work like that, using the $PWD.

And in / aka the RAMdisk was not enough free space as we will see soon:

Code: Select all

1/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ aspell 0.60.8-x86_64-3 [632.0kB]...Done
2/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ hunspell 1.7.1-x86_64-1_slack15.0 [308.0kB]...Done
3/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ enchant 2.3.2-x86_64-1 [52.0kB]...Done
4/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ expat 2.4.9-x86_64-1_slack15.0 [128.0kB]...Done
5/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ graphene 1.10.6-x86_64-1 [104.0kB]...Done
6/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ gstreamer 1.18.5-x86_64-1 [1.7MB]...Done
7/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ pango 1.48.11-x86_64-1 [372.0kB]...Done
8/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ gst-plugins-base 1.18.5-x86_64-1 [2.2MB]...Done
9/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ gtk+3 3.24.31-x86_64-1 [10.7MB]...Done
10/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ hyphen 2.8.8-x86_64-3 [80.0kB]...Done
11/17 Get http://slackware.uk/salix/x86_64/15.0/ libmanette 0.2.6-x86_64-1gv [41.0kB]...Done
12/17 Get http://slackware.uk/salix/x86_64/15.0/ libwpe 1.12.0-x86_64-1gv [43.0kB]...Done
13/17 Get http://slackware.uk/salix/x86_64/slackware-15.0/ woff2 20180531_a0d0ed7-x86_64-3 [44.0kB]...Done
14/17 Get http://slackware.uk/salix/x86_64/15.0/ wpebackend-fdo 1.12.0-x86_64-1gv [32.0kB]...Done
15/17 Get http://slackware.uk/salix/x86_64/15.0/ webkit2gtk 2.34.3-x86_64-1gv [20.6MB]...Done
16/17 Get http://slackware.uk/salix/x86_64/extra-15.0/ wxGTK3 3.0.5-x86_64-4salix15.0 [6.0MB]...Done
17/17 Get http://slackware.uk/salix/x86_64/extra-15.0/ spek 0.8.3_07c13da27d-x86_64-1salix15.0 [92.0kB]...Done
So far, so good. Omitting where the files are downloaded to, but everything went okay.

But now the trouble starts:

Code: Select all

Verifying package spek-0.8.3_07c13da27d-x86_64-1salix15.0.txz.
Installing package spek-0.8.3_07c13da27d-x86_64-1salix15.0.txz:
PACKAGE DESCRIPTION:
# spek (Acoustic Spectrum Analyser)
# Spek is an acoustic spectrum analyser written in C and C++. It uses
# FFmpeg spek: libraries for audio decoding and wxWidgets for the GUI.
#
# Spek is available on *BSD, GNU/Linux, Windows and Mac OS X.
#
# Find out more about Spek on its website: http://spek.cc/
#
Executing install script for spek-0.8.3_07c13da27d-x86_64-1salix15.0.txz.
Package spek-0.8.3_07c13da27d-x86_64-1salix15.0.txz installed.
Verifying package wxGTK3-3.0.5-x86_64-4salix15.0.txz.
Installing package wxGTK3-3.0.5-x86_64-4salix15.0.txz:
PACKAGE DESCRIPTION:
# wxGTK3 (cross-platform GUI toolkit)
#
# wxGTK3 is part of wxWidgets, a cross-platform API for writing GUI
# applications on multiple platforms that still utilize the native
# platform's controls and utilities.
#
# http://wxwidgets.org
#
Executing install script for wxGTK3-3.0.5-x86_64-4salix15.0.txz.
Package wxGTK3-3.0.5-x86_64-4salix15.0.txz installed.
Verifying package webkit2gtk-2.34.3-x86_64-1gv.txz.
Installing package webkit2gtk-2.34.3-x86_64-1gv.txz:
PACKAGE DESCRIPTION:
# webkit2gtk (GTK+ port of WebKit)
# 
# WebKit/GTK+ is the new GTK+ port of the WebKit, an open-source web
# content engine that powers numerous applications such as web
# browsers, email clients, feed readers, web and text editors, and a
# whole lot more.
# 
# http://webkit.org  http://webkitgtk.org
# 
Executing install script for webkit2gtk-2.34.3-x86_64-1gv.txz.
Package webkit2gtk-2.34.3-x86_64-1gv.txz installed.
Verifying package wpebackend-fdo-1.12.0-x86_64-1gv.txz.
Installing package wpebackend-fdo-1.12.0-x86_64-1gv.txz:
PACKAGE DESCRIPTION:
# wpebackend-fdo (Freedesktop.org backend for WPE WebKit)
# 
# This package provides a backend for WPE WebKit.
# 
Executing install script for wpebackend-fdo-1.12.0-x86_64-1gv.txz.
Package wpebackend-fdo-1.12.0-x86_64-1gv.txz installed.
Verifying package libwpe-1.12.0-x86_64-1gv.txz.
Installing package libwpe-1.12.0-x86_64-1gv.txz:
PACKAGE DESCRIPTION:
# libwpe (General-purpose library for WPE WebKit)
# 
# WPE is the reference WebKit port for embedded and low-consumption
# computer devices. It has been designed from the ground-up with
# performance, small footprint, accelerated content rendering, and
# simplicity of deployment in mind, bringing the excellence of the
# WebKit engine to countless platforms and target devices.
# 
Executing install script for libwpe-1.12.0-x86_64-1gv.txz.
Package libwpe-1.12.0-x86_64-1gv.txz installed.
Verifying package libmanette-0.2.6-x86_64-1gv.txz.
Installing package libmanette-0.2.6-x86_64-1gv.txz:
PACKAGE DESCRIPTION:
# libmanette (The simple GObject game controller library)
# 
# libmanette offers painless access to game controllers, from any
# programming language and with little dependencies. It supports the
# de-facto standard gamepad, as defined by the W3C standard gamepad
# specification or as implemented by the SDL GameController. Convertion
# of raw gamepad events into usable ones is handled transparently using
# an embedded library of mappings in the popular SDL mapping string
# format.
# 
Executing install script for libmanette-0.2.6-x86_64-1gv.txz.
Package libmanette-0.2.6-x86_64-1gv.txz installed.
Verifying package expat-2.4.9-x86_64-1_slack15.0.txz.
Installing package expat-2.4.9-x86_64-1_slack15.0.txz:
PACKAGE DESCRIPTION:
# expat (C library for parsing XML)
#
# This is Expat, a C library for parsing XML, written by James Clark.
# Expat is a stream-oriented XML parser used by Python, GNOME, Xft2,
# and other things.
#
# Homepage: https://libexpat.github.io
#
Executing install script for expat-2.4.9-x86_64-1_slack15.0.txz.
Package expat-2.4.9-x86_64-1_slack15.0.txz installed.
Verifying package hunspell-1.7.1-x86_64-1_slack15.0.txz.
Installing package hunspell-1.7.1-x86_64-1_slack15.0.txz:
PACKAGE DESCRIPTION:
# hunspell (spell checker and morphological analyzer library)
#
# Hunspell is a spell checker and morphological analyzer library
# and program designed for languages with rich morphology
# and complex word compounding or character encoding.
# Hunspell interfaces: Ispell-like terminal interface using ncurses
# library, Ispell pipe interface, and OpenOffice.org UNO module.
#
# Homepage: http://hunspell.sourceforge.net/
#
Executing install script for hunspell-1.7.1-x86_64-1_slack15.0.txz.
Package hunspell-1.7.1-x86_64-1_slack15.0.txz installed.
Verifying package woff2-20180531_a0d0ed7-x86_64-3.txz.
Installing package woff2-20180531_a0d0ed7-x86_64-3.txz:
PACKAGE DESCRIPTION:
# woff2 (WOFF File Format 2.0 library)
#
# WOFF2 is the Web Open Font Format 2 reference implementation.
# See also: https://www.w3.org/TR/WOFF2/
#
# Homepage: https://github.com/google/woff2
#
Executing install script for woff2-20180531_a0d0ed7-x86_64-3.txz.
Package woff2-20180531_a0d0ed7-x86_64-3.txz installed.
Verifying package hyphen-2.8.8-x86_64-3.txz.
Installing package hyphen-2.8.8-x86_64-3.txz:
PACKAGE DESCRIPTION:
# hyphen (hyphenation and justification library)
#
# Hyphen is a library for high quality hyphenation and justification.
#
# Homepage: https://travis-ci.org/hunspell/hyphen
#
Executing install script for hyphen-2.8.8-x86_64-3.txz.
Package hyphen-2.8.8-x86_64-3.txz installed.
Verifying package gtk+3-3.24.31-x86_64-1.txz.
Installing package gtk+3-3.24.31-x86_64-1.txz:
PACKAGE DESCRIPTION:
# gtk+3 (multi-platform GUI toolkit v3)
#
# This is GTK+, a multi-platform toolkit for creating graphical user
# interfaces. Offering a complete set of widgets, GTK+ is suitable for
# projects ranging from small one-off projects to complete application
# suites.
#
Up to this point, all packages have been downloaded into the RAMdisk as well, but now every package gets extracted into the RAMdisk also.
And the above package was the very last one that fit onto the RAMdisk, from now disaster befalls the user, and getmod seems not to do any checks if a command it executed was successful.
Nor does it offer a parameter like

Code: Select all

-d : use current directory for build work.
as update-browser does to avoid such disaster. See for yourself:

Code: Select all

Executing install script for gtk+3-3.24.31-x86_64-1.txz.
cp: error copying '/tmp/spek-0.8.3_07c13da27d-x86_64-1salix15.0.12399/installpkg-e46286f3dd86a533a228f0f698438fc1/doinst.sh' to '/tmp/spek-0.8.3_07c13da27d-x86_64-1salix15.0.12399/var/lib/pkgtools/scripts/gtk+3-3.24.31-x86_64-1': No space left on device
Package gtk+3-3.24.31-x86_64-1.txz installed.
Verifying package gst-plugins-base-1.18.5-x86_64-1.txz.
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 563: echo: write error: No space left on device
cat: write error: No space left on device
Installing package gst-plugins-base-1.18.5-x86_64-1.txz:
PACKAGE DESCRIPTION:
Executing install script for gst-plugins-base-1.18.5-x86_64-1.txz.
cp: error copying '/tmp/spek-0.8.3_07c13da27d-x86_64-1salix15.0.12399/installpkg-e46286f3dd86a533a228f0f698438fc1/doinst.sh' to '/tmp/spek-0.8.3_07c13da27d-x86_64-1salix15.0.12399/var/lib/pkgtools/scripts/gst-plugins-base-1.18.5-x86_64-1': No space left on device
Package gst-plugins-base-1.18.5-x86_64-1.txz installed.
Verifying package pango-1.48.11-x86_64-1.txz.
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 563: echo: write error: No space left on device
cat: write error: No space left on device
Installing package pango-1.48.11-x86_64-1.txz:
PACKAGE DESCRIPTION:
Executing install script for pango-1.48.11-x86_64-1.txz.
Package pango-1.48.11-x86_64-1.txz installed.
Verifying package gstreamer-1.18.5-x86_64-1.txz.
Unable to install /tmp/getmod/spek-0.8.3_07c13da27d-x86_64-1salix15.0/slackware64/l/gstreamer-1.18.5-x86_64-1.txz:  tar archive is corrupt (tar returned error code 2)
Verifying package graphene-1.10.6-x86_64-1.txz.
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 560: echo: write error: No space left on device
/sbin/installpkg: line 563: echo: write error: No space left on device
cat: write error: No space left on device
Installing package graphene-1.10.6-x86_64-1.txz:
PACKAGE DESCRIPTION:
Executing install script for graphene-1.10.6-x86_64-1.txz.
Package graphene-1.10.6-x86_64-1.txz installed.
Verifying package enchant-2.3.2-x86_64-1.txz.
Unable to install /tmp/getmod/spek-0.8.3_07c13da27d-x86_64-1salix15.0/slackware64/l/enchant-2.3.2-x86_64-1.txz:  tar archive is corrupt (tar returned error code 2)
Verifying package aspell-0.60.8-x86_64-3.txz.
Unable to install /tmp/getmod/spek-0.8.3_07c13da27d-x86_64-1salix15.0/slackware64/l/aspell-0.60.8-x86_64-3.txz:  tar archive is corrupt (tar returned error code 2)
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on /tmp/spek-0.8.3_07c13da27d-x86_64-1salix15.0.xzm, block size 1048576.
[====================================================\         ] 1448/1674  86%
Write failed because No space left on device
FATAL ERROR: Failed to write to output filesystem
I suggest whoever coded getmod to add a "-D" option [as in Directory], and also, if possible to do checks on $? from the program just executed. When anything other than a 0 gets reported back, an error occurred and getmod should stop, and tell the user to look above what the error is. Usually the program that got executed will report what went wrong.
Or capture $? into a value to work with like I did in my activate-011-slapt-get I posted here:
Porteus 5.0's USM replacement: slapt-get, getmod (Post by Rava #90328) (includes code of activate-011-slapt-get)

First Initialize as integer

Code: Select all

declare -i returnval
or do the declare and assignment in one go like I did in the script

Code: Select all

# file exists
	file "$actifile" | grep "Squashfs filesystem" 2>&1 >/dev/null
	declare -i returnval=$?
	if [ $returnval -eq 0 ] ; then
		# and is of file type "Squashfs filesystem"
		echo some code here that does the real work…
	else
		echo -e ${red}"Error- File to activate
$actifile
is not of file type 'Squashfs filesystem'. Abort!"${off}
		exit 2
	fi
The advantage of using

Code: Select all

declare -i returnval=$?
instead of simply using

Code: Select all

if [ $? -eq 0 ] ; then
is that you can report the error code to the user like so

Code: Select all

echo Error: Program [whatever] reported back $returnval
and/or even use the same error code to exit the script itself:

Code: Select all

echo Error: Program [whatever] reported back $returnval
cleanupfunction
exit $returnval
:)
Cheers!
Yours Rava

Post Reply