Skip to content

Commit

Permalink
pisi: Drop files that eopkg4 should be handling
Browse files Browse the repository at this point in the history
**Summary**
- Sync with pisi v3.12 upstream release, which always installs baselayout
  eopkg first if they are present in any given install/upgrade order.
- Add rundep on python2-ordered-set package
- Make pisi co-installable with the eopkg(py3) package
- Miscellaneous shebang and file name extension changes
- Sort pspec.xml file sections lexically for ease of reading/tweaking
- Change long_description to indicate that pisi is now considered legacy
- Port pisi comar/*.py build scripts to python3 to enable building when
  using `eopkg.py3 build` (Thank you to @ultr4_l4s3r for the fix)

Signed-off-by: Rune Morling <[email protected]>
  • Loading branch information
ermo committed Jun 23, 2024
1 parent de2c80d commit afc910e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 24 deletions.
14 changes: 12 additions & 2 deletions packages/p/pisi/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ def install():
pythonmodules.install()

pisitools.dosym("eopkg-cli", "/usr/bin/eopkg")
pisitools.dosym("uneopkg", "/usr/bin/unpisi")
pisitools.dosym("lseopkg", "/usr/bin/lspisi")
pisitools.dosym("uneopkg.py2", "/usr/bin/unpisi.py2")
pisitools.dosym("lseopkg.py2", "/usr/bin/lspisi.py2")
pisitools.dodir("/etc/mudur")
shelltools.echo("%s/etc/mudur/locale" % get.installDIR(), "")

# Everything below here _removes_ stuff that we don't want installed.
# After the epoch bump, The goal is to make pisi own as little as
# practically possible, so that eopkg4 can own it instead for
# co-installability purposes as we deprecate pisi.
#
#shelltools.unlinkDir("%s/usr/share/defaults" % get.installDIR())
#pisitools.remove("/usr/share/defaults/eopkg/eopkg.conf")
pisitools.remove("/usr/share/doc/pisi/dependency.pdf")
pisitools.remove("/usr/share/doc/pisi/package_versions.pdf")
10 changes: 5 additions & 5 deletions packages/p/pisi/comar/manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 TUBITAK/UEKAE
Expand Down Expand Up @@ -128,7 +128,7 @@ def privileged(func):
Decorator for synchronizing privileged functions
"""
def wrapper(*__args,**__kw):
operation = "System.Manager.%s" % func.func_name
operation = "System.Manager.%s" % func.__name__

started(operation)
_init_pisi()
Expand All @@ -137,7 +137,7 @@ def wrapper(*__args,**__kw):
except KeyboardInterrupt:
cancelled()
return
except Exception, e:
except Exception(e):
notify("System.Manager", "error", str(e))
return
finished(operation)
Expand Down Expand Up @@ -182,7 +182,7 @@ def updateAllRepositories():
for repo in repos:
try:
pisi.api.update_repo(repo)
except pisi.db.repodb.RepoError, e:
except pisi.db.repodb.RepoError(e):
notify("System.Manager", "error", str(e))

@privileged
Expand All @@ -198,7 +198,7 @@ def removeRepository(repo=None):
@privileged
def setRepoActivities(repos=None):
if repos:
for repo, active in repos.items():
for repo, active in list(repos.items()):
pisi.api.set_repo_activity(repo, active)

@privileged
Expand Down
2 changes: 1 addition & 1 deletion packages/p/pisi/comar/package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/env python3

import os

Expand Down
2 changes: 1 addition & 1 deletion packages/p/pisi/component.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<PISI>
<Name>system.base</Name>
<Name>system.utils</Name>
</PISI>
56 changes: 41 additions & 15 deletions packages/p/pisi/pspec.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
<IsA>app:console</IsA>
<Summary>PISI</Summary>
<Description>PISI is a modern package management system implemented in Python. Some of its main features are: package sources are written in XML and python, implements all functions through a simple-to-use API, integrates low-level and high-level package management features.</Description>
<Archive sha1sum="3e71b2bbd5a3016c03ad52a5076a51b67dda9e09" type="targz">https://github.com/getsolus/eopkg/archive/refs/tags/v3.11.tar.gz</Archive>
<Archive sha1sum="55bc114eea82ec1678ea11a2b88a2f12fbd5a9f4" type="targz">https://github.com/getsolus/eopkg/archive/refs/tags/v3.12.tar.gz</Archive>
<BuildDependencies>
<Dependency>python</Dependency>
<Dependency>python2-xattr</Dependency>
<Dependency>db5</Dependency>
<Dependency>piksemel</Dependency>
<Dependency>intltool</Dependency>
<Dependency>piksemel</Dependency>
<Dependency>python</Dependency>
<Dependency>python2-ordered-set</Dependency>
<Dependency>python2-xattr</Dependency>
</BuildDependencies>

<Patches>
Expand All @@ -28,40 +29,65 @@
<Package>
<Name>pisi</Name>
<Files>
<Path fileType="config">/etc/pisi/pisi.conf</Path>
<Path fileType="config">/etc/mudur/locale</Path>
<Path fileType="data">/usr/lib/tmpfiles.d/pisi.conf</Path>
<Path fileType="data">/usr/share/defaults/eopkg</Path>
<Path fileType="data">/usr/share/factory/var/db/comar3/scripts/System.Manager/pisi.py</Path>
<Path fileType="data">/usr/share/mime/packages</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="doc">/usr/share/man/man1</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="executable">/usr/sbin</Path>
<Path fileType="library">/usr/lib/python*</Path>
<Path fileType="localedata">/usr/share/locale</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="doc">/usr/share/man/man1</Path>
<Path fileType="data">/usr/share/defaults/eopkg</Path>
<Path fileType="config">/etc/pisi/pisi.conf</Path>
<Path fileType="config">/etc/mudur/locale</Path>
<Path fileType="data">/usr/share/mime/packages</Path>
<Path fileType="data">/usr/share/factory/var/db/comar3/scripts/System.Manager/pisi.py</Path>
<Path fileType="data">/usr/lib/tmpfiles.d/pisi.conf</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/pisi.conf">pisi.tmpfiles</AdditionalFile>
<!-- BEGIN should be owned by eopkg(py3) after the epoch bump -->
<AdditionalFile owner="root" permission="0644" target="/usr/share/defaults/eopkg/mirrors.conf">mirrors.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/share/defaults/eopkg/sandbox.conf">sandbox.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/pisi.conf">pisi.tmpfiles</AdditionalFile>
<!-- END should be owned by eopkg(py3) after the epoch bump -->
<AdditionalFile owner="root" permission="0644" target="/usr/share/factory/var/db/comar3/scripts/System.Manager/pisi.py">manager.py</AdditionalFile>
<!-- BEGIN should be owned by eopkg(py3) after the epoch bump -->
<AdditionalFile owner="root" permission="0644" target="/usr/share/man/man1/eopkg.1">eopkg.1</AdditionalFile>
<!-- END should be owned by eopkg(py3) after the epoch bump -->
</AdditionalFiles>
<Provides>
<COMAR script="package.py">System.Package</COMAR>
<COMAR script="manager.py">System.Manager</COMAR>
</Provides>
<RuntimeDependencies>
<Dependency>python</Dependency>
<Dependency>python2-xattr</Dependency>
<Dependency>db5</Dependency>
<!-- for documentation etc. once pisi / eopkg.py2 is the "lesser" twin (after epoch bump)
<Dependency>eopkg</Dependency>
-->
<Dependency>piksemel</Dependency>
<Dependency>python</Dependency>
<Dependency>python2-ordered-set</Dependency>
<Dependency>python2-xattr</Dependency>
<Dependency>usysconf</Dependency>
</RuntimeDependencies>
</Package>

<History>
<Update release="112">
<Date>24-06-2024</Date>
<Version>3.12</Version>
<Comment>Update to legacy/co-installable pisi version v3.12
**Summary**
- Sync with pisi v3.12 upstream release, which always installs baselayout eopkg first if they are present in any given install/upgrade order.
- Add rundep on python2-ordered-set package
- Make pisi co-installable with the eopkg(py3) package
- Miscellaneous shebang and file name extension changes
- Sort pspec.xml file sections lexically for ease of reading/tweaking
- Change long_description to indicate that pisi is now considered legacy
- Port pisi comar/*.py build scripts to python3 to enable building when
using `eopkg.py3 build` (Thank you to @ultr4_l4s3r for the fix)
</Comment>
<Name>Rune Morling</Name>
<Email>[email protected]</Email>
</Update>
<Update release="111">
<Date>10-06-2024</Date>
<Version>3.11</Version>
Expand Down

0 comments on commit afc910e

Please sign in to comment.