Bug 327523

Summary: fetchmsttfonts.sh is marked as installed although it failed
Product: [openSUSE] openSUSE 10.3 Reporter: Forgotten User --EoyBps8f <forgotten_--EoyBps8f>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Duncan Mac-Vicar <dmacvicar>
Severity: Normal    
Priority: P5 - None CC: alberto.passalacqua, angelo.compagnucci, dkmoore, dolarsrg, forgotten_zhFaldehF_, jarl, jiri, joe, jsuchome, oscarpoio, sbrabec, sndirsch
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 329356    
Attachments: Proposed fetchmsttfonts.sh patch

Description Forgotten User --EoyBps8f 2007-09-22 22:38:07 UTC
Remove cabextract from your system and install the fetchmsttfonts.sh script via YOU. It will fail without any feedback to the user and on top of that be marked as already installed.

Expected behaviour: Notice that the script did not fullfill its purpose, give some feedback to the user and do not mark it as already installed.
Comment 1 Andreas Jaeger 2007-09-25 15:23:42 UTC
Please attach the YaST log files for this.
Comment 2 Forgotten User --EoyBps8f 2007-09-25 16:00:56 UTC
It is easy to reproduce, just use the RC1 KDE CD and install the default system, run online update afterwards. That's it.

I'll only provide logs after the next RC since I do not see the point in re-installing the whole system just to reproduce this.
Comment 3 Oscar Abilleira Muñiz 2007-10-01 11:03:08 UTC
Yes I found the same problem, after install and in online update I marked to be installed the MS true type fonts. It seems that the installation seems to start, but in 50% of the process the window just close, no "error information" advice neither "installation complete" report.
So that I suppose that the script didn't install anything but is marked as installed so that you can't reinstall it again.

Comment 4 Alberto Passalacqua 2007-10-04 22:42:56 UTC
I'm not sure if it's the reason, but the script has no executable permission.
If you download it manually and run it, it works ok.

Regards,
Alberto
Comment 5 Oscar Abilleira Muñiz 2007-10-05 15:32:43 UTC
Yes, as Alberto says if you run it maunually it works without problems
Comment 6 Jiri Stavinoha 2007-10-07 10:32:24 UTC
I only confirm it really not work (running manually works).

openSUSE 10.3 Final, x86_64
Comment 7 Forgotten User zhFaldehF_ 2007-10-07 23:10:17 UTC
I can also confirm not working in Final x86 .. 

I ran Online Update, check the box.. Accept.. Tries to do it's thing and zipppp.. 'tis gone. Also confirm manual running of script works correctly. 

Only thing that seems to be in the log is: 

cat y2log | grep fetchmsttfonts
2007-10-07 15:49:05 <1> LSSUSE01007250(5479) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:49:05 <1> LSSUSE01007250(5479) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:49:06 <1> LSSUSE01007250(5479) [qt-pkg] YQPkgPatchList.cc(fillList):187 Patch satisfied, but not installed yet: fetchmsttfonts.sh - Download Microsoft(r) TrueType Core Fonts
2007-10-07 15:49:06 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:49:16 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:49:22 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:49:27 <1> LSSUSE01007250(5479) [qt-pkg] YQPkgObjList.cc(showLicenseAgreement):1272 User confirmed license agreement for fetchmsttfonts.sh
2007-10-07 15:49:27 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:49:35 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:49:42 <1> LSSUSE01007250(5479) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:50:10 <1> LSSUSE01007250(5479) [qt-pkg] YQPackageSelectorBase.cc(showPendingLicenseAgreements):336 Resolvable fetchmsttfonts.sh has a license agreement
2007-10-07 15:50:10 <1> LSSUSE01007250(5479) [qt-pkg] YQPackageSelectorBase.cc(showPendingLicenseAgreements):345 Resolvable fetchmsttfonts.sh's  license is already confirmed
2007-10-07 15:50:10 <1> LSSUSE01007250(5479) [zypp] TargetImpl.cc(ExecuteScriptHelper):70 Execute script [S4:0][script]fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1.noarch
2007-10-07 15:53:12 <1> LSSUSE01007250(6244) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:53:12 <1> LSSUSE01007250(6244) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:53:12 <1> LSSUSE01007250(6244) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:53:12 <1> LSSUSE01007250(6244) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:53:12 <1> LSSUSE01007250(6244) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:53:22 <1> LSSUSE01007250(6244) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:55:10 <1> LSSUSE01007250(6442) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:55:10 <1> LSSUSE01007250(6442) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:55:10 <1> LSSUSE01007250(6442) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:55:10 <1> LSSUSE01007250(6442) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:55:10 <1> LSSUSE01007250(6442) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:55:27 <1> LSSUSE01007250(6442) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:55:57 <1> LSSUSE01007250(6442) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:56:00 <1> LSSUSE01007250(6442) [qt-pkg] YQPkgObjList.cc(showLicenseAgreement):1272 User confirmed license agreement for fetchmsttfonts.sh
2007-10-07 15:56:00 <1> LSSUSE01007250(6442) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:56:04 <1> LSSUSE01007250(6442) [qt-pkg] YQPackageSelectorBase.cc(showPendingLicenseAgreements):336 Resolvable fetchmsttfonts.sh has a license agreement
2007-10-07 15:56:04 <1> LSSUSE01007250(6442) [qt-pkg] YQPackageSelectorBase.cc(showPendingLicenseAgreements):345 Resolvable fetchmsttfonts.sh's  license is already confirmed
2007-10-07 15:56:04 <1> LSSUSE01007250(6442) [zypp] TargetImpl.cc(ExecuteScriptHelper):70 Execute script [S0:0][script]fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1.noarch
2007-10-07 15:57:46 <1> LSSUSE01007250(7245) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:57:46 <1> LSSUSE01007250(7245) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:57:46 <1> LSSUSE01007250(7245) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:57:46 <1> LSSUSE01007250(7245) [wfm] Resolvable.cc(ResolvableSetPatches):651 Patch fetchmsttfonts.sh-4347 is not applicable
2007-10-07 15:57:46 <1> LSSUSE01007250(7245) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch
2007-10-07 15:59:04 <1> LSSUSE01007250(7245) [zypp] PatchContentsImpl.cc(Impl):58 Found resolvable for patch atom: fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2-4347-1 arch: noarch





Comment 8 Jiří Suchomel 2007-10-12 09:14:41 UTC
I assume that if the script is installed (and can be called manually later), UI shows the correct state. Maybe we should consider do not consider marking patch script as installed when its run fails?
Comment 9 Duncan Mac-Vicar 2007-10-12 12:23:32 UTC
*** Bug 331783 has been marked as a duplicate of this bug. ***
Comment 10 Duncan Mac-Vicar 2007-10-12 12:30:30 UTC
The problem is, semantics. You have a patch with N intructions.

It runs and at instruction K it aborts. Then it is marked as not installed.

You install it again. What happens with the K instructions already executed.

Perhaps it just should be a requirement that script are idempotent. And just
not install them if they give an error.
Comment 11 Stefan Dirsch 2007-10-12 13:21:05 UTC
BTW, there seems to be another bug, that this patch is not marked as installed if the script succeeds.
Comment 12 David Moore 2007-10-21 21:13:39 UTC
(In reply to comment #1 from Andreas Jaeger)
> Please attach the YaST log files for this.
> 

As Ben Kevan listed his log, I had the same problem with no report of an error.  Just none of the fonts.  I tried to uninstall the script in Online Update, but this does not appear possible (at least when I opened Online Update after supposedly deleted, the script was listed as installed.  So I downloaded the script from the update repository and ran it in shell as su.  I don't know it this sheds any light on it since it is a different route than installing it via Online Update, but it would be my prime suspect. The failures seem to be a problem with extracting the .exe files, at least in my case.  Note that while every single font file failed to extract and was deleted, the end of the script reports that the fonts were installed. Here is the output of running the script:


note: No proxy is used. Please set the environment variable "http_proxy"
note: to your favorite proxy, if you want to use a proxy for the download.
note:
note:   bash: export http_proxy="http://proxy.example.com:3128/"
note:   tcsh: setenv http_proxy "http://proxy.example.com:3128/"
EULA:
  Fetching   ... done

Trying to find the fastest server:
 switch ... 1 sec
 mesh ... 2 sec
 jaist ... 1 sec
 kent ... 1 sec
 nchc ... 2 sec
 heanet ... 1 sec
 easynews ... 1 sec
 optusnet ... 0 sec
The winner is: >> optusnet <<

andale32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/andale32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
andale32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/andale32.exe):
  Fetching   ... done
  Extracting ... done
arial32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/arial32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
arial32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/arial32.exe):
  Fetching   ... done
  Extracting ... done
arialb32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/arialb32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
arialb32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/arialb32.exe):
  Fetching   ... done
  Extracting ... done
comic32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/comic32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
comic32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/comic32.exe):
  Fetching   ... done
  Extracting ... done
courie32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/courie32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
courie32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/courie32.exe):
  Fetching   ... done
  Extracting ... done
georgi32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/georgi32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
georgi32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/georgi32.exe):
  Fetching   ... done
  Extracting ... done
impact32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/impact32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
impact32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/impact32.exe):
  Fetching   ... done
  Extracting ... done
times32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/times32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
times32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/times32.exe):
  Fetching   ... done
  Extracting ... done
trebuc32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/trebuc32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
trebuc32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/trebuc32.exe):
  Fetching   ... done
  Extracting ... done
verdan32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/verdan32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
verdan32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/verdan32.exe):
  Fetching   ... done
  Extracting ... done
webdin32.exe (http://optusnet.dl.sourceforge.net/sourceforge/corefonts/webdin32.exe):
  Fetching   ... done
  Extracting ... failed ... deleted!
webdin32.exe (http://switch.dl.sourceforge.net/sourceforge/corefonts/webdin32.exe):
  Fetching   ... done
  Extracting ... done
Creating fonts.{scale,dir} files ...........
/etc/fonts/suse-font-dirs.conf unchanged
/etc/fonts/suse-hinting.conf unchanged
/etc/fonts/suse-bitmaps.conf unchanged
Creating cache files for fontconfig ......................................
generating java font setup
Warning: cannot find a sans serif Japanese font. Japanese in Java might not work.
Warning: cannot find a serif Japanese font. Japanese in Java might not work.
Warning: cannot find a sans serif simplified Chinese font. Simplified Chinese in Java might not work.
Warning: cannot find a serif simplified Chinese font. Simplified Chinese in Java might not work.
Warning: cannot find a sans serif traditional Chinese font. Traditional Chinese in Java might not work.
Warning: cannot find a serif traditional Chinese font. Traditional Chinese in Java might not work.
Warning: cannot find a sans serif Korean font. Korean in Java might not work.
Warning: cannot find a serif Korean font. Korean in Java might not work.
writing /usr/lib/jvm/java-1.5.0-sun-1.5.0_update13/jre/lib/fontconfig.SuSE.properties
Generating CJK setup for xpdf ...
*** Fonts installed. ***


End

I did not change NEEDINFO status as my info isn't directly answering the request, but it seems likely that with my and the other post the status should be changed.
Comment 13 Stefan Dirsch 2007-10-22 02:52:09 UTC
David, this is correct behaviour by the script. optusnet wins the race, but then only provides broken files. Therefore the next server in the list (switch) is used for downloading, which succeeds.

This bugreport is about wrong YaST2 behaviour when the script fails, because cabextract is not installed and therefore the cabinet files could not be extracted.
Comment 14 David Moore 2007-10-22 14:50:21 UTC
Thanks.  Sorry I missed that.  I guess then there is another bug, as I had cabextract installed, but using Online Update to install the script did not do so or report an error to the user.  It took running the script manually.  I'll try to go back through my logs and see if I can find the details and post it separately.
Comment 15 Stefan Dirsch 2007-10-22 14:56:30 UTC
> ... but using Online Update to install the script did not do so 
It did.

> or report an error to the user.
There was no error.
Comment 16 Stefan Dirsch 2007-10-22 14:57:37 UTC
David, what you're reporting is just invalid and not related to this bugreport at all. I tried to explain this in my comment #13.
Comment 17 Stefan Dirsch 2007-10-25 11:12:08 UTC
*** Bug 336544 has been marked as a duplicate of this bug. ***
Comment 18 Stefan Dirsch 2007-10-31 18:01:36 UTC
No idea why the status is still NEEDINFO.
Comment 21 Michael Andres 2007-11-05 15:49:11 UTC
Fixed for 11.0/SLES10-SP2.
Comment 22 Forgotten User zhFaldehF_ 2007-11-05 17:13:46 UTC
(In reply to comment #21 from Michael Andres)
> Fixed for 11.0/SLES10-SP2.
> 

No hopes in getting this fixed for 10.3 currently? Do you know how many people with 10.3 THINK they have the script installed but in reality, they don't?  

I think it should be in consideration to fix the current source also.. 

Just my .02 be sure to not spend it all in one place. 
Comment 23 Stephan Kulow 2007-11-07 09:34:21 UTC
reopen to fix for 10.3
Comment 24 Stephan Kulow 2007-11-07 09:36:02 UTC
Use update tracker 14578 - if you have other libzypp fixes to backport, consider doing so with care. I.e. no rush :)
Comment 25 Michael Andres 2007-12-18 21:50:21 UTC
fixed for 10.3 in libzypp-3.26.6
Comment 26 Michael Andres 2007-12-19 12:08:33 UTC
close
Comment 27 Anja Stock 2008-01-02 13:17:40 UTC
released
Comment 28 Angelo Compagnucci 2008-01-30 09:44:32 UTC
Created attachment 192274 [details]
Proposed fetchmsttfonts.sh patch
Comment 29 Angelo Compagnucci 2008-01-30 09:46:42 UTC
Hi to all!

I reopened the bug cause I found a programming error in fetchmsttfonts.sh .

At line 122-123 the script has:

cabextract -l $file &> /dev/null
  if [ $? -ne 0 ]; then

In this way $? is always 1 on a slow or busy cpu. The "if" should wait the cabextract end of execution to retrive the exit code.
So the "success" variable at line 129 is set to true only in case the last cab is successfully extracted (random condition).

So, this is the patch:

cabextract -l $file > /dev/null
  if [ $? -ne 0 ]; then

I've attacched the patch.
Comment 30 Stefan Dirsch 2008-01-30 09:56:50 UTC
Sure you know the meaning of "&>" in bash? Looks like you mixed it up with executing commands in the background in a subshell.

# man bash
   [...]
   Redirecting Standard Output and Standard Error
       Bash  allows both the standard output (file descriptor 1) and the stan‐
       dard error output (file descriptor 2) to  be  redirected  to  the  file
       whose name is the expansion of word with this construct.

       There  are  two  formats  for  redirecting standard output and standard
       error:

              &>word
       and
              >&word

       Of the two forms, the first is preferred.  This is semantically equiva‐
       lent to

              >word 2>&1
Comment 31 Angelo Compagnucci 2008-01-30 10:21:51 UTC
OK, you ar right!

Sorry for for your time.