SliTaz SliTaz Forum

You are not logged in.

#1 2018-02-02 21:51:18

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

TazLiTo does not create a correct distro-packages list

Hi,

[*]When creating the distro-packages.list file, TazLiTo suppress all the characters that follow the first - found in the package's name. So

alsa-lib becomes alsa

alsa-utils > alsa too

and so on.

[*]The TazLiTo manual says

gen-distro

[...]

To function, this command needs a list of packages, a directory containing all the (.tazpkg) packages on the list, and a directory to generate the distribution.

[...]

But when I run the command:

Installing package: <package_name>                                      Checking...                                                                    [ Failed ]
Getting "bundle.tar.lzma"...                                          Getting "no-quiet"...                                                          [ Failed ]
Unable to find package "<package_name>" in the mirrored packages list.
Unable to find package "get-<package_name>" in the mirrored packages list.
It's not possible to use TazLiTo without a connexion to the mirror?

[*]When I answer [c]y[/c] to the question

[c]Repack packages from rootfs? (y=yes, n=no) [n] y[/c]

after

[c]Preparing the rootfs directory...
Strip versions from list test-packages.list...                       [ Done ][/c]
many many lines of

[c]grep: /tmp/tmp.1Q8U53/full.pkglist: No such file or directory[/c]

before to come back to step 2.

Same problems in Rolling. Do I misunderstand something?

Seems working in SliTaz4.0 ...

Offline

#2 2018-02-03 00:08:33

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazLiTo does not create a correct distro-packages list

Hi Ceel,

Very good. I broke the tazlito. It is a long and sad story :-)

The main problem it is over engineered so it's hard to develop it not making new regressions in new unpredictable places. And know what - I just realized I want to rollback all of my changes and to return tazlito to its initial state and to make simply stupid tool (yes, following KISS principle) instead with only one function...

But looking here ( http://hg.slitaz.org/tazlito/shortlog ) I see it will be impossible to revert tazlito to its initial state - too many changes and too many work of other developers and translators. So only one way - to fix it.

First I want to say I use tazlito in my chroot. And (if close the eyes on its errors and warnings) it produces the normal bootable ISOs you may find on the mirror1 in the section iso/next. Some new packages may present in the /home/slitaz/packages/ folder while the main volume of packages is taken from the mirror or cache. In other words it preferred local packages over the mirrored packages.

Why the problem No.1 exists? Here ( http://hg.slitaz.org/flavors/ ) you can find nice simple packages lists without versions. But these versions are added on the server side once a day ( http://cook.slitaz.org/?file=pkgdb.log ). But these versions are useless because they are points to the only one existing package at a time. If we have package "abc-1.2.3" on the server then it will point to it. And no way to keep "abc-4.5.6" in addition. More, we need to update these versioned lists but why?..

So I decided to get rid the versions keeping that nice simple lists. And to be compatible with the old (versioned) packages lists I make the stripping. It cuts off the last "-*" part (it is "-1.2.3" in our example for "abc-1.2.3") and examined if this package exists or not? If exists, well, version is stripped. If not exists then it cuts off next "-*" part from the end because symbol "-" may be presented both in the package name and in the version string. And version string may contain not only digits and dots...

If it believe the package "alsa-utils" not exists (in your case) we need to understand why? Maybe this package not listed in the /var/lib/tazpkg/packages.info?

While I looking to the commits I found another way to solve it ( http://hg.slitaz.org/tazlito/rev/8a23ad1f4426 ) - to add option "--stripped" to your tazlito invocation. Just like:

tazlito all of your previous options here --stripped

Problem No.2 is due to problem No.1. When tazlito finds the badly stripped package name and it cannot found local package for it - it will ask the mirror. And of course that bad named package absent there too. I believe tazlito may work without mirror, but you need to satisfy the complete packages list (plus dependencies and its dependencies!) with the local (or cached) package files. And probably you need the option "--stripped" here too.

Problem No.3 I can't resolve just in my head and I need some more investigations.

Offline

#3 2018-02-03 15:46:33

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: TazLiTo does not create a correct distro-packages list

Hi Ceel,

Looks like I found something.

Only one line with "grep" and "full.pkglist" is line #2572.

This file is created previously in line #2566.

Then module "calc_sizes" called with this file as argument #3.

Here we can find that this file (argument #3 -> variable "outfile" on line #19) is removed on the line #34).

So well, it is your situation when this file is absent.

This file is populated later in line #131 but only if it present.

Please try to change the line #34 from file [c]/usr/libexec/tazlito/calc_sizes[/c] in your system in the next manner:

was:

[c]system("rm " errfile " " warnfile " " outfile " 2>/dev/null");[/c]

become:

[c]system("rm " errfile " " warnfile " 2>/dev/null");[/c]

And please try again.

Offline

#4 2018-02-03 21:25:33

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: TazLiTo does not create a correct distro-packages list

Well done Aleksej!!

The modification @ line #34 in /usr/libexec/tazlito/calc_sizes solves the two first problems.

Concerning the third problem, still error messages when I ask for repacking packages from rootfs (but very selfishly, it doesn't matter, I think I will not use this option):

Repack packages from rootfs? (y=yes, n=no) [n] y
reparing the rootfs directory...
Strip versions from list packages.list...                            [ Done ]
Repacking acl-2.2.52...
/usr/libexec/tazpkg/repack: .: line 8: can't open '/home/slitaz/next/distro/rootfs/var/lib/tazpkg/installed/acl/receipt'
                                                                     [ Done ]
and this for all packages of the list with a variant for a few one:

Repacking ntfs-3g-2017.3.23...
/usr/libexec/tazpkg/repack: .: line 8: can't open '/home/slitaz/next/distro/rootfs/var/lib/tazpkg/installed/ntfs-3g/receipt'
                                                                     [ Failed ]
then all goes right:

Setting up mirrors for /home/slitaz/next/distro/rootfs/...
Calculate md5sum...                                                  [ Done ]
acl-2.2.52.tazpkg                                                    [ Done ]
attr-2.4.47.tazpkg                                                   [ Done ]
.../...
zlib-1.2.11.tazpkg                                                   [ Done ]
1. repacked ....................... /home/slitaz/next/packages
2. main ........................... http://mirror1.slitaz.org/packages/next/
but then

Installing package: glibc-base                                        awk: /home/slitaz/next/distro/rootfs/var/lib/tazpkg/undigest/repacked/packages.md5: No such file or directory
Checksum error for "glibc-base-2.25.tazpkg"
awk: /home/slitaz/next/distro/rootfs/var/lib/tazpkg/undigest/repacked/packages.md5: No such file or directory
Checksum error for "glibc-base-2.25.tazpkg"
                                                                     [ Done ]
for each packages or almost.

In the end, only 20 packages on the 66 have been installed...

Very good. I broke the tazlito. It is a long and sad story :-)

Only those who do nothing, like me ;-) , are not likely to break something.

Thanks.

Offline

#5 2018-04-10 20:34:41

Ceel
Administrator
Registered: 2011-04-02
Posts: 1,424

Re: TazLiTo does not create a correct distro-packages list

Hi,

TazLiTo again.

I wanted to see what is exactly the difference between [c]tazlito gen-iso[/c] and [c]tazlito gen-initiso[/c].

[c]tazlito gen-iso[/c] works fine but it happens absolutely nothing with [c]tazlito gen-initiso[/c], the terminal comes back immediately to the prompt;

[c]root@slitaz:/home/ceel# tazlito gen-initiso
root@slitaz:/home/ceel#[/c]
EDIT: 24 hours later

ran [c]tazlito gen-initiso[/c] again (using the up arrow) with no changes in rootcd / rootfs and it worked ??...

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]