Release version 0.7.7
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## [0.7.7] - 2025-12-09
|
||||||
|
|
||||||
|
* Added TEST_PATTERN parameter to execute dedicated tests
|
||||||
|
|
||||||
|
|
||||||
## [0.7.6] - 2025-12-09
|
## [0.7.6] - 2025-12-09
|
||||||
|
|
||||||
* Fixed pull --preview bug in e2e test
|
* Fixed pull --preview bug in e2e test
|
||||||
|
|||||||
2
PKGBUILD
2
PKGBUILD
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
# Maintainer: Kevin Veen-Birkenbach <info@veen.world>
|
||||||
|
|
||||||
pkgname=package-manager
|
pkgname=package-manager
|
||||||
pkgver=0.7.6
|
pkgver=0.7.7
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
pkgdesc="Local-flake wrapper for Kevin's package-manager (Nix-based)."
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
|||||||
6
debian/changelog
vendored
6
debian/changelog
vendored
@@ -1,3 +1,9 @@
|
|||||||
|
package-manager (0.7.7-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Added TEST_PATTERN parameter to execute dedicated tests
|
||||||
|
|
||||||
|
-- Kevin Veen-Birkenbach <kevin@veen.world> Tue, 09 Dec 2025 17:54:38 +0100
|
||||||
|
|
||||||
package-manager (0.7.6-1) unstable; urgency=medium
|
package-manager (0.7.6-1) unstable; urgency=medium
|
||||||
|
|
||||||
* Fixed pull --preview bug in e2e test
|
* Fixed pull --preview bug in e2e test
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
rec {
|
rec {
|
||||||
pkgmgr = pyPkgs.buildPythonApplication {
|
pkgmgr = pyPkgs.buildPythonApplication {
|
||||||
pname = "package-manager";
|
pname = "package-manager";
|
||||||
version = "0.7.6";
|
version = "0.7.7";
|
||||||
|
|
||||||
# Use the git repo as source
|
# Use the git repo as source
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Name: package-manager
|
Name: package-manager
|
||||||
Version: 0.7.6
|
Version: 0.7.7
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
Summary: Wrapper that runs Kevin's package-manager via Nix flake
|
||||||
|
|
||||||
@@ -77,6 +77,9 @@ echo ">>> package-manager removed. Nix itself was not removed."
|
|||||||
/usr/lib/package-manager/
|
/usr/lib/package-manager/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.7-1
|
||||||
|
- Added TEST_PATTERN parameter to execute dedicated tests
|
||||||
|
|
||||||
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.6-1
|
* Tue Dec 09 2025 Kevin Veen-Birkenbach <kevin@veen.world> - 0.7.6-1
|
||||||
- Fixed pull --preview bug in e2e test
|
- Fixed pull --preview bug in e2e test
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "package-manager"
|
name = "package-manager"
|
||||||
version = "0.7.6"
|
version = "0.7.7"
|
||||||
description = "Kevin's package-manager tool (pkgmgr)"
|
description = "Kevin's package-manager tool (pkgmgr)"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ def remove_pkgmgr_from_nix_profile() -> None:
|
|||||||
prints a descriptive format without an index column inside the container.
|
prints a descriptive format without an index column inside the container.
|
||||||
|
|
||||||
Instead, we directly try to remove possible names:
|
Instead, we directly try to remove possible names:
|
||||||
- 'pkgmgr' (the actual name shown in `nix profile list`)
|
- 'pkgmgr' (the actual name shown in `nix profile list`)
|
||||||
- 'package-manager' (the name mentioned in Nix's own error hints)
|
- 'package-manager' (the name mentioned in Nix's own error hints)
|
||||||
"""
|
"""
|
||||||
for spec in ("pkgmgr", "package-manager"):
|
for spec in ("pkgmgr", "package-manager"):
|
||||||
@@ -76,29 +76,47 @@ def pkgmgr_help_debug() -> None:
|
|||||||
print(f"returncode: {proc.returncode}")
|
print(f"returncode: {proc.returncode}")
|
||||||
print("--- END ---\n")
|
print("--- END ---\n")
|
||||||
|
|
||||||
if proc.returncode != 0:
|
# Important: this is **debug-only**. Do NOT fail the test here.
|
||||||
raise AssertionError(f"'pkgmgr --help' failed with exit code {proc.returncode}")
|
# If you ever want to hard-assert on this, you can add an explicit
|
||||||
|
# assertion in the test method instead of here.
|
||||||
# Wichtig: Hier KEIN AssertionError mehr – das ist reine Debug-Ausgabe.
|
|
||||||
# Falls du später hart testen willst, kannst du optional:
|
|
||||||
# if proc.returncode != 0:
|
|
||||||
# self.fail("...")
|
|
||||||
# aber aktuell nur Sichtprüfung.
|
|
||||||
|
|
||||||
|
|
||||||
class TestIntegrationInstalPKGMGRShallow(unittest.TestCase):
|
class TestIntegrationInstalPKGMGRShallow(unittest.TestCase):
|
||||||
def test_install_pkgmgr_self_install(self) -> None:
|
def test_install_pkgmgr_self_install(self) -> None:
|
||||||
# Debug before cleanup
|
"""
|
||||||
nix_profile_list_debug("BEFORE CLEANUP")
|
End-to-end test that runs "python main.py install pkgmgr ..." inside
|
||||||
|
the test container.
|
||||||
|
|
||||||
# Cleanup: aggressively try to drop any pkgmgr/profile entries
|
We isolate HOME into /tmp/pkgmgr-self-install so that:
|
||||||
remove_pkgmgr_from_nix_profile()
|
- ~/.config/pkgmgr points to an isolated test config area
|
||||||
|
- ~/Repositories is owned by the current user inside the container
|
||||||
# Debug after cleanup
|
(avoiding Nix's 'repository path is not owned by current user' error)
|
||||||
nix_profile_list_debug("AFTER CLEANUP")
|
"""
|
||||||
|
# Use a dedicated HOME for this test to avoid permission/ownership issues
|
||||||
|
temp_home = "/tmp/pkgmgr-self-install"
|
||||||
|
os.makedirs(temp_home, exist_ok=True)
|
||||||
|
|
||||||
original_argv = sys.argv
|
original_argv = sys.argv
|
||||||
|
original_environ = os.environ.copy()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Isolate HOME so that ~ expands to /tmp/pkgmgr-self-install
|
||||||
|
os.environ["HOME"] = temp_home
|
||||||
|
|
||||||
|
# Optional: ensure XDG_* also use the temp HOME for extra isolation
|
||||||
|
os.environ.setdefault("XDG_CONFIG_HOME", os.path.join(temp_home, ".config"))
|
||||||
|
os.environ.setdefault("XDG_CACHE_HOME", os.path.join(temp_home, ".cache"))
|
||||||
|
os.environ.setdefault("XDG_DATA_HOME", os.path.join(temp_home, ".local", "share"))
|
||||||
|
|
||||||
|
# Debug before cleanup
|
||||||
|
nix_profile_list_debug("BEFORE CLEANUP")
|
||||||
|
|
||||||
|
# Cleanup: aggressively try to drop any pkgmgr/profile entries
|
||||||
|
remove_pkgmgr_from_nix_profile()
|
||||||
|
|
||||||
|
# Debug after cleanup
|
||||||
|
nix_profile_list_debug("AFTER CLEANUP")
|
||||||
|
|
||||||
sys.argv = [
|
sys.argv = [
|
||||||
"python",
|
"python",
|
||||||
"install",
|
"install",
|
||||||
@@ -107,13 +125,18 @@ class TestIntegrationInstalPKGMGRShallow(unittest.TestCase):
|
|||||||
"shallow",
|
"shallow",
|
||||||
"--no-verification",
|
"--no-verification",
|
||||||
]
|
]
|
||||||
# Führt die Installation via main.py aus
|
|
||||||
|
# Run installation via main.py
|
||||||
runpy.run_module("main", run_name="__main__")
|
runpy.run_module("main", run_name="__main__")
|
||||||
|
|
||||||
# Nach erfolgreicher Installation: pkgmgr --help anzeigen (Debug)
|
# After successful installation: run `pkgmgr --help` for debug
|
||||||
pkgmgr_help_debug()
|
pkgmgr_help_debug()
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
sys.argv = original_argv
|
sys.argv = original_argv
|
||||||
|
# Restore full environment
|
||||||
|
os.environ.clear()
|
||||||
|
os.environ.update(original_environ)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user