[Solved] Selfmade module not loading content

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
frederick
White ninja
White ninja
Posts: 16
Joined: 13 Jan 2017, 16:31
Distribution: Porteus 3.2.2 Mate 32bit
Location: toronto

[Solved] Selfmade module not loading content

Post#1 by frederick » 06 Feb 2017, 00:08

Just starting with modules, been reading and watching videos a lot. Wanted something simple to start, so i have a directory with five original .txz packages, that want to convert into a .xzm module.
I create the module, activate it, run my program, and it complains about python not existing. If I use installpkg for the .txz, my program runs without problems.
Any idea what I am doing wrong when building the module?
Porteus 3.1, booting as always clean, running on ext2.

My directory

Code: Select all

root@porteus:/mnt/sda3/mp# ll
total 17664
drwxr-xr-x 2 root root     4096 Feb  5 16:29 ./
drwxr-xr-x 8 root root     4096 Feb  5 15:49 ../
-rw-r--r-- 1 root root    44744 Jun 20  2012 pycairo-1.8.10-i486-2.txz
-rw-r--r-- 1 root root  1696096 Jul  7  2012 pygtk-2.24.0-i486-1.txz
-rw-r--r-- 1 root root 12040184 May 29  2013 python-2.7.5-i486-1.txz
-rw-r--r-- 1 root root  2537084 Oct 16  2013 tcl-8.6.1-i486-1.txz
-rw-r--r-- 1 root root  1722852 Oct 16  2013 tk-8.6.1-i486-1.txz
Make the module

Code: Select all

root@porteus:/mnt/sda3/mp# dir2xzm . python-2.7.5-i486-1-bundle.xzm
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on python-2.7.5-i486-1-bundle.xzm, block size 262144.
[=================================================================|] 72/72 100%

Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments, compressed xattrs
	duplicates are removed
Filesystem size 17618.81 Kbytes (17.21 Mbytes)
	100.00% of uncompressed filesystem size (17619.11 Kbytes)
Inode table size 202 bytes (0.20 Kbytes)
	39.92% of uncompressed inode table size (506 bytes)
Directory table size 186 bytes (0.18 Kbytes)
	92.08% of uncompressed directory table size (202 bytes)
Number of duplicate files found 0
Number of inodes 7
Number of files 6
Number of fragments 1
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 1
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
Now it's there and contains

Code: Select all

root@porteus:/mnt/sda3/mp# lsxzm python-2.7.5-i486-1-bundle.xzm
Parallel unsquashfs: Using 2 processors
6 inodes (72 blocks) to write


/pycairo-1.8.10-i486-2.txz
/pygtk-2.24.0-i486-1.txz
/python-2.7.5-i486-1-bundle.xzm
/python-2.7.5-i486-1.txz
/tcl-8.6.1-i486-1.txz
/tk-8.6.1-i486-1.txz
root@porteus:/mnt/sda3/mp# 
Activate it

Code: Select all

root@porteus:/mnt/sda3/mp# activate python-2.7.5-i486-1-bundle.xzm
Updating shared library links:  /sbin/ldconfig
And get the message: "well done! module ....
When I try to run my program, it complains about python not beign there

Code: Select all

root@porteus:/mnt/sda3/mp# myprog
/usr/bin/env: python2.7: No such file or directory
If I install the .txz packages, that were used to build the module, one by one, my program runs without problems
Thanks!
Last edited by frederick on 06 Feb 2017, 22:32, edited 1 time in total.

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 887
Joined: 20 Mar 2012, 03:42
Distribution: 3.2.2-64bit xfce/openbox
Location: australia
Contact:

Re: Selfmade module not loading content

Post#2 by ncmprhnsbl » 06 Feb 2017, 04:00

ok
a bundle or module isn't just a directory of packages compressed into .xzm format..
it is a "fakeroot" directory compressed into .xzm format..
so..
you need to first install your packages into the fakeroot..
its easy, porteus has the necessary tools:

Code: Select all

mkdir python-bundle
cd /path/to/folder/of/packages
installpkg --terse --root /path/to/python-bundle *.txz 
dir2xzm python-bundle python-bundle.xzm
Forum Rules : http://forum.porteus.org/viewtopic.php?f=35&t=44

frederick
White ninja
White ninja
Posts: 16
Joined: 13 Jan 2017, 16:31
Distribution: Porteus 3.2.2 Mate 32bit
Location: toronto

[Solved] Re: Selfmade module not loading content

Post#3 by frederick » 06 Feb 2017, 06:07

It worked! :Yahoo!: Nice, simple and to the point. Thank you, ncmprhnsbl.

Following your explanation carefully and trying to understand the process, did more than all the previous reading and watching.
Now I understand a little bit more about how modules are made, where one is supposed to remove unwanted man pages/documentation from, and make changes into.

Thanks a lot!
frederick

Post Reply