mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-01 08:05:48 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
84d4523e85 | |||
2c2eae2334 |
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
<!-- Generated by graphviz version 7.0.4 (0)
|
<!-- Generated by graphviz version 7.0.5 (0)
|
||||||
-->
|
-->
|
||||||
<!-- Title: G Pages: 1 -->
|
<!-- Title: G Pages: 1 -->
|
||||||
<svg width="15156pt" height="5118pt"
|
<svg width="15156pt" height="5118pt"
|
||||||
|
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 641 KiB |
@ -1,4 +1,4 @@
|
|||||||
.TH AHRIMAN "1" "2022\-12\-31" "ahriman" "Generated Python Manual"
|
.TH AHRIMAN "1" "2023\-01\-02" "ahriman" "Generated Python Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ahriman
|
ahriman
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Evgeniy Alekseev
|
# Maintainer: Evgeniy Alekseev
|
||||||
|
|
||||||
pkgname='ahriman'
|
pkgname='ahriman'
|
||||||
pkgver=2.5.1
|
pkgver=2.5.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="ArcH linux ReposItory MANager"
|
pkgdesc="ArcH linux ReposItory MANager"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
|
@ -81,7 +81,8 @@ class RemotePush(LazyLogging):
|
|||||||
# ...secondly, we clone whole tree...
|
# ...secondly, we clone whole tree...
|
||||||
Sources.fetch(package_target_dir, package.remote)
|
Sources.fetch(package_target_dir, package.remote)
|
||||||
# ...and last, but not least, we remove the dot-git directory...
|
# ...and last, but not least, we remove the dot-git directory...
|
||||||
shutil.rmtree(package_target_dir / ".git", ignore_errors=True)
|
for git_file in package_target_dir.glob(".git*"):
|
||||||
|
shutil.rmtree(package_target_dir / git_file)
|
||||||
# ...copy all patches...
|
# ...copy all patches...
|
||||||
for patch in self.database.patches_get(package.base):
|
for patch in self.database.patches_get(package.base):
|
||||||
filename = f"ahriman-{package.base}.patch" if patch.key is None else f"ahriman-{patch.key}.patch"
|
filename = f"ahriman-{package.base}.patch" if patch.key is None else f"ahriman-{patch.key}.patch"
|
||||||
|
@ -17,4 +17,4 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
__version__ = "2.5.1"
|
__version__ = "2.5.2"
|
||||||
|
@ -20,18 +20,21 @@ def test_package_update(database: SQLite, configuration: Configuration, package_
|
|||||||
"""
|
"""
|
||||||
patch1 = PkgbuildPatch(None, "patch")
|
patch1 = PkgbuildPatch(None, "patch")
|
||||||
patch2 = PkgbuildPatch("key", "value")
|
patch2 = PkgbuildPatch("key", "value")
|
||||||
|
local = Path("local")
|
||||||
|
|
||||||
|
glob_mock = mocker.patch("pathlib.Path.glob", return_value=[".git", ".gitignore"])
|
||||||
rmtree_mock = mocker.patch("shutil.rmtree")
|
rmtree_mock = mocker.patch("shutil.rmtree")
|
||||||
fetch_mock = mocker.patch("ahriman.core.build_tools.sources.Sources.fetch")
|
fetch_mock = mocker.patch("ahriman.core.build_tools.sources.Sources.fetch")
|
||||||
patches_mock = mocker.patch("ahriman.core.database.SQLite.patches_get", return_value=[patch1, patch2])
|
patches_mock = mocker.patch("ahriman.core.database.SQLite.patches_get", return_value=[patch1, patch2])
|
||||||
patches_write_mock = mocker.patch("ahriman.models.pkgbuild_patch.PkgbuildPatch.write")
|
patches_write_mock = mocker.patch("ahriman.models.pkgbuild_patch.PkgbuildPatch.write")
|
||||||
runner = RemotePush(configuration, database, "gitremote")
|
runner = RemotePush(configuration, database, "gitremote")
|
||||||
|
|
||||||
local = Path("local")
|
|
||||||
assert runner.package_update(package_ahriman, local) == package_ahriman.base
|
assert runner.package_update(package_ahriman, local) == package_ahriman.base
|
||||||
|
glob_mock.assert_called_once_with(".git*")
|
||||||
rmtree_mock.assert_has_calls([
|
rmtree_mock.assert_has_calls([
|
||||||
MockCall(local / package_ahriman.base, ignore_errors=True),
|
MockCall(local / package_ahriman.base, ignore_errors=True),
|
||||||
MockCall(local / package_ahriman.base / ".git", ignore_errors=True),
|
MockCall(local / package_ahriman.base / ".git"),
|
||||||
|
MockCall(local / package_ahriman.base / ".gitignore"),
|
||||||
])
|
])
|
||||||
fetch_mock.assert_called_once_with(pytest.helpers.anyvar(int), package_ahriman.remote)
|
fetch_mock.assert_called_once_with(pytest.helpers.anyvar(int), package_ahriman.remote)
|
||||||
patches_mock.assert_called_once_with(package_ahriman.base)
|
patches_mock.assert_called_once_with(package_ahriman.base)
|
||||||
|
Reference in New Issue
Block a user