Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1534725 - mktexlsr should be called with directory argument
Summary: mktexlsr should be called with directory argument
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex-elsevier
Version: 27
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michael J Gruber
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-15 19:54 UTC by Edgar Hoch
Modified: 2018-01-30 18:02 UTC (History)
2 users (show)

Fixed In Version: tetex-elsevier-0.1.20090917-17.fc26 tetex-elsevier-0.1.20090917-17.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-30 17:30:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Edgar Hoch 2018-01-15 19:54:19 UTC
Description of problem:
On my Fedora 27 system with many LaTeX / TeXlive / TeX packages installed, I found only two packages that generate (and update!) the files ls-R .

tetex-elsevier is the only package that calls mktexlsr in scripts:

# rpm -q --scripts tetex-elsevier
postinstall scriptlet (using /bin/sh):
mktexlsr >/dev/null 2>&1 || :
postuninstall scriptlet (using /bin/sh):
mktexlsr >/dev/null 2>&1 || :

The problem is:

mktexlsr is called without arguments, that means, it uses default directories (see manpage). That is, it creates (or recreates) the following files:

/usr/share/texlive/texmf-dist/ls-R
/usr/share/texlive/texmf-config/ls-R
/usr/share/texlive/texmf-local/ls-R

BUT the files of this package are stored in directory /usr/share/texlive/texmf-local, not any of the directories where ls-R files are (re)created!

It should recreate /usr/share/texlive/texmf-local/ls-R for listing the package files, but it does not! mktexlsr shouldl always called with a directory argument in package scripts, so it updates (only) the file(s) where the package files are stored.


So, the spec file should be changed to contain lines like this:

%post
mktexlsr %{texmflocal} >/dev/null 2>&1 || :

%postun
mktexlsr %{texmflocal} >/dev/null 2>&1 || :


Version-Release number of selected component (if applicable):
tetex-elsevier-0.1.20090917-16.fc27.noarch

How reproducible:
Always.

Comment 1 Michael J Gruber 2018-01-16 08:53:39 UTC
(In reply to Edgar Hoch from comment #0)
> Description of problem:
> On my Fedora 27 system with many LaTeX / TeXlive / TeX packages installed, I
> found only two packages that generate (and update!) the files ls-R .

This is not sursprising - most of them are generated by one "mega-package" (or rather a script generating the packages from the TeXlive info) in one go, and this pre-generates also the ls-R db at

/usr/share/texlive/texmf-dist/ls-R

that texlive-base comes with and that lists everything from that distribution that you may potentially install or not. No need for those packages to mktexlsr. It has been done for them already.
 
> tetex-elsevier is the only package that calls mktexlsr in scripts:

You mentioned two packages touching ls-R. Which is the other one, and how does it do it?

In fact, R-core calls mktexlsr from scripts, e.g.

> mktexlsr is called without arguments, that means, it uses default
> directories (see manpage). That is, it creates (or recreates) the following
> files:
> 
> /usr/share/texlive/texmf-dist/ls-R
> /usr/share/texlive/texmf-config/ls-R
> /usr/share/texlive/texmf-local/ls-R
> 
> BUT the files of this package are stored in directory
> /usr/share/texlive/texmf-local, not any of the directories where ls-R files
> are (re)created!
> 
> It should recreate /usr/share/texlive/texmf-local/ls-R for listing the
> package files, but it does not! 

But that very directory is among the ones that you list above!

> mktexlsr shouldl always called with a
> directory argument in package scripts, so it updates (only) the file(s)
> where the package files are stored.
> 
> 
> So, the spec file should be changed to contain lines like this:
> 
> %post
> mktexlsr %{texmflocal} >/dev/null 2>&1 || :
> 
> %postun
> mktexlsr %{texmflocal} >/dev/null 2>&1 || :

That indeed is a valid point. The spec uses %{texmflocal} already to get the destination directoty right, and it should touch the ls-R for that dir only.

Comment 2 Fedora Update System 2018-01-16 09:27:24 UTC
tetex-elsevier-0.1.20090917-17.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-2362f40888

Comment 3 Fedora Update System 2018-01-16 09:57:57 UTC
tetex-elsevier-0.1.20090917-17.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0ed40551fd

Comment 4 Edgar Hoch 2018-01-16 10:59:09 UTC
(In reply to Michael J Gruber from comment #1)
> (In reply to Edgar Hoch from comment #0)
> > Description of problem:
> > On my Fedora 27 system with many LaTeX / TeXlive / TeX packages installed, I
> > found only two packages that generate (and update!) the files ls-R .
> 
> This is not sursprising - most of them are generated by one "mega-package"
> (or rather a script generating the packages from the TeXlive info) in one
> go, and this pre-generates also the ls-R db at
> 
> /usr/share/texlive/texmf-dist/ls-R
> 
> that texlive-base comes with and that lists everything from that
> distribution that you may potentially install or not. No need for those
> packages to mktexlsr. It has been done for them already.

Thanks for the explanation. I thought that this may be the case, but I was not sure (texlive.spec is very large, I hadn't found the code which generates ls-R).

> > tetex-elsevier is the only package that calls mktexlsr in scripts:
> 
> You mentioned two packages touching ls-R. Which is the other one, and how
> does it do it?
> 
> In fact, R-core calls mktexlsr from scripts, e.g.

Yes, R-core is the other package.

> > It should recreate /usr/share/texlive/texmf-local/ls-R for listing the
> > package files, but it does not! 
> 
> But that very directory is among the ones that you list above!

Sorry, that was a copy-paste mistake. tetex-elsevier files are currently stored in /usr/share/texlive/texmf-local, so this is the right file:

/usr/share/texlive/texmf-local/ls-R


Thanks for fixing the packages so quick!

Comment 5 Fedora Update System 2018-01-17 06:48:07 UTC
tetex-elsevier-0.1.20090917-17.fc27 has been pushed to the Fedora 27 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-2018-2362f40888

Comment 6 Fedora Update System 2018-01-17 06:57:08 UTC
tetex-elsevier-0.1.20090917-17.fc26 has been pushed to the Fedora 26 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-2018-0ed40551fd

Comment 7 Fedora Update System 2018-01-30 17:30:58 UTC
tetex-elsevier-0.1.20090917-17.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-01-30 18:02:21 UTC
tetex-elsevier-0.1.20090917-17.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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