mirror of
https://github.com/Project-OSS-Revival/alien.git
synced 2026-04-24 14:00:17 +00:00
fix: restore tar fallback when makepkg is not available
Commit 32f04ae removed the tar fallback in Tgz::build(), requiring
/sbin/makepkg (Slackware-specific) for --to-tgz conversion. This broke
alien on all non-Slackware systems.
Restore the fallback using the same method as the original makepkg
script.
Fixes: https://github.com/Project-OSS-Revival/alien/issues/4
This commit is contained in:
committed by
Syed Shahrukh Hussain
parent
04a9c4fa04
commit
8bba6dfdc5
@@ -489,7 +489,10 @@ sub build {
|
||||
$Alien::Package::verbose=$v;
|
||||
}
|
||||
else {
|
||||
die "Sorry, I cannot generate the .tgz file because /sbin/makepkg is not present.\n"
|
||||
# Fallback to plain tar when makepkg is not available
|
||||
# Use same method as makepkg: strip ./ prefix via sed to match Slackware format
|
||||
$this->do("cd ".$this->unpacked_tree."; find ./ | LC_COLLATE=C sort | sed '2,\$s,^\\./,,' | tar --no-recursion -T - -czf ../$tgz")
|
||||
or die "Package build failed";
|
||||
}
|
||||
return $tgz;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user