Merge modules in Porteux

PorteuX - The Next Experience. It's inspired by Slax and Porteus but with heaps of improvements
Majestic
White ninja
White ninja
Posts: 13
Joined: 19 Mar 2018, 13:21
Distribution: Majestic

Merge modules in Porteux

Post#1 by Majestic » 30 Aug 2023, 11:09

How to merge modules in porteux? Command "for a in /tmp/merge/*.xzm;do xzm2dir $a /tmp/bundle;done" not working...

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Merge modules in Porteux

Post#2 by Blaze » 30 Aug 2023, 15:21

Code: Select all

for i in `find -type f | fgrep .xzm | sort`; do unsquashfs -n -f $i >/dev/null; done
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

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

Merge modules in Porteux

Post#3 by Ed_P » 30 Aug 2023, 16:50

:hmmm: Where are the .xzm files "unsquashfs"ed to? :%)

Added in 5 minutes 21 seconds:
Need a -d parm for the destination. -d /tmp/bundle
Ed

User avatar
Blaze
DEV Team
DEV Team
Posts: 3885
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Merge modules in Porteux

Post#4 by Blaze » 30 Aug 2023, 18:19

Try and you will see :teehee:
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

itrukrakso
Black ninja
Black ninja
Posts: 62
Joined: 23 Jul 2022, 07:42
Distribution: Porteus 5.01_x86_64 Xfce

Merge modules in Porteux

Post#5 by itrukrakso » 30 Aug 2023, 19:07

Hi,
Majestic wrote:
30 Aug 2023, 11:09
Command "for a in /tmp/merge/*.xzm;do xzm2dir $a /tmp/bundle;done" not working...
why would it not work? for me it works when all conditions are met.(ok Porteus 5.0)
Blaze wrote:
30 Aug 2023, 15:21

Code: Select all

for i in `find -type f | fgrep .xzm | sort`; do unsquashfs -n -f $i >/dev/null; done
also works, but is more impractical, because in this form it has to be executed in the directory of the .xzm files
and as Ed_P already noted the target directory is not known.
You find it out of course, in this case under /tmp/bundle/squashfs-root.
So for me the 1st variant would be the better solution.

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

Merge modules in Porteux

Post#6 by Ed_P » 30 Aug 2023, 19:47

itrukrakso wrote:
30 Aug 2023, 19:07
why would it not work? for me it works when all conditions are met.(ok Porteus 5.0)
Did you not read what the OP posted?
Majestic wrote:
30 Aug 2023, 11:09
How to merge modules in porteux?
porteux apparently uses a different formula making it's modules or doesn't have the dependencies xzm2dir requires.
itrukrakso wrote:
30 Aug 2023, 19:07
You find it out of course, in this case under /tmp/bundle/squashfs-root.
Thank you but how does it know to use the /tmp/bundle/ folder? The script, or command, would need to be execute in that folder. Adding a -d option is easier and more specific. imho
Ed

porteux
Samurai
Samurai
Posts: 175
Joined: 12 Mar 2023, 22:10
Distribution: PorteuX

Merge modules in Porteux

Post#7 by porteux » 30 Aug 2023, 19:55

Majestic wrote:
30 Aug 2023, 11:09
How to merge modules in porteux? Command "for a in /tmp/merge/*.xzm;do xzm2dir $a /tmp/bundle;done" not working...
Try this:

Code: Select all

for a in /tmp/merge/*.xzm;do xzm2dir $a -o=/tmp/bundle;done
Explanation: to specify the output you need to use -o=[PATH]. This has been discussed a couple of times in this forum. This was implemented this way to allow multiple files/folders to be converted/extracted in a single action.

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

Merge modules in Porteux

Post#8 by Ed_P » 30 Aug 2023, 20:03

porteux wrote:
30 Aug 2023, 19:55
Explanation: to specify the output you need to use -o=[PATH]. This has been discussed a couple of times in this forum. This was implemented this way to allow multiple files/folders to be converted/extracted in a single action.
Ah yes. :happy62: I remember encountering the -o= problem myself on something. While a good option, having it default if omitted would be convenient.
Ed

Majestic
White ninja
White ninja
Posts: 13
Joined: 19 Mar 2018, 13:21
Distribution: Majestic

Merge modules in Porteux

Post#9 by Majestic » 31 Aug 2023, 00:12

Blaze wrote:
30 Aug 2023, 15:21

Code: Select all

for i in `find -type f | fgrep .xzm | sort`; do unsquashfs -n -f $i >/dev/null; done
The divine comand, thanks Blaze! :celebrate14:

Majestic
White ninja
White ninja
Posts: 13
Joined: 19 Mar 2018, 13:21
Distribution: Majestic

Merge modules in Porteux

Post#10 by Majestic » 31 Aug 2023, 00:21

porteux wrote:
30 Aug 2023, 19:55
Majestic wrote:
30 Aug 2023, 11:09
How to merge modules in porteux? Command "for a in /tmp/merge/*.xzm;do xzm2dir $a /tmp/bundle;done" not working...
Try this:

Code: Select all

for a in /tmp/merge/*.xzm;do xzm2dir $a -o=/tmp/bundle;done
Explanation: to specify the output you need to use -o=[PATH]. This has been discussed a couple of times in this forum. This was implemented this way to allow multiple files/folders to be converted/extracted in a single action.
It works. Thanks! We are waiting for Porteux 0.6: merge-and-create-xzm.desktop

Post Reply