Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debdeploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from . import tools

__version__ = "1.2.0b1"
__version__ = "1.2.1"


def parse() -> argparse.Namespace:
Expand Down
3 changes: 3 additions & 0 deletions debdeploy/tests/example/usr/bin/test-debdeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@ echo "You have installed test-package!"
echo "You need to enter path for unit-testing"
echo "Please refer to exist directory of source!"
read -p "Dirname: " source_path
if [ -z $source_path ]; then
source_path=$(pwd)
fi
command -v pytest >> /dev/null || (echo "You haven't installed pytest, abort!"; exit 1)
( cd $source_path || echo "Path not exists, abort"; exit 2 ) && pytest
2 changes: 1 addition & 1 deletion debdeploy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_arch() -> str:
"x86_64/amd64",
"s390x/s390x",
"aarch64.*/arm64",
] # Predefined
] # Predefined # TODO Add more arch
arch = platform.machine()
for _x in _a_re:
pattern, repl = _x.split("/")
Expand Down
2 changes: 1 addition & 1 deletion debdeploy/tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def build(package: control.Package, cache_dir: str, dest_dir: str) -> None:
tools.printf(f"Directory is not a directory: '{dest_dir}'!")
tools.printf(f"Building package {str(package)}")
_code = execute(
f"sudo dpkg-deb -Sextreme -b {os.path.join(cache_dir, package.name)} \
f"dpkg-deb -Sextreme -b {os.path.join(cache_dir, package.name)} \
{os.path.join(dest_dir, f'{package.name}_{package.version}_{package.arch}.deb')}"
)
if _code == 0:
Expand Down
6 changes: 4 additions & 2 deletions debdeploy/tools/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from debdeploy import tools


def get_files(package: control.Package, default_arch=None) -> list[str]:
def get_files(package: control.Package, default_arch=tools.get_arch()) -> list[str]:
"""
Get files from dpkg cache, what stores info about package
"""
Expand Down Expand Up @@ -60,7 +60,7 @@ def get_files(package: control.Package, default_arch=None) -> list[str]:
exception=definitions.PackageNotFoundError,
)
if len(package_files) > 1:
if default_arch is None or default_arch not in package_files:
if default_arch not in package_files:
tools.printf(
f"Can't guess default arch to build from '{archs}'!",
level="f",
Expand Down Expand Up @@ -110,6 +110,8 @@ def copy_files_to_target(files: list[str], target: str) -> None:
tools.force_makedirs(destination)
shutil.copystat(file.strip(), destination)
continue
if os.path.islink(file):
print(f"{file} is link")
shutil.copy2(file.strip(), destination)
os.remove(package_list)
to_chmod = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

[project]
name = "debdeploy"
version = "1.2.0"
version = "1.2.1"
requires-python = ">=3.5"
description = "Deb package builder from dpkg cache"
readme = "README.md"
Expand Down