Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Heredocs are not preserved #78

Open
nettnikl opened this issue Dec 31, 2022 · 1 comment
Open

Bug: Heredocs are not preserved #78

nettnikl opened this issue Dec 31, 2022 · 1 comment

Comments

@nettnikl
Copy link

Hello!
I'm facing an issue in the transition of this DEB File. The installation fails with an syntax error: unexpected end of file.

Details

Looking into the postinst script in the original deb file, you can see there is a heredoc, that is not well preserved in the resulting pkg.tar.zst file. Specifically, the transition to a single script (.INSTALL) add tabulators to all lines of the postinst script, which results in the heredoc delimiter (\nEOF) being destroyed.

Workaround

Manually replace all \tEOF in the .INSTALL file by EOF.

Logs

LANG=C sudo -E pacman -U pijuice-base-1.8-1-any.pkg.tar.zst
loading packages...
warning: pijuice-base-1.8-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) pijuice-base-1.8-1

Total Installed Size:  0.45 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                [#######################################################] 100%
(1/1) checking package integrity                                                              [#######################################################] 100%
(1/1) loading package files                                                                   [#######################################################] 100%
(1/1) checking for file conflicts                                                             [#######################################################] 100%
(1/1) checking available disk space                                                           [#######################################################] 100%
warning: could not get file information for pkgbuildinstallations1
:: Processing package changes...
/tmp/alpm_GpLemT/.INSTALL: line 142: warning: here-document at line 64 delimited by end-of-file (wanted `EOF')
/tmp/alpm_GpLemT/.INSTALL: line 143: syntax error: unexpected end of file
/usr/bin/bash: line 1: pre_upgrade: command not found
error: command failed to execute correctly
(1/1) reinstalling pijuice-base                                                               [#######################################################] 100%
/tmp/alpm_fchCf3/.INSTALL: line 142: warning: here-document at line 64 delimited by end-of-file (wanted `EOF')
/tmp/alpm_fchCf3/.INSTALL: line 143: syntax error: unexpected end of file
/usr/bin/bash: line 1: post_upgrade: command not found
error: command failed to execute correctly
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...

Related

This is related to #47

@happyme531
Copy link

Same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants