Skip to content

[libmakepkg] an error in the 'tidy.sh.in' file #61

@Zloten

Description

@Zloten

Description / Steps to reproduce the issue
The next lines:

for lib in "$MAKEPKG_LIBRARY/tidy/"*.sh; do
	source "$lib"
done

causes the 'tidy_remove' fullfilled with script names in the next order:

docs.sh
emptydirs.sh
libtool.sh
purge.sh
staticlibs.sh
strip.sh
zipman.sh

and the next lines:

# options that remove unwanted files
for func in ${tidy_remove[@]}; do
	$func
done

produces sequential script invokation:

==> Tidying install...
  -> Removing empty directories...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...

The problem is in 'emptydirs'.
It invokes early than 'libtool' and 'purge'.
But after 'libtool' and 'purge' some empty dirs may arise.
But 'emptydirs' is already invoked.

Fix:
Change the order of 'tidy_remove' scipts:

docs.sh
libtool.sh
purge.sh
staticlibs.sh
emptydirs.sh
strip.sh
zipman.sh

Windows Version
MSYS_NT-10.0-19045

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions