Merge branch 'develop' into 'master'

Develop

See merge request sulinos/devel/inary!40
......@@ -330,7 +330,7 @@ class Install(AtomicOperation):
return 0
ctx.ui.info(_('Pre-install configuration have been run for \"{}\"'.format(
self.pkginfo.name)), color='brightyellow')
if not self.trigger.preinstall(ctx.config.tmp_dir()):
if not self.trigger.preinstall(self.package.pkg_dir()):
util.clean_dir(self.package.pkg_dir())
ctx.ui.error(
_('Pre-install configuration of \"{}\" package failed.').format(self.pkginfo.name))
......@@ -538,7 +538,7 @@ class Install(AtomicOperation):
for postops in ctx.const.postops:
try:
self.package.extract_file_synced(
postops, ctx.config.tmp_dir())
postops, self.package.pkg_dir())
except:
pass
......
# -*- coding:utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2020, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#
import os
import sys
import inary.db
import inary.util as util
import inary.context as ctx
import inary.cli.command as command
import optparse
# Gettext Library
import gettext
__trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
class CheckRelation(command.Command, metaclass=command.autocommand):
__doc__ = _("""Check packages and system relations
Usage: check-relation
""")
def __init__(self, args):
super(CheckRelation, self).__init__(args)
self.installdb = inary.db.installdb.InstallDB()
self.componentdb = inary.db.componentdb.ComponentDB()
name = ("check-relation", "cr")
def options(self):
group = optparse.OptionGroup(self.parser, _("list-installed options"))
group.add_option("-f", "--force", action="store_true",
default=False, help=_("Deep scan mode"))
self.parser.add_option_group(group)
def fix_reinstall(self, need_reinstall):
need_reinstall = util.unique_list(need_reinstall)
if len(need_reinstall) > 0:
sys.stderr.write(
_("This packages broken and need to reinstall.")+"\n\n")
for pkg in need_reinstall:
sys.stderr.write("{} ".format(pkg))
from inary.operations import install
ctx.set_option("ignore_dependency", True)
install.install(need_reinstall, reinstall=True)
sys.stderr.write("\n")
def run(self):
self.init(database=True, write=False)
installed = self.installdb.list_installed()
component = ctx.get_option('component')
if component:
component_pkgs = self.componentdb.get_union_packages(
component, walk=True)
installed = list(set(installed) & set(component_pkgs))
installed.sort()
need_reinstall = []
for pkg in installed:
for p in self.installdb.get_package(pkg).runtimeDependencies():
sys.stderr.write("\x1b[K"+_("Checking: {}").format(p)+"\r")
if not self.installdb.has_package(str(p.package)):
need_reinstall.append(p.package)
sys.stderr.write(
_("Missing: - {}").format(p.package)+"\n")
self.fix_reinstall(need_reinstall)
if self.options.force:
for pkg in installed:
pkgname = pkg
files = self.installdb.get_files(pkg)
sys.stderr.write("\x1b[K"+_("Checking: {}").format(pkg)+"\r")
for f in files.list:
if not os.path.exists("/"+f.path):
need_reinstall.append(pkg)
sys.stderr.write(
_("Missing: /{} - {}").format(f.path, pkg)+"\n")
self.fix_reinstall(need_reinstall)
......@@ -37,8 +37,7 @@ def configure_pending(packages=None):
else:
packages = set(packages).intersection(installdb.list_pending())
order = inary.data.pgraph.generate_pending_order(packages)
for x in order:
for x in packages:
if installdb.has_package(x):
pkginfo = installdb.get_package(x)
ops_Dir = installdb.package_path(x)
......
......@@ -39,7 +39,7 @@ Lists packages waiting to be configured.
A = inary.db.installdb.InstallDB().list_pending()
if len(A):
ctx.ui.info(_('Listing pending orders:'), color='blue')
for p in inary.data.pgraph.generate_pending_order(A):
for p in A:
ctx.ui.info(p)
else:
ctx.ui.info(_('There are no packages waiting to be configured.'))
......@@ -14,6 +14,8 @@
"""misc. utility functions, including process and file utils"""
import os
# Inary Modules
from unicodedata import category as ucategory
import inary.context as ctx
......
#!/bin/sh
#sulinstrapt betiği ile sulinos chroot oluşturabilirsiniz veya diskinize kurulum yapabilirsiniz
set -e
if [ "$1" == "" ] || [ "$1" == "-*" ]
then
echo "Usage: sulinstrapt [directory]"
......@@ -30,9 +29,9 @@ if echo $2 | grep "^-" &>/dev/null ; then
echo $2 | grep "x" && inary it -c x11 -y --ignore-configure -D$sulin
echo $2 | grep "d" && inary it -c system.devel -y --ignore-configure -D$sulin
echo $2 | grep "n" && inary it NetworkManager -y --ignore-configure -D$sulin
echo $2 | grep "a" && inary it nano wget vim strace ntfsprogs tree dialog pfork scom htop -y --ignore-configure -D$sulin
echo $2 | grep "a" && inary it curl nano wget vim strace ntfsprogs tree dialog pfork scom htop -y --ignore-configure -D$sulin
fi
if [ ! -d /proc/sys/kernel ] ; then
if [ ! -d $sulin/proc/sys/kernel ] ; then
for i in /dev /sys /proc /run
do
mkdir -p $sulin/$i &>/dev/null
......
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