SliTaz SliTaz Forum

You are not logged in.

#1 2013-01-05 22:51:57

ernia
Member
Registered: 2011-05-20
Posts: 299

rolling get-LibreOffice broken - ugly (?) fix

Running get-LibreOffice lead /usr/bin/libreoffice3.6 to be a broken link to /opt/libreoffice3.6/program/soffice, so the program looks installed but does not start .

[c]root@slitaz:/home/tux6 ls -la /usr/bin/libreoffice3.6
lrwxrwxrwx    1 root     root            35 Jan  5 22:49 /usr/bin/libreoffice3.6 -> /opt/libreoffice3.6/program/soffice[/c]
The trouble is in the bin variable definition at line 167: [c]bin=$(ls $PACKAGE-$VERSION/fs/usr/bin/libreoffice???)[/c]

I don't know the reason why but the ls command does not seems to catch libreoffice3.6 when running inside the script while it works well from sakura.

[c]Extracting files (this may take a while): (found v3.6.4.3)           [ OK ]
............................................................         [ OK ]
Preparing package... ls: LibreOffice-3.6.4/fs/usr/bin/libreoffice3.6: No such file or directory

Command line: readlink

BusyBox v1.20.2 (2012-12-21 21:52:58 CET) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

    -f    Canonicalize by following all symlinks
    -n    Don't add newline
    -v    Verbose

Command line: ln -s

BusyBox v1.20.2 (2012-12-21 21:52:58 CET) multi-call binary.

Usage: ln [OPTIONS] TARGET... LINK|DIR

Create a link LINK or DIR/TARGET to the specified TARGET(s)

    -s    Make symlinks instead of hardlinks
    -f    Remove existing destinations
    -n    Don't dereference symlinks - treat like normal file
    -b    Make a backup of the target (if exists) before link operation
    -S suf    Use suffix instead of ~ when making backup files

                                                                     [ OK ][/c]
I brutally fixed it changing the row with

[c]bin=$(ls $PACKAGE-$VERSION/fs/usr/bin/*printeradmin | sed 's/-printeradmin//')[/c]
also seems that [c]tazpkg remove LibreOffice[/c] leave /usr/lib/libreoffice/libreoffice3.6

[c]Installation of: LibreOffice
=====================================================================================================================================================================================================================
Copying LibreOffice...                                                                                                                                                                                    [ Done ]
Extracting LibreOffice...                                                                                                                                                                                 [ Done ]
Extracting the pseudo fs...                                                                                                                                                                               [ Done ]
Installing LibreOffice...                                                                                                                                                                                 [ Done ]
Removing all tmp files...                                                                                                                                                                                 [ Done ]
ln: /usr/lib/libreoffice/libreoffice3.6: File exists
=====================================================================================================================================================================================================================
LibreOffice (3.6.4) is installed.[/c]

Offline

#2 2013-01-05 23:02:40

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: rolling get-LibreOffice broken - ugly (?) fix

rechecking i did use [c]bin=$(ls LibreOffice-3.6.4/fs/usr/bin/*printeradmin | sed 's/-printeradmin//')[/c] , so the problem could be in $VERSION ...

i have no time now, will recheck next days

PS it does not seem to be a $VERSION problem, seems to be 3.6.4 as it should be.

Offline

#3 2013-01-07 21:39:50

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: rolling get-LibreOffice broken - ugly (?) fix

get-LibreOffice script is identical in 4.0 and rolling, works properly in 4.0 and does not work properly in rolling.

the problem seems to be related to busybox.

in my brand new rolling install i downgraded busybox from 1.20.2 to 1.18.4 installing the 4.0 package, then tazpkg get-install get-Libre-Office and #get-LibreOffice: all worked well and i ended up with a working package.

upgrading again to 1.20.2 makes the script raise the same error and makes it produce an unusable package.

i think that someone more skilled than me should try to debug this.

Offline

#4 2013-01-08 10:30:55

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: rolling get-LibreOffice broken - ugly (?) fix

@Bellard

i've tried your fix http://hg.slitaz.org/wok/rev/24d193656599 and it does not seem to work.

reading more carefully the output of the error was

[c]ls: LibreOffice-3.6.4/fs/usr/bin/libreoffice3.6: No such file or directory[/c]

it seems that 3.6 got catched but the file does not exist, so i made these tests:

[c]root@slitaz:/tmp/LibreOffice.5524/LibO_3.6.4.3_Linux_x86_install-rpm_en-US/RPMS# ls -l LibreOffice-3.6.4/fs/usr/b
in/libreoffice3.6
lrwxrwxrwx    1 root     root            35 Jan  8 10:02 LibreOffice-3.6.4/fs/usr/bin/libreoffice3.6 -> /opt/librroot@slitaz:/tmp/LibreOffice.5524/LibO_3.6.4.3_Linux_x86_install-rpm_en-US/RPMS# ls  LibreOffice-3.6.4/fs/usr/bin
/libreoffice3.6
root@slitaz:/tmp/LibreOffice.5524/LibO_3.6.4.3_Linux_x86_install-rpm_en-US/RPMS# ls -lH LibreOffice-3.6.4/fs/usr/
bin/libreoffice3.6
ls: LibreOffice-3.6.4/fs/usr/bin/libreoffice3.6: No such file or directory
root@slitaz:/tmp/LibreOffice.5524/LibO_3.6.4.3_Linux_x86_install-rpm_en-US/RPMS#[/c]
it seems like busybox's ls without options follows links, like with -H option.

being libreoffice3.6 a broken link it outputs [c]ls: LibreOffice-3.6.4/fs/usr/bin/libreoffice3.6: No such file or directory[/c]

i think it's a busybox bug and it could influence the whole distro

PS the output of commands is a little bit messed up because of the long path, try ls -l , ls -lH and ls

Offline

#5 2013-01-08 11:01:12

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: rolling get-LibreOffice broken - ugly (?) fix

tested with shorter path:

[c]tux@slitaz:~$ touch target
tux@slitaz:~$ ln -s target symlink
tux@slitaz:~$ ls -l symlink
lrwxrwxrwx    1 tux      tux              6 Jan  8 10:56 symlink -> target
tux@slitaz:~$ ls -lH symlink
-rw-r--r--    1 tux      tux              0 Jan  8 10:55 symlink
tux@slitaz:~$ ls -l symlink
lrwxrwxrwx    1 tux      tux              6 Jan  8 10:56 symlink -> target
tux@slitaz:~$ rm target
tux@slitaz:~$ ls -l symlink
lrwxrwxrwx    1 tux      tux              6 Jan  8 10:56 symlink -> target
tux@slitaz:~$ ls -lH symlink
ls: symlink: No such file or directory
tux@slitaz:~$ ls symlink
ls: symlink: No such file or directory
tux@slitaz:~$[/c]
it works this way only when link is broken.

PS it works always this way, too much tests...

Offline

#6 2013-01-08 11:47:34

bellard
Administrator
Registered: 2011-03-28
Posts: 657

Re: rolling get-LibreOffice broken - ugly (?) fix

Try http://hg.slitaz.org/wok/raw-file/bab69144211b/get-LibreOffice/stuff/get-LibreOffice please.

Offline

#7 2013-01-08 13:28:40

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: rolling get-LibreOffice broken - ugly (?) fix

it's ok, thanks for your time.

should busybox checking target link be considered a bug or a feature?

standard ls doesn't seem to do that.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

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