Bug 1384586 - texlive-kpathsea scriptlet failure
Summary: texlive-kpathsea scriptlet failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1384777 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 15:22 UTC by Nathaniel McCallum
Modified: 2017-12-13 11:12 UTC (History)
16 users (show)

Fixed In Version: texlive-2016-17.20160520.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-28 00:40:58 UTC
Type: Bug


Attachments (Terms of Use)

Description Nathaniel McCallum 2016-10-13 15:22:34 UTC
/var/tmp/rpm-tmp.wZfb8m: line 2: shortfile: command not found
warning: %triggerin(texlive-kpathsea-5:svn41139-9.fc26.1.noarch) scriptlet failed, signal 15
Non-fatal <unknown> scriptlet failure in rpm package texlive-kpathsea

Note that dnf actually hung during the upgrade. I was only able to continue by killing the shell process. This generated thousands of the "shortfile: command not found" messages.

Comment 1 Jerry James 2016-10-13 22:01:37 UTC
This is responsible for a hung mock build for me.  The issue is this line:

	shortfile = `basename $file`

You can have spaces around = in a Makefile, but not in a shell script.  Make that:

	shortfile=`basename $file`

and all will be well.

Comment 2 Igor Gnatenko 2016-10-14 13:57:33 UTC
*** Bug 1384777 has been marked as a duplicate of this bug. ***

Comment 3 Tom "spot" Callaway 2016-10-14 14:04:39 UTC
That fix is in -10. It is not sufficient. I'm working on a proper fix in -11, but I want to test it locally first before everyone screams at me again. :D

Comment 4 Randy Barlow 2016-10-14 21:43:53 UTC
I wanted to say that I also hit this bug, but in my case I just let it run overnight. When I came back, it had finished. So it will finish eventually (or at least it did in my case) ☺

Comment 5 Tom "spot" Callaway 2016-10-17 16:59:39 UTC
The trigger is now fixed in -11, it may still take a few minutes to complete if you have a lot of texlive font maps installed, but it is no longer the massive infinite loop it was before.

Comment 6 Jerry James 2016-10-17 17:58:36 UTC
That's great!  Thanks for all of the work you put into this, spot.

Comment 7 Andre Robatino 2016-10-17 18:08:06 UTC
I just finished updating Rawhide. It did indeed finish after a few minutes, without hanging, but after the last package cleanup message, I saw

basename: missing operand
Try 'basename --help' for more information.

Is this coming from texlive-kpathsea?

Comment 8 Tom "spot" Callaway 2016-10-17 18:59:38 UTC
Damnit, it is. There's a typo in the %transfiletriggerpostun. Good catch, here comes -12.

Comment 9 Mattias Ellert 2016-10-18 05:53:33 UTC
When building a package in koji that installs texlive I get these warnings:

DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).
DEBUG util.py:421:  updmap [WARNING]: resetting $HOME value (was /builddir) to root's actual home (/root).

The line is repeated abot 500 times.

This is with texlive-kpathsea.noarch 5:svn41139-11.fc26.1

Comment 10 Tom "spot" Callaway 2016-10-18 14:13:34 UTC
-13 is building now, it will redirect stderr from the updmap calls in the triggers to /dev/null. Should silence that again.

Comment 11 Andre Robatino 2016-10-18 16:02:22 UTC
(In reply to Tom "spot" Callaway from comment #8)
> Damnit, it is. There's a typo in the %transfiletriggerpostun. Good catch,
> here comes -12.

Just updated to -12, same as before, including the exact same basename error (it may have appeared after a longer delay than before, though). I suspect that error is being emitted by the old version, though (due to "postun", I can't tell from the output of "rpm -q --scripts texlive-kpathsea").

Comment 12 Andre Robatino 2016-10-19 17:00:46 UTC
When updating to -13, I still see the same basename error, so it must not have been fixed in -12.

Comment 13 Michal Jaegermann 2016-10-20 00:02:41 UTC
In this scripts $list, which is feeding 'baseline' one-by-one, is produced by the following:

   list=`grep "\.map" | sort -n | uniq`

I am not really sure what is feeding grep here but could be that this produces somewhere a line with only EOL on it?  That would end up with "basename: missing operand.  Adding immediately after 'while ...; do' a line like:

   [ -z "$line" ] && continue

should kill this error (although maybe this is only masking the issue).

Yes, I am seeing that too. :-)

Comment 14 Andre Robatino 2016-10-20 17:22:49 UTC
Same error when updating to -14. However, if I then reinstall texlive-kpathsea by itself, I didn't see the error. Does this mean it was fixed in -13, or does the error come from some other texlive package?

Comment 15 Michal Jaegermann 2016-10-20 18:07:55 UTC
(In reply to Andre Robatino from comment #14)
> Same error when updating to -14. However, if I then reinstall
> texlive-kpathsea by itself, I didn't see the error. Does this mean it was
> fixed in -13, or does the error come from some other texlive package?

It may also mean that the "$list", which provides arguments to 'baseline', is not the same during a full update transaction and when you are reinstalling texlive-kpathsea.

I checked all packages in an update transaction when I have seen that error and the only occurences of 'baseline' were in "--filetriggers" scriplets from texlive-kpathsea and that seems to identify the culprit.

I guess that the other way to shut up this error would be to use

   baseline "$line"

instead of 

   baseline $line

without quotes.

Comment 16 Andre Robatino 2016-10-25 18:52:57 UTC
Updating from -15 to -16, I didn't see the error (but I'm not absolutely sure since I updated in a VT and couldn't scroll all the way back). Is it fixed?

Comment 17 Tom "spot" Callaway 2016-10-25 19:56:37 UTC
I sure hope so. I'm doing null checking and quoting the arg passed to basename.

Comment 18 Michal Jaegermann 2016-10-25 20:22:24 UTC
(In reply to Tom "spot" Callaway from comment #17)
> I sure hope so. I'm doing null checking and quoting the arg passed to
> basename.

Belt and suspenders, eh? Quoting should be good enough although checks are fine.  Try this

echo "

extra whitespace

simple" | while read line ; do
    basename "$line"
done

If you omit quotes from "$line" then basename will start complaining many times and now there are no troubles.

Comment 19 Fedora Update System 2016-10-26 20:33:54 UTC
perl-BibTeX-Parser-0.69-1.fc25, perl-LaTeX-ToUnicode-0.04-1.fc25, texlive-2016-17.20160520.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-50a2bc7997

Comment 20 Fedora Update System 2016-10-28 00:40:58 UTC
perl-BibTeX-Parser-0.69-1.fc25, perl-LaTeX-ToUnicode-0.04-1.fc25, texlive-2016-17.20160520.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Lipeng Wang 2016-11-23 13:44:53 UTC
➜  ~ sudo dnf --refresh reinstall texlive-base
RPM Fusion for Fedora 25 - Free - Test Updates                                                  53 kB/s | 1.2 kB     00:00    
negativo17 - Steam                                                                             106 kB/s | 7.7 kB     00:00    
google-chrome                                                                                   62 kB/s | 3.7 kB     00:00    
Fedora 25 - x86_64 - VirtualBox                                                                193 kB/s | 6.4 kB     00:00    
MongoDB Repository                                                                              15 kB/s |  12 kB     00:00    

Dependencies resolved.
===============================================================================================================================
 Package                       Arch                    Version                                   Repository               Size
===============================================================================================================================
Reinstalling:
 texlive-base                  noarch                  5:2016-17.20160520.fc25                   fedora                  1.4 M

Transaction Summary
===============================================================================================================================

Total size: 1.4 M
Is this ok [y/N]: y
Downloading Packages:
[SKIPPED] texlive-base-2016-17.20160520.fc25.noarch.rpm: Already downloaded                                                   
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Reinstalling: texlive-base-5:2016-17.20160520.fc25.noarch                                                                1/2 
  Erasing     : texlive-base-5:2016-17.20160520.fc25.noarch                                                                2/2 
warning: %triggerin(texlive-kpathsea-5:svn41139-17.fc25.1.noarch) scriptlet failed, exit status 2
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 427, in callback
    self._scriptError(bytes, total, h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 557, in _scriptError
    pkg, _, _ = self._extract_cbkey(h)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 229, in _extract_cbkey
    return self._extract_str_cbkey(cbkey)
  File "/usr/lib/python3.5/site-packages/dnf/yum/rpmtrans.py", line 237, in _extract_str_cbkey
    assert(isinstance(name, basestring))
AssertionError
FATAL ERROR: python callback ??? failed, aborting!
➜  ~

Comment 22 Panu Matilainen 2017-12-13 11:12:27 UTC
Just FWIW, this probably was/is a bug in rpm file triggers, which in some cases feed the file lists into the scripts multiple times, and the bigger the package the worse it gets. Looking at the implemented workaround of using sort|uniq in texlive suggests that was the case here too, sorry for missing it back then. 

Fixed upstream by https://github.com/rpm-software-management/rpm/commit/e6effe3c91b66e822db571d3129e49164ddc45ba but don't go ripping out the workaround just yet, both rpm 4.13.x and 4.14.x need updates first.


Note You need to log in before you can comment on or make changes to this bug.