Kaydet (Commit) 12add0a6 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

metadata içerisinde Scom gereksinimi olmayan paketler:

Gereksiz yere içerisinde scom betiği bulunmasa bile paketlerin scomiface bağlantısı yapmaya çalışması bir problemdi ve kısa süreli olarak fixlenmiş idi. Şimdi ise bu hata düzeltildi. Geriye tek yapmam gereken scom dbus servisi çalışmıyor ise yapılan çağrıyı error içerisine çekmeyip pendings listesine atmak olacak bu da çocuk oyuncağı sayılır. 
üst b666e9e8
2019-08-22 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:feature/translations:
* Translations Updated
* metadata içerisinde Scom gereksinimi olmayan paketler:
Gereksiz yere içerisinde scom betiği bulunmasa bile paketlerin scomiface bağlantısı yapmaya
çalışması bir problemdi ve kısa süreli olarak fixlenmiş idi. Şimdi ise bu hata düzeltildi. Geriye tek
yapmam gereken scom dbus servisi çalışmıyor ise yapılan çağrıyı error içerisine çekmeyip pendings
listesine atmak olacak bu da çocuk oyuncağı sayılır.
2019-08-21 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:feature/scripts:
* İki yeni araç eklendi:
inary-sign.py: Depoları GPG imzası ile imzalamak için kullanılacak araç.
sync-licence: Portage paket yönetimine eklenen lisanslarla elimizdekileri güncelleyecek araç.
* Üç yeni araç daha eklendi:
pspec2po: kaynak depodan adları güncellemek için.
revdep-rebuild
version-bump: spec dosyasının versiyonunu güncellemek için.
2019-08-21 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:develop: 2019-08-21 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:develop:
* Yeni komut "configure-manager": * Yeni komut "configure-manager":
Değişen config dosyalarının düzenlemesi bu şekilde basitçe yapılabiliyor. Değişen config dosyalarının düzenlemesi bu şekilde basitçe yapılabiliyor.
* inary indexleri GPG imzasıyla imzalanmadı ise paket sisteminin çakışması sorunu düzenlendi. * inary indexleri GPG imzasıyla imzalanmadı ise paket sisteminin çakışması sorunu düzenlendi.
2019-08-20 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:feature/testSuit 2019-08-20 Suleyman Poyraz <zaryob.dev@gmail.com> :onbranch:feature/testSuit
* Bazı testler eklendi: * Bazı testler eklendi:
Eski testler arasından çalışan ve yeniden yazılmaya ihtiyaç duyulmayanlar eklendi. Eski testler arasından çalışan ve yeniden yazılmaya ihtiyaç duyulmayanlar eklendi.
......
...@@ -199,7 +199,7 @@ class Install(AtomicOperation): ...@@ -199,7 +199,7 @@ class Install(AtomicOperation):
# what to do if / is split into /usr, /var, etc. # what to do if / is split into /usr, /var, etc.
# check scom # check scom
if self.metadata.package.providesScom and ctx.scom: if self.metadata.package.providesScom and ctx.scom and not ctx.get_option("ignore_scom"):
import inary.scomiface as scomiface import inary.scomiface as scomiface
scomiface.get_link() scomiface.get_link()
...@@ -320,34 +320,34 @@ class Install(AtomicOperation): ...@@ -320,34 +320,34 @@ class Install(AtomicOperation):
else: else:
ctx.ui.info(_("Chowning in postinstall {0} ({1}:{2})").format(_file.path, _file.uid, _file.gid), verbose=True) ctx.ui.info(_("Chowning in postinstall {0} ({1}:{2})").format(_file.path, _file.uid, _file.gid), verbose=True)
os.chown(fpath, int(_file.uid), int(_file.gid)) os.chown(fpath, int(_file.uid), int(_file.gid))
if self.metadata.package.providesScom:
if ctx.scom: if ctx.scom and not ctx.get_option("ignore_scom"):
import inary.scomiface import inary.scomiface
try: try:
if self.operation == UPGRADE or self.operation == DOWNGRADE: if self.operation == UPGRADE or self.operation == DOWNGRADE:
fromVersion = self.old_pkginfo.version fromVersion = self.old_pkginfo.version
fromRelease = self.old_pkginfo.release fromRelease = self.old_pkginfo.release
else: else:
fromVersion = None fromVersion = None
fromRelease = None fromRelease = None
ctx.ui.notify(inary.ui.configuring, package=self.pkginfo, files=self.files) ctx.ui.notify(inary.ui.configuring, package=self.pkginfo, files=self.files)
inary.scomiface.post_install( inary.scomiface.post_install(
self.pkginfo.name, self.pkginfo.name,
self.metadata.package.providesScom, self.metadata.package.providesScom,
self.package.scom_dir(), self.package.scom_dir(),
os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml), os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml),
os.path.join(self.package.pkg_dir(), ctx.const.files_xml), os.path.join(self.package.pkg_dir(), ctx.const.files_xml),
fromVersion, fromVersion,
fromRelease, fromRelease,
self.metadata.package.version, self.metadata.package.version,
self.metadata.package.release self.metadata.package.release
) )
ctx.ui.notify(inary.ui.configured, package=self.pkginfo, files=self.files) ctx.ui.notify(inary.ui.configured, package=self.pkginfo, files=self.files)
except inary.scomiface.Error: except inary.scomiface.Error:
ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name)) ctx.ui.warning(_('Configuration of \"{}\" package failed.').format(self.pkginfo.name))
self.config_later = True
else:
self.config_later = True self.config_later = True
else:
self.config_later = True
def extract_install(self): def extract_install(self):
"""unzip package in place""" """unzip package in place"""
...@@ -560,7 +560,7 @@ class Install(AtomicOperation): ...@@ -560,7 +560,7 @@ class Install(AtomicOperation):
inary.db.installdb.InstallDB().mark_needs_reboot(package_name) inary.db.installdb.InstallDB().mark_needs_reboot(package_name)
# filesdb # filesdb
ctx.ui.info(_('Adding files of \"{}\" package to database...').format(self.metadata.package.name), color='brightpurple') ctx.ui.info(_('Adding files of \"{}\" package to database...').format(self.metadata.package.name), color='faintpurple')
ctx.filesdb.add_files(self.metadata.package.name, self.files) ctx.filesdb.add_files(self.metadata.package.name, self.files)
# installed packages # installed packages
...@@ -699,23 +699,25 @@ class Remove(AtomicOperation): ...@@ -699,23 +699,25 @@ class Remove(AtomicOperation):
dpath = os.path.dirname(dpath) dpath = os.path.dirname(dpath)
def run_preremove(self): def run_preremove(self):
if ctx.scom: if self.package.providesScom:
import inary.scomiface if ctx.scom and not ctx.get_option("ignore_scom"):
inary.scomiface.pre_remove( import inary.scomiface
self.package_name, inary.scomiface.pre_remove(
os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml), self.package_name,
os.path.join(self.package.pkg_dir(), ctx.const.files_xml), os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml),
) os.path.join(self.package.pkg_dir(), ctx.const.files_xml),
)
def run_postremove(self): def run_postremove(self):
if ctx.scom: if self.package.providesScom:
import inary.scomiface if ctx.scom and not ctx.get_option("ignore_scom"):
inary.scomiface.post_remove( import inary.scomiface
self.package_name, inary.scomiface.post_remove(
os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml), self.package_name,
os.path.join(self.package.pkg_dir(), ctx.const.files_xml), os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml),
provided_scripts=self.package.providesScom, os.path.join(self.package.pkg_dir(), ctx.const.files_xml),
) provided_scripts=self.package.providesScom,
)
def update_databases(self): def update_databases(self):
self.remove_db() self.remove_db()
......
...@@ -213,7 +213,7 @@ class PackageOp(Command): ...@@ -213,7 +213,7 @@ class PackageOp(Command):
def __init__(self, args): def __init__(self, args):
super(PackageOp, self).__init__(args) super(PackageOp, self).__init__(args)
self.scom = False self.scom = True
def options(self, group): def options(self, group):
group.add_option("--ignore-dependency", action="store_true", group.add_option("--ignore-dependency", action="store_true",
......
...@@ -117,6 +117,7 @@ expanded to package names. ...@@ -117,6 +117,7 @@ expanded to package names.
install.install(packages, ctx.get_option('reinstall') or reinstall) install.install(packages, ctx.get_option('reinstall') or reinstall)
config_changes = helper.check_config_changes(order=packages) config_changes = helper.check_config_changes(order=packages)
if config_changes: if config_changes:
if ctx.ui.confirm(_("[!] Some config files have been changed. Would you like to see and apply them?")): if ctx.ui.confirm(_("[!] Some config files have been changed. Would you like to see and apply them?")):
helper.show_changed_configs(config_changes) helper.show_changed_configs(config_changes)
...@@ -202,7 +202,7 @@ def check_config_changes(order): ...@@ -202,7 +202,7 @@ def check_config_changes(order):
config_changes=dict() config_changes=dict()
for package in order: for package in order:
all_files = installdb.get_files(package) all_files = inary.db.installdb.InstallDB().get_files(package)
config_files = [x for x in all_files.list if x.type == 'config'] config_files = [x for x in all_files.list if x.type == 'config']
config_paths = ["/" + str(x.path) for x in config_files] config_paths = ["/" + str(x.path) for x in config_files]
...@@ -211,8 +211,8 @@ def check_config_changes(order): ...@@ -211,8 +211,8 @@ def check_config_changes(order):
for path in config_paths: for path in config_paths:
if os.path.exists(path) and os.path.exists(path + ".newconfig"): if os.path.exists(path) and os.path.exists(path + ".newconfig"):
newconfig.append(path) newconfig.append(path)
if newconfig:
config_changes[package] = newconfig config_changes[package] = newconfig
return config_changes return config_changes
......
...@@ -191,7 +191,7 @@ setup(name="inary", ...@@ -191,7 +191,7 @@ setup(name="inary",
version=inary.__version__, version=inary.__version__,
description="Inary (Special Package Manager)", description="Inary (Special Package Manager)",
long_description="Inary is the package management system of Sulin Linux.", long_description="Inary is the package management system of Sulin Linux.",
license="GNU GPL2", license="GNU AGPLv3",
author="Zaryob", author="Zaryob",
author_email="zaryob.dev@gmail.com", author_email="zaryob.dev@gmail.com",
url="https://github.com/Zaryob/inary", url="https://github.com/Zaryob/inary",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment