Pisi version upgrade. Removed some unnecessary files from kernel package.

This commit is contained in:
Safa Arıman
2020-01-10 04:30:17 +03:00
parent 371d5bf17b
commit 76a37adac6
24 changed files with 14 additions and 7674 deletions
+4 -8
View File
@@ -8,27 +8,23 @@ from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pythonmodules
def build():
pisitools.dosed("pisi/__init__.py", "2.4", "2.6.1")
pisitools.dosed("pisi/db/lazydb.py", "2.4", "2.6.1")
pythonmodules.compile()
def install():
# Install into /usr/lib/pardus so we can protect ourself from python updates
pythonmodules.install("--install-lib=/usr/lib/pisilinux")
pisitools.dosym("pisi-cli", "/usr/bin/pisi")
shelltools.touch("LOCK")
shelltools.chmod("LOCK", 0666)
shelltools.chmod("LOCK", 0o666)
pisitools.dodir("/run/lock/files.ldb")
pisitools.insinto("/run/lock/files.ldb", "LOCK")
pisitools.dodir("/var/lib/pisi/info/files.ldb")
pisitools.dosym("/run/lock/files.ldb/LOCK", "/var/lib/pisi/info/files.ldb/LOCK")
pisitools.insinto("/etc/pisi", "pisi.conf-%s" % get.ARCH(), "pisi.conf")
# we need it teporary
# we need it temporary
pisitools.dodir("/usr/lib/pardus")
pisitools.dosym("/usr/lib/pisilinux/pisi", "/usr/lib/pardus/pisi")
-97
View File
@@ -1,97 +0,0 @@
diff -Nuar a/pisi/cli/emergeup.py b/pisi/cli/emergeup.py
--- a/pisi/cli/emergeup.py 1970-01-01 02:00:00.000000000 +0200
+++ b/pisi/cli/emergeup.py 2016-06-06 23:33:48.000000000 +0300
@@ -0,0 +1,82 @@
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2005 - 2007, TUBITAK/UEKAE
+#
+# 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 2 of the License, or (at your option)
+# any later version.
+#
+# Please read the COPYING file.
+#
+
+import optparse
+
+import gettext
+__trans = gettext.translation('pisi', fallback=True)
+_ = __trans.ugettext
+
+import pisi.cli.command as command
+import pisi.cli.build as build
+import pisi.context as ctx
+import pisi.api
+
+class EmergeUp(build.Build):
+ __doc__ = _("""Build and install PiSi source packages from repository
+
+Usage: emergeup ...
+
+You should give the name of a source package to be
+downloaded from a repository containing sources.
+
+You can also give the name of a component.
+""")
+ __metaclass__ = command.autocommand
+
+ def __init__(self, args):
+ super(EmergeUp, self).__init__(args)
+ self.comar = True
+
+ name = ("emergeup", "emup")
+
+ def options(self):
+
+ group = optparse.OptionGroup(self.parser, _("emergeup options"))
+ super(EmergeUp, self).add_options(group)
+ group.add_option("-c", "--component", action="store",
+ default=None, help=_("Emerge available packages under given component"))
+ group.add_option("--ignore-file-conflicts", action="store_true",
+ default=False, help=_("Ignore file conflicts"))
+ group.add_option("--ignore-package-conflicts", action="store_true",
+ default=False, help=_("Ignore package conflicts"))
+ group.add_option("--ignore-comar", action="store_true",
+ default=False, help=_("Bypass comar configuration agent"))
+ self.parser.add_option_group(group)
+
+ def run(self):
+ self.init(database = True)
+
+ source = pisi.db.sourcedb.SourceDB()
+
+ imdb = pisi.db.installdb.InstallDB()
+
+ installed_emerge_packages = imdb.list_installed_with_build_host("localhost")
+
+ emerge_up_list = []
+
+ for package in installed_emerge_packages:
+ if source.has_spec(package):
+ spec = source.get_spec(package)
+ if spec.getSourceRelease() > imdb.get_version(package)[1]:
+ emerge_up_list.append(package)
+
+ if ctx.get_option('output_dir'):
+ ctx.ui.info(_('Output directory: %s') % ctx.config.options.output_dir)
+ else:
+ ctx.ui.info(_('Outputting binary packages in the package cache.'))
+ ctx.config.options.output_dir = ctx.config.cached_packages_dir()
+
+ repos = pisi.api.list_repos()
+ pisi.api.update_repos(repos, ctx.get_option('force'))
+
+ pisi.api.emerge(emerge_up_list)
diff -Nuar a/pisi/cli/pisicli.py b/pisi/cli/pisicli.py
--- a/pisi/cli/pisicli.py 2011-05-26 20:17:29.000000000 +0300
+++ b/pisi/cli/pisicli.py 2016-06-07 12:10:25.448737817 +0300
@@ -29,6 +29,7 @@
import pisi.cli.deletecache
import pisi.cli.delta
import pisi.cli.emerge
+import pisi.cli.emergeup
import pisi.cli.fetch
import pisi.cli.graph
import pisi.cli.index
-37
View File
@@ -1,37 +0,0 @@
diff -Nuar a/pisi/cli/fetch.py b/pisi/cli/fetch.py
--- a/pisi/cli/fetch.py 2011-05-26 20:17:29.000000000 +0300
+++ b/pisi/cli/fetch.py 2016-06-14 22:39:14.000000000 +0300
@@ -20,6 +20,7 @@
import pisi.cli.command as command
import pisi.context as ctx
import pisi.api
+import pisi
class Fetch(command.Command):
__doc__ = _("""Fetch a package
@@ -45,12 +46,24 @@
def add_options(self, group):
group.add_option("-o", "--output-dir", action="store", default=os.path.curdir,
help=_("Output directory for the fetched packages"))
+ group.add_option("--runtime-deps", action="store_true", default=None,
+ help=_("Bağımlılıkları ile indirme açıklaması."))
def run(self):
+ packages = pisi.db.packagedb.PackageDB()
self.init(database = False, write = False)
if not self.args:
self.help()
return
+
+ full_packages = []
+
+ for pisi_package in self.args:
+ package = packages.get_package(pisi_package)
+ full_packages.append(pisi_package)
+ if ctx.config.options.runtime_deps:
+ for dep in package.runtimeDependencies():
+ full_packages.append(dep.name())
- pisi.api.fetch(self.args, ctx.config.options.output_dir)
+ pisi.api.fetch(full_packages, ctx.config.options.output_dir)
@@ -1,12 +0,0 @@
diff -Naur pisi~/operations/build.py pisi/operations/build.py
--- pisi~/operations/build.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/operations/build.py 2014-07-06 18:04:24.648575441 +0200
@@ -402,6 +402,8 @@
if self.build_type == "emul32":
env["CC"] = "%s -m32" % os.getenv("CC")
env["CXX"] = "%s -m32" % os.getenv("CXX")
+ env["CFLAGS"] = os.getenv("CFLAGS").replace("-fPIC", "")
+ env["CXXFLAGS"] = os.getenv("CXXFLAGS").replace("-fPIC", "")
env["PKG_CONFIG_PATH"] = "/usr/lib32/pkgconfig"
os.environ.update(env)
@@ -1,64 +0,0 @@
diff -Naur pisi~/index.py pisi/index.py
--- pisi~/index.py 2014-03-07 23:03:46.000000000 +0100
+++ pisi/index.py 2014-09-04 21:47:38.282627704 +0200
@@ -13,6 +13,7 @@
"""PiSi source/package index"""
import os
+import re
import shutil
import multiprocessing
@@ -91,6 +92,7 @@
specs = []
deltas = {}
+ pkgs_sorted = False
for fn in os.walk(repo_uri).next()[2]:
if fn.endswith(ctx.const.delta_package_suffix) or fn.endswith(ctx.const.package_suffix):
pkgpath = os.path.join(repo_uri,
@@ -100,6 +102,9 @@
fn), noln = False if ctx.config.get_option("verbose") else True)
shutil.copy2(os.path.join(repo_uri, fn), pkgpath)
os.remove(os.path.join(repo_uri, fn))
+ pkgs_sorted = True
+ if pkgs_sorted:
+ ctx.ui.info("%-80.80s\r" % '')
for root, dirs, files in os.walk(repo_uri):
# Filter hidden directories
@@ -166,14 +171,26 @@
# Before calling pool.map check if list is empty or not: python#12157
if latest_packages:
- try:
- # Add binary packages to index using a process pool
- self.packages = pool.map(add_package, latest_packages)
- except:
- pool.terminate()
- pool.join()
- ctx.ui.info("")
- raise
+ sorted_pkgs = {}
+ for pkg in latest_packages:
+ key = re.search("\/((lib)?[\d\w])\/", pkg[0])
+ key = key.group(1) if key else os.path.dirname(pkg[0])
+ try:
+ sorted_pkgs[key].append(pkg)
+ except KeyError:
+ sorted_pkgs[key] = [pkg]
+ self.packages = []
+ for key, pkgs in sorted(sorted_pkgs.items()):
+ ctx.ui.info("%-80.80s\r" % (_("Adding packages from directory %s... " % key)), noln=True)
+ try:
+ # Add binary packages to index using a process pool
+ self.packages.extend(pool.map(add_package, pkgs))
+ except:
+ pool.terminate()
+ pool.join()
+ ctx.ui.info("")
+ raise
+ ctx.ui.info("%-80.80s\r" % (_("Adding packages from directory %s... done." % key)))
ctx.ui.info("")
pool.close()
@@ -1,283 +0,0 @@
diff -Naur pisi~/api.py pisi/api.py
--- pisi~/api.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/api.py 2014-06-24 22:36:50.565227969 +0200
@@ -401,10 +401,9 @@
>>> [("kvm", (["lib/modules/2.6.18.8-86/extra/kvm-amd.ko","lib/modules/2.6.18.8-86/extra/kvm-intel.ko"])),]
"""
- filesdb = pisi.db.filesldb.FilesLDB()
if term.startswith("/"): # FIXME: why? why?
term = term[1:]
- return filesdb.search_file(term)
+ return ctx.filesdb.search_file(term)
def fetch(packages=[], path=os.path.curdir):
"""
@@ -869,7 +868,6 @@
# FIXME: rebuild_db is only here for filesdb and it really is ugly. we should not need any rebuild.
@locked
def rebuild_db():
- filesdb = pisi.db.filesldb.FilesLDB()
# save parameters and shutdown pisi
options = ctx.config.options
@@ -877,9 +875,9 @@
comar = ctx.comar
pisi._cleanup()
- filesdb.close()
- filesdb.destroy()
- filesdb = pisi.db.filesldb.FilesLDB()
+ ctx.filesdb.close()
+ ctx.filesdb.destroy()
+ ctx.filesdb = pisi.db.filesldb.FilesLDB()
# reinitialize everything
set_userinterface(ui)
diff -Naur pisi~/atomicoperations.py pisi/atomicoperations.py
--- pisi~/atomicoperations.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/atomicoperations.py 2014-06-25 19:10:49.061679815 +0200
@@ -120,6 +120,7 @@
raise Error(_("Package %s not found in any active repository.") % name)
def __init__(self, package_fname, ignore_dep = None, ignore_file_conflicts = None):
+ if not ctx.filesdb: ctx.filesdb = pisi.db.filesldb.FilesLDB()
"initialize from a file name"
super(Install, self).__init__(ignore_dep)
if not ignore_file_conflicts:
@@ -134,14 +135,10 @@
self.metadata = self.package.metadata
self.files = self.package.files
self.pkginfo = self.metadata.package
- self.filesdb = pisi.db.filesldb.FilesLDB()
self.installdb = pisi.db.installdb.InstallDB()
self.operation = INSTALL
self.store_old_paths = None
- def __del__(self):
- self.filesdb.close()
-
def install(self, ask_reinstall = True):
# Any package should remove the package it replaces before
@@ -186,7 +183,7 @@
def check_replaces(self):
for replaced in self.pkginfo.replaces:
if self.installdb.has_package(replaced.package):
- pisi.operations.remove.remove_replaced_packages([replaced.package], filesdb=self.filesdb)
+ pisi.operations.remove.remove_replaced_packages([replaced.package])
def check_versioning(self, version, release):
try:
@@ -215,7 +212,7 @@
# check file conflicts
file_conflicts = []
for f in self.files.list:
- pkg, existing_file = self.filesdb.get_file(f.path)
+ pkg, existing_file = ctx.filesdb.get_file(f.path)
if pkg:
dst = pisi.util.join_path(ctx.config.dest_dir(), f.path)
if pkg != self.pkginfo.name and not os.path.isdir(dst) and really_conflicts(pkg):
@@ -282,7 +279,7 @@
self.old_files = self.installdb.get_files(pkg.name)
self.old_pkginfo = self.installdb.get_info(pkg.name)
self.old_path = self.installdb.pkg_dir(pkg.name, iversion_s, irelease_s)
- self.remove_old = Remove(pkg.name, store_old_paths = self.store_old_paths, filesdb = self.filesdb)
+ self.remove_old = Remove(pkg.name, store_old_paths = self.store_old_paths)
self.remove_old.run_preremove()
self.remove_old.run_postremove()
@@ -454,7 +451,7 @@
if os.path.samestat(new_file_stat, old_file_stat):
break
else:
- Remove.remove_file(old_file, self.pkginfo.name, store_old_paths=self.store_old_paths, filesdb=self.filesdb)
+ Remove.remove_file(old_file, self.pkginfo.name, store_old_paths=self.store_old_paths)
if self.reinstall():
# get 'config' typed file objects
@@ -512,7 +509,7 @@
def update_databases(self):
"update databases"
if self.reinstall():
- self.remove_old.remove_db(filesdb=self.filesdb)
+ self.remove_old.remove_db()
if self.config_later:
self.installdb.mark_pending(self.pkginfo.name)
@@ -531,7 +528,7 @@
pisi.api.add_needs_reboot(package_name)
# filesdb
- self.filesdb.add_files(self.metadata.package.name, self.files)
+ ctx.filesdb.add_files(self.metadata.package.name, self.files)
# installed packages
self.installdb.add_package(self.pkginfo)
@@ -562,10 +559,10 @@
class Remove(AtomicOperation):
- def __init__(self, package_name, ignore_dep = None, store_old_paths = None, filesdb = None):
+ def __init__(self, package_name, ignore_dep = None, store_old_paths = None):
+ if not ctx.filesdb: ctx.filesdb = pisi.db.filesldb.FilesLDB()
super(Remove, self).__init__(ignore_dep)
self.installdb = pisi.db.installdb.InstallDB()
- self.filesdb = filesdb
self.package_name = package_name
self.package = self.installdb.get_package(self.package_name)
self.store_old_paths = store_old_paths
@@ -577,10 +574,9 @@
ctx.ui.warning(_('File list could not be read for package %s, continuing removal.') % package_name)
self.files = pisi.files.Files()
- def run(self, filesdb = None):
+ def run(self):
"""Remove a single package"""
- if filesdb: self.filesdb = filesdb
ctx.ui.status(_('Removing package %s') % self.package_name)
ctx.ui.notify(pisi.ui.removing, package = self.package, files = self.files)
if not self.installdb.has_package(self.package_name):
@@ -591,7 +587,7 @@
self.run_preremove()
for fileinfo in self.files.list:
- self.remove_file(fileinfo, self.package_name, True, filesdb=filesdb)
+ self.remove_file(fileinfo, self.package_name, True)
self.run_postremove()
@@ -609,7 +605,7 @@
# is there any package who depends on this package?
@staticmethod
- def remove_file(fileinfo, package_name, remove_permanent=False, store_old_paths=None, filesdb=None):
+ def remove_file(fileinfo, package_name, remove_permanent=False, store_old_paths=None):
if fileinfo.permanent and not remove_permanent:
return
@@ -621,9 +617,7 @@
# package (this can legitimately occur while upgrading
# two packages such that a file has moved from one package to
# another as in #2911)
- if not filesdb:
- filesdb = pisi.db.filesldb.FilesLDB()
- pkg, existing_file = filesdb.get_file(fileinfo.path)
+ pkg, existing_file = ctx.filesdb.get_file(fileinfo.path)
if pkg and not pkg == package_name:
ctx.ui.warning(_('Not removing conflicted file : %s') % fpath)
return
@@ -690,17 +684,16 @@
def remove_pisi_files(self):
util.clean_dir(self.package.pkg_dir())
- def remove_db(self, filesdb=None):
+ def remove_db(self):
self.installdb.remove_package(self.package_name)
- if not filesdb: self.filesdb.remove_files(self.files.list)
- else: filesdb.remove_files(self.files.list)
+ ctx.filesdb.remove_files(self.files.list)
# FIX:DB
# # FIXME: something goes wrong here, if we use ctx operations ends up with segmentation fault!
# pisi.db.packagedb.remove_tracking_package(self.package_name)
-def remove_single(package_name, filesdb=None):
- Remove(package_name).run(filesdb=filesdb)
+def remove_single(package_name):
+ Remove(package_name).run()
def build(package):
# wrapper for build op
diff -Naur pisi~/context.py pisi/context.py
--- pisi~/context.py 2011-05-26 19:17:29.000000000 +0200
+++ pisi/context.py 2014-06-24 22:28:17.685246708 +0200
@@ -62,3 +62,5 @@
def keyboard_interrupt_pending():
return sig and sig.signal_pending(signal.SIGINT)
+
+filesdb = None
diff -Naur pisi~/operations/install.py pisi/operations/install.py
--- pisi~/operations/install.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/operations/install.py 2014-06-24 22:40:35.901219735 +0200
@@ -95,7 +95,6 @@
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
install_op = atomicoperations.Install.from_name(x)
paths.append(install_op.package_fname)
- install_op = None
# fetch to be installed packages but do not install them.
if ctx.get_option('fetch_only'):
@@ -108,7 +107,6 @@
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
install_op = atomicoperations.Install(path)
install_op.install(False)
- install_op = None
return True
diff -Naur pisi~/operations/remove.py pisi/operations/remove.py
--- pisi~/operations/remove.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/operations/remove.py 2014-06-24 22:37:47.963225871 +0200
@@ -24,11 +24,9 @@
import pisi.ui as ui
import pisi.db
-def remove(A, ignore_dep = False, ignore_safety = False, filesdb = None):
+def remove(A, ignore_dep = False, ignore_safety = False):
"""remove set A of packages from system (A is a list of package names)"""
- if not filesdb: filesdb = pisi.db.filesldb.FilesLDB()
-
componentdb = pisi.db.componentdb.ComponentDB()
installdb = pisi.db.installdb.InstallDB()
@@ -82,7 +80,7 @@
for x in order:
if installdb.has_package(x):
- atomicoperations.remove_single(x, filesdb=filesdb)
+ atomicoperations.remove_single(x)
else:
ctx.ui.info(_('Package %s is not installed. Cannot remove.') % x)
@@ -129,6 +127,6 @@
if remove(obsoletes, ignore_dep=True, ignore_safety=True):
raise Exception(_("Obsoleted packages remaining"))
-def remove_replaced_packages(replaced, filesdb=None):
- if remove(replaced, ignore_dep=True, ignore_safety=True, filesdb=filesdb):
+def remove_replaced_packages(replaced):
+ if remove(replaced, ignore_dep=True, ignore_safety=True):
raise Exception(_("Replaced package remains"))
diff -Naur pisi~/operations/upgrade.py pisi/operations/upgrade.py
--- pisi~/operations/upgrade.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/operations/upgrade.py 2014-06-24 22:40:50.745219193 +0200
@@ -205,7 +205,6 @@
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
install_op = atomicoperations.Install.from_name(x)
paths.append(install_op.package_fname)
- install_op = None
# fetch to be upgraded packages but do not install them.
if ctx.get_option('fetch_only'):
@@ -220,7 +219,6 @@
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
install_op = atomicoperations.Install(path, ignore_file_conflicts = True)
install_op.install(not ctx.get_option('compare_sha1sum'))
- install_op = None
def plan_upgrade(A, force_replaced=True, replaces=None):
# FIXME: remove force_replaced
diff -Naur pisi-cli~ pisi-cli
--- pisi-cli~ 2011-05-26 19:17:29.000000000 +0200
+++ pisi-cli 2014-06-25 18:24:25.499781521 +0200
@@ -79,4 +79,6 @@
signal.signal(signal.SIGTERM, sig_handler)
cli = pisicli.PisiCLI()
+ if cli.command.name[1] in "rdb sf".split():
+ ctx.filesdb = pisi.db.filesldb.FilesLDB()
cli.run_command()
-66
View File
@@ -1,66 +0,0 @@
# -*- coding: utf-8 -*-
#
# 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 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# ActionsAPI Modules
from pisi.actionsapi import get
from pisi.actionsapi import cmaketools
from pisi.actionsapi import shelltools
basename = "kde5"
prefix = "/%s" % get.defaultprefixDIR()
libdir = "%s/lib" % prefix
bindir = "%s/bin" % prefix
libexecdir = "%s/lib" % prefix
iconsdir = "%s/share/icons" % prefix
applicationsdir = "%s/share/applications/%s" % (prefix, basename)
mandir = "/%s" % get.manDIR()
sharedir = "%s/share" % prefix
localedir = "%s/share/locale" % prefix
qmldir = "%s/lib/qt5/qml" % prefix
plugindir = "%s/lib/qt5/plugins" % prefix
moduledir = "%s/lib/qt5/mkspecs/modules" % prefix
pythondir = "%s/bin/python" % prefix
appsdir = "%s" % sharedir
sysconfdir= "/etc"
configdir = "%s/xdg" % sysconfdir
servicesdir = "%s/services" % sharedir
servicetypesdir = "%s/servicetypes" % sharedir
includedir = "%s/include" % prefix
docdir = "/%s/%s" % (get.docDIR(), basename)
htmldir = "%s/html" % docdir
wallpapersdir = "%s/share/wallpapers" % prefix
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
''' parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1'''
shelltools.makedirs("build")
shelltools.cd("build")
cmaketools.configure("-DCMAKE_BUILD_TYPE=Release \
-DKDE_INSTALL_LIBEXECDIR=%s \
-DCMAKE_INSTALL_LIBDIR=lib \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DKDE_INSTALL_QMLDIR=%s \
-DKDE_INSTALL_SYSCONFDIR=%s \
-DKDE_INSTALL_PLUGINDIR=%s \
-DECM_MKSPECS_INSTALL_DIR=%s \
-DBUILD_TESTING=OFF \
-DKDE_INSTALL_LIBDIR=lib \
-Wno-dev \
-DCMAKE_INSTALL_PREFIX=%s %s" % (libexecdir, qmldir, sysconfdir, plugindir, moduledir, prefix, parameters), installPrefix, sourceDir)
shelltools.cd("..")
def make(parameters = ''):
cmaketools.make('-C build %s' % parameters)
def install(parameters = '', argument = 'install'):
cmaketools.install('-C build %s' % parameters, argument)
@@ -1,14 +0,0 @@
diff -Nuar a/pisi/actionsapi/kerneltools.py b/pisi/actionsapi/kerneltools.py
--- a/pisi/actionsapi/kerneltools.py 2014-03-08 00:03:46.000000000 +0200
+++ b/pisi/actionsapi/kerneltools.py 2020-01-05 19:42:38.461427561 +0300
@@ -268,7 +268,9 @@
#######################Workaround ends here ...
# make defconfig and install the headers
- autotools.make("%s defconfig" % make_cmd)
+ #autotools.make("%s defconfig" % make_cmd)
+ #kernel-5.4
+ autotools.make("%s mrproper" % make_cmd)
autotools.rawInstall(make_cmd, "headers_install")
oldwd = os.getcwd()
@@ -1,34 +0,0 @@
diff -Nuar pisi-2.6.old/pisi/actionsapi/kerneltools.py pisi-2.6/pisi/actionsapi/kerneltools.py
--- pisi-2.6.old/pisi/actionsapi/kerneltools.py 2014-03-08 00:03:46.000000000 +0200
+++ pisi-2.6/pisi/actionsapi/kerneltools.py 2019-01-14 07:07:34.637002938 +0300
@@ -187,13 +187,13 @@
def installHeaders(extraHeaders=None):
""" Install the files needed to build out-of-tree kernel modules. """
- extras = ["drivers/media/dvb-core",
- "drivers/media/dvb-frontends",
- "drivers/media/tuners",
- "drivers/media/platform"]
+ #extras = ["drivers/media/dvb-core",
+ # "drivers/media/dvb-frontends",
+ # "drivers/media/tuners",
+ # "drivers/media/platform"]
- if extraHeaders:
- extras.extend(extraHeaders)
+ #if extraHeaders:
+ # extras.extend(extraHeaders)
pruned = ["include", "scripts", "Documentation"]
wanted = ["Makefile*", "Kconfig*", "Kbuild*", "*.sh", "*.pl", "*.lds"]
@@ -215,8 +215,8 @@
shelltools.system(find_cmd)
# Install additional headers
- for headers in extras:
- shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
+ #for headers in extras:
+ # shelltools.system("cp -a %s/*.h %s/%s" % (headers, destination, headers))
# Install remaining headers
shelltools.system("cp -a %s %s" % (" ".join(pruned), destination))
-99
View File
@@ -1,99 +0,0 @@
# -*- coding: utf-8 -*-
import gettext
import pisi.actionsapi
import pisi.context as ctx
from pisi.actionsapi import get
from pisi.actionsapi.shelltools import system
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
class ConfigureError(pisi.actionsapi.Error):
def __init__(self, value=''):
pisi.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
class CompileError(pisi.actionsapi.Error):
def __init__(self, value=''):
pisi.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
class InstallError(pisi.actionsapi.Error):
def __init__(self, value=''):
pisi.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
def configure(parameters='', build_dir='build'):
"""
Configures the project into the build directory with the parameters using meson.
Args:
parameters (str): Extra parameters for the command. Default is empty string.
build_dir (str): Build directory. Default is 'build'.
Examples:
>>> mesontools.configure()
>>> mesontools.configure('extra parameters')
>>> mesontools.configure('extra parameters', 'custom_build_dir')
"""
default_parameters = ' '.join([
'--prefix=/%s' % get.defaultprefixDIR(),
'--bindir=/usr/bin',
'--datadir=/%s' % get.dataDIR(),
'--includedir=/usr/include',
'--infodir=/%s' % get.infoDIR(),
'--libdir=/%s' % ('usr/lib32' if get.buildTYPE() == 'emul32' else 'usr/lib'),
'--libexecdir=/%s' % get.libexecDIR(),
'--localedir=/usr/share/locale',
'--localstatedir=/%s' % get.localstateDIR(),
'--mandir=/%s' % get.manDIR(),
'--sbindir=/%s' % get.sbinDIR(),
'--sharedstatedir=com',
'--sysconfdir=/etc',
'--default-library=shared',
])
if system('meson setup %s %s %s' % (default_parameters, parameters, build_dir)):
raise ConfigureError(_('Configuration failed.'))
def build(parameters='', build_dir='build'):
"""
Builds the project into the build directory with the parameters using ninja. Instead of letting ninja
to detect number of cores, this function gets the number from PISI configurations.
Args:
parameters (str): Extra parameters for the command. Default is empty string.
build_dir (str): Build directory. Default is 'build'.
Examples:
>>> mesontools.build()
>>> mesontools.build('extra parameters')
>>> mesontools.build('extra parameters', 'custom_build_dir')
"""
if system('ninja -C %s %s %s' % (build_dir, parameters, get.makeJOBS())):
raise CompileError(_('Make failed.'))
def install(parameters='', build_dir='build'):
"""
Installs the project to the destination directory.
Args:
parameters (str): Extra parameters for the command. Default is empty string.
build_dir (str): Build directory. Default is 'build'.
Examples:
>>> mesontools.install()
>>> mesontools.install('extra parameters')
>>> mesontools.install('extra parameters', 'custom_build_dir')
"""
if system('DESTDIR=%s ninja -C %s %s install' % (get.installDIR(), build_dir, parameters, )):
raise InstallError(_('Install failed.'))
@@ -1,11 +0,0 @@
--- pisi/db/filesldb.py~ 2014-06-15 16:33:39.000000000 +0200
+++ pisi/db/filesldb.py 2014-06-17 18:29:52.356729861 +0200
@@ -27,7 +27,7 @@
self.files_ldb_path = os.path.join(ctx.config.info_dir(), ctx.const.files_ldb)
self.filesdb = plyvel.DB(self.files_ldb_path, create_if_missing=True)
if not [f for f in os.listdir(self.files_ldb_path) if f.endswith('.ldb')]:
- self.destroy()
+ if ctx.comar: self.destroy()
self.create_filesdb()
def __del__(self):
-277
View File
@@ -1,277 +0,0 @@
diff -Naur pisi~/cli/pisicli.py pisi/cli/pisicli.py
--- pisi~/cli/pisicli.py 2011-05-26 19:17:29.000000000 +0200
+++ pisi/cli/pisicli.py 2014-07-05 20:01:49.432333678 +0200
@@ -39,6 +39,7 @@
import pisi.cli.listavailable
import pisi.cli.listcomponents
import pisi.cli.listinstalled
+import pisi.cli.listorphaned
import pisi.cli.listpending
import pisi.cli.listrepo
import pisi.cli.listsources
@@ -46,6 +47,7 @@
import pisi.cli.rebuilddb
import pisi.cli.remove
import pisi.cli.removerepo
+import pisi.cli.removeorphaned
import pisi.cli.enablerepo
import pisi.cli.disablerepo
import pisi.cli.searchfile
diff -Naur pisi~/cli/listorphaned.py pisi/cli/listorphaned.py
--- pisi~/cli/listorphaned.py 1970-01-01 01:00:00.000000000 +0100
+++ pisi/cli/listorphaned.py 2014-09-15 22:22:18.827459865 +0200
@@ -0,0 +1,59 @@
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2014, marcin.bojara (at) gmail.com
+#
+# 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 2 of the License, or (at your option)
+# any later version.
+#
+# Please read the COPYING file.
+#
+
+import optparse
+
+import gettext
+__trans = gettext.translation('pisi', fallback=True)
+_ = __trans.ugettext
+
+import pisi.cli.command as command
+import pisi.context as ctx
+import pisi.util as util
+import pisi.db
+
+class ListOrphaned(command.Command):
+ __doc__ = _("""List orphaned packages
+
+Usage: list-orphaned
+
+Lists packages installed as dependency, but no longer needed by any other installed package.
+""")
+ __metaclass__ = command.autocommand
+
+ def __init__(self, args):
+ super(ListOrphaned, self).__init__(args)
+ self.installdb = pisi.db.installdb.InstallDB()
+
+ name = ("list-orphaned", "lo")
+
+ def options(self):
+
+ group = optparse.OptionGroup(self.parser, _("list-orphaned options"))
+ group.add_option("-a", "--all", action="store_true",
+ default=False, help=_("Show all packages without reverse dependencies"))
+ group.add_option("-x", "--exclude", action="append",
+ default=None, help=_("Ignore packages and components whose basenames match pattern."))
+ self.parser.add_option_group(group)
+
+ def run(self):
+
+ self.init(database = True, write = False)
+ orphaned = self.installdb.get_no_rev_deps() if self.options.all else self.installdb.get_orphaned()
+
+ if self.options.exclude:
+ orphaned = pisi.blacklist.exclude(orphaned, ctx.get_option('exclude'))
+
+ if orphaned:
+ ctx.ui.info(_("Orphaned packages:"))
+ ctx.ui.info(util.format_by_columns(sorted(orphaned)))
+ else: ctx.ui.info(_("No orphaned packages"))
diff -Naur pisi~/cli/removeorphaned.py pisi/cli/removeorphaned.py
--- pisi~/cli/removeorphaned.py 1970-01-01 01:00:00.000000000 +0100
+++ pisi/cli/removeorphaned.py 2014-09-15 22:22:37.484459184 +0200
@@ -0,0 +1,55 @@
+# -*- coding:utf-8 -*-
+#
+# Copyright (C) 2014, marcin.bojara (at) gmail.com
+#
+# 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 2 of the License, or (at your option)
+# any later version.
+#
+# Please read the COPYING file.
+#
+
+import optparse
+
+import gettext
+__trans = gettext.translation('pisi', fallback=True)
+_ = __trans.ugettext
+
+import pisi.cli.command as command
+import pisi.context as ctx
+import pisi.api
+import pisi.db
+
+class RemoveOrphaned(command.PackageOp):
+ __doc__ = _("""Remove orphaned packages
+
+Usage: remove-orphaned
+
+Remove all orphaned packages from the system.
+""")
+ __metaclass__ = command.autocommand
+
+ def __init__(self,args):
+ super(RemoveOrphaned, self).__init__(args)
+ self.installdb = pisi.db.installdb.InstallDB()
+
+ name = ("remove-orphaned", "ro")
+
+ def options(self):
+ group = optparse.OptionGroup(self.parser, _("remove-orphaned options"))
+
+ super(RemoveOrphaned, self).options(group)
+ group.add_option("-x", "--exclude", action="append",
+ default=None, help=_("When removing orphaned, ignore packages and components whose basenames match pattern."))
+
+ self.parser.add_option_group(group)
+
+ def run(self):
+
+ self.init(database = True, write = False)
+ orphaned = self.installdb.get_orphaned()
+ if ctx.get_option('exclude'):
+ orphaned = pisi.blacklist.exclude(orphaned, ctx.get_option('exclude'))
+
+ pisi.api.remove(orphaned)
diff -Naur pisi~/constants.py pisi/constants.py
--- pisi~/constants.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/constants.py 2014-08-14 20:51:46.437906848 +0200
@@ -104,6 +104,7 @@
self.__c.system_devel_component = "system.devel"
self.__c.devels_component = "programming.devel"
self.__c.docs_component = "programming.docs"
+ self.__c.installed_extra = "installedextra"
#file/directory permissions
self.__c.umask = 0022
diff -Naur pisi~/db/installdb.py pisi/db/installdb.py
--- pisi~/db/installdb.py 2014-06-15 16:33:39.000000000 +0200
+++ pisi/db/installdb.py 2014-08-31 16:59:29.586602738 +0200
@@ -67,6 +67,15 @@
def init(self):
self.installed_db = self.__generate_installed_pkgs()
self.rev_deps_db = self.__generate_revdeps()
+ self.installed_extra = self.__generate_installed_extra()
+
+ def __generate_installed_extra(self):
+ ie = []
+ ie_path = os.path.join(ctx.config.info_dir(), ctx.const.installed_extra)
+ if os.path.isfile(ie_path):
+ with open(ie_path) as ie_file:
+ ie.extend(ie_file.read().strip().split("\n"))
+ return ie
def __generate_installed_pkgs(self):
def split_name(dirname):
@@ -259,6 +268,19 @@
return rev_deps
+ def get_orphaned(self):
+ """
+ get list of packages installed as extra dependency,
+ but without reverse dependencies now.
+ """
+ return [x for x in self.installed_extra if not self.get_rev_deps(x)]
+
+ def get_no_rev_deps(self):
+ """
+ get installed packages list which haven't reverse dependencies.
+ """
+ return [x for x in self.installed_db if not self.get_rev_deps(x)]
+
def pkg_dir(self, pkg, version, release):
return pisi.util.join_path(ctx.config.packages_dir(), pkg + '-' + version + '-' + release)
diff -Naur pisi~/operations/install.py pisi/operations/install.py
--- pisi~/operations/install.py 2014-09-15 22:14:00.381478078 +0200
+++ pisi/operations/install.py 2014-07-03 18:54:49.000000000 +0200
@@ -27,7 +27,7 @@
import pisi.ui as ui
import pisi.db
-def install_pkg_names(A, reinstall = False):
+def install_pkg_names(A, reinstall = False, extra = False):
"""This is the real thing. It installs packages from
the repository, trying to perform a minimum number of
installs"""
@@ -78,7 +78,8 @@
if ctx.get_option('dry_run'):
return True
- if set(order) - A_0:
+ extra_packages = set(order) - A_0
+ if extra_packages:
if not ctx.ui.confirm(_('There are extra packages due to dependencies. Do you want to continue?')):
return False
@@ -91,10 +92,18 @@
conflicts = operations.helper.check_conflicts(order, packagedb)
paths = []
+ extra_paths = {}
for x in order:
ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow"))
install_op = atomicoperations.Install.from_name(x)
paths.append(install_op.package_fname)
+ if x in extra_packages or (extra and x in A):
+ extra_paths[install_op.package_fname] = x
+ elif reinstall and x in installdb.installed_extra:
+ installdb.installed_extra.remove(x)
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "w") as ie_file:
+ ie_file.write("\n".join(installdb.installed_extra) + ("\n" if installdb.installed_extra else ""))
+
# fetch to be installed packages but do not install them.
if ctx.get_option('fetch_only'):
@@ -107,6 +116,12 @@
ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow"))
install_op = atomicoperations.Install(path)
install_op.install(False)
+ try:
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "a") as ie_file:
+ ie_file.write("%s\n" % extra_paths[path])
+ installdb.installed_extra.append(extra_paths[path])
+ except KeyError:
+ pass
return True
@@ -199,7 +214,7 @@
ctx.ui.info(util.format_by_columns(sorted(extra_packages)))
if not ctx.ui.confirm(_('Do you want to continue?')):
raise Exception(_('External dependencies not satisfied'))
- install_pkg_names(extra_packages, reinstall=True)
+ install_pkg_names(extra_packages, reinstall=True, extra=True)
class PackageDB:
def get_package(self, key, repo = None):
diff -Naur pisi~/operations/remove.py pisi/operations/remove.py
--- pisi~/operations/remove.py 2014-09-15 22:14:00.381478078 +0200
+++ pisi/operations/remove.py 2014-07-03 18:54:49.000000000 +0200
@@ -10,6 +10,7 @@
# Please read the COPYING file.
#
+import os
import sys
import gettext
@@ -81,6 +82,11 @@
for x in order:
if installdb.has_package(x):
atomicoperations.remove_single(x)
+ if x in installdb.installed_extra:
+ installdb.installed_extra.remove(x)
+ with open(os.path.join(ctx.config.info_dir(), ctx.const.installed_extra), "w") as ie_file:
+ ie_file.write("\n".join(installdb.installed_extra) + ("\n" if installdb.installed_extra else ""))
+
else:
ctx.ui.info(_('Package %s is not installed. Cannot remove.') % x)
@@ -1,15 +0,0 @@
diff -Nuar pisi-2.6-OSmanOS/pisi/actionsapi/pisitools.py pisi-2.6/pisi/actionsapi/pisitools.py
--- pisi-2.6-OSmanOS/pisi/actionsapi/pisitools.py 2014-03-08 00:03:46.000000000 +0200
+++ pisi-2.6/pisi/actionsapi/pisitools.py 2014-12-07 20:32:05.111207119 +0200
@@ -41,6 +41,11 @@
''' example call: pisitools.dobin("bin/xloadimage", "/bin", "xload") '''
executable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
+def dopixmaps(sourceFile, destinationDirectory = '/usr/share/pixmaps'):
+ '''insert a data file into /usr/share/pixmaps'''
+ ''' example call: pisitools.dopixmaps("/usr/share/pixmaps/firefox", "firefox") '''
+ readable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
+
def dodir(destinationDirectory):
'''creates a directory tree'''
makedirs(join_path(get.installDIR(), destinationDirectory))
-49
View File
@@ -1,49 +0,0 @@
[build]
build_host = localhost
# buildhelper = None
commonflags = -mtune=atom -march=i686 -O2 -pipe -fomit-frame-pointer -fstack-protector -D_FORTIFY_SOURCE=2 -ggdb3 -funwind-tables -fasynchronous-unwind-tables
cflags = %(commonflags)s
cxxflags = %(commonflags)s
host = i686-pc-linux-gnu
cc = %(host)s-gcc
cxx = %(host)s-g++
compressionlevel = 9
enableSandbox = True
fallback = http://source.pisilinux.org/1.0
generateDebug = False
jobs = -j5
ldflags = -Wl,-O1 -Wl,-z,relro -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--sort-common
ignored_build_types = emul32,_emul32
[directories]
cache_root_dir = /var/cache/pisi
archives_dir = %(cache_root_dir)s/archives
cached_packages_dir = %(cache_root_dir)s/packages
compiled_packages_dir = %(cache_root_dir)s/packages
debug_packages_dir = %(cache_root_dir)s/packages-debug
lib_dir = /var/lib/pisi
history_dir = %(lib_dir)s/history
index_dir = %(lib_dir)s/index
info_dir = %(lib_dir)s/info
kde_dir = /usr
lock_dir = /run/lock/subsys
log_dir = /var/log
packages_dir = %(lib_dir)s/package
qt_dir = /usr
tmp_dir = /var/pisi
[general]
architecture = i686
autoclean = False
bandwidth_limit = 0
destinationdirectory = /
distribution = PisiLinux
distribution_release = 2.0
distribution_id = p2
# ftp_proxy = None
# http_proxy = None
# https_proxy = None
ignore_delta = False
ignore_safety = False
package_cache = False
package_cache_limit = 0
@@ -1,32 +0,0 @@
for managing CFLAGS, CXXFLAGS and LDFLAGS you can use pisitools
for CFLAGGS -> pisitools.cflags
for LDFLAGGS -> pisitools.ldflags
for CXXFLAGGS -> pisitools.cxxflags
for both CFLAGGS and CXXFLAGS -> pisitools.flags
available operations:
add("param1", "param2", ..., "paramN")
e.g.
pisitools.cxxflags.add("-fpermisive")
-> shelltools.export("CXXFLAGS", "%s -fpermisive" % get.CXXFLAGS())
pisitools.flags.add("-fno-strict-aliasing", "-fPIC")
-> shelltools.export("CFLAGS", "%s -fno-strict-aliasing -fPIC" % get.CFLAGS())
-> shelltools.export("CXXFLAGS", "%s -ffno-strict-aliasing -fPIC" % get.CXXFLAGS())
remove("param1", "param2", ..., "paramN")
e.g.
pisitools.cflags.remove("-fno-strict-aliasing")
-> shelltools.export("CFLAGS", get.CFLAGS().replace("-fno-strict-aliasing", ""))
replace("old value", "new value")
e.g.
pisitools.cflags.replace("-O2", "-O3")
-> shelltools.export("CFLAGS", get.CFLAGS().replace("-O2", "-O3"))
sub(pattern, repl, count, flags)
works like re.sub(pattern, repl, string, count, flags) for specified flags
e.g.
pisitools.cflags.replace("-O\d", "-Os")
-> import re
-> shelltools.export("CFLAGS", re.sub("-O\d", "-Os", get.CFLAGS()))
-139
View File
@@ -1,139 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 TUBITAK/UEKAE
#
# 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 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# Standart Python Modules
import subprocess
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# PiSi Modules
import pisi.context as ctx
import pisi.actionsapi
class PkgconfigError(pisi.actionsapi.Error):
def __init__(self, value=''):
pisi.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
def getVariableForLibrary(library, variable):
# Returns a specific variable provided in the library .pc file
try:
proc = subprocess.Popen(["pkg-config",
"--variable=%s" % variable,
"%s" % library],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_code = proc.wait()
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
if return_code == 0 and proc.stdout:
return proc.stdout.read().strip()
else:
# Command failed
raise PkgconfigError(proc.stderr.read().strip())
def getLibraryVersion(library):
"""Returns the module version provided in the library .pc file."""
try:
proc = subprocess.Popen(["pkg-config",
"--modversion",
library],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_code = proc.wait()
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
if return_code == 0 and proc.stdout:
return proc.stdout.read().strip()
else:
# Command failed
raise PkgconfigError(proc.stderr.read().strip())
def getLibraryCFLAGS(library):
"""Returns compiler flags for compiling with this library.
Ex: -I/usr/include/nss"""
try:
proc = subprocess.Popen(["pkg-config",
"--cflags",
"%s" % library],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_code = proc.wait()
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
if return_code == 0 and proc.stdout:
return proc.stdout.read().strip()
else:
# Command failed
raise PkgconfigError(proc.stderr.read().strip())
def getLibraryLIBADD(library):
"""Returns linker flags for linking with this library.
Ex: -lpng14"""
try:
proc = subprocess.Popen(["pkg-config",
"--libs",
"%s" % library],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_code = proc.wait()
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
if return_code == 0 and proc.stdout:
return proc.stdout.read().strip()
else:
# Command failed
raise PkgconfigError(proc.stderr.read().strip())
def runManualCommand(*args):
"""Runs the given command and returns the output."""
cmd = ["pkg-config"]
cmd.extend(args)
try:
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_code = proc.wait()
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
if return_code == 0 and proc.stdout:
return proc.stdout.read().strip()
else:
# Command failed
raise PkgconfigError(proc.stderr.read().strip())
def libraryExists(library):
"""Returns True if the library provides a .pc file."""
result = None
try:
result = subprocess.call(["pkg-config",
"--exists",
"%s" % library])
except OSError, exception:
if exception.errno == 2:
raise PkgconfigError(_("pkg-config is not installed on your system."))
else:
return result == 0
-75
View File
@@ -1,75 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 TUBITAK/UEKAE
#
# 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 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
import glob
import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
# Pisi Modules
import pisi.context as ctx
# ActionsAPI Modules
import pisi.actionsapi
# ActionsAPI Modules
from pisi.actionsapi import get
from pisi.actionsapi import cmaketools
from pisi.actionsapi import shelltools
basename = "qt5"
prefix = "/%s" % get.defaultprefixDIR()
libdir = "%s/lib" % prefix
libexecdir = "%s/libexec" % prefix
sysconfdir= "/etc"
bindir = "%s/bin" % prefix
includedir = "%s/include" % prefix
# qt5 spesific variables
headerdir = "%s/include/%s" % (prefix, basename)
datadir = "%s/share/%s" % (prefix, basename)
docdir = "/%s/%s" % (get.docDIR(), basename)
archdatadir = "%s/%s" % (libdir, basename)
examplesdir = "%s/%s/examples" % (libdir, basename)
importdir = "%s/%s/imports" % (libdir, basename)
plugindir = "%s/%s/plugins" % (libdir, basename)
qmldir = "%s/%s/qml" % (libdir, basename)
testdir = "%s/share/%s" % (prefix, basename)
translationdir = "%s/translations" % datadir
#Temporary bindir to avoid qt4 conflicts
#qmake = "%s/qmake-qt5" % bindir
qmake = "%s/qmake" % bindir
class ConfigureError(pisi.actionsapi.Error):
def __init__(self, value=''):
pisi.actionsapi.Error.__init__(self, value)
self.value = value
ctx.ui.error(value)
def configure(projectfile='', parameters='', installPrefix=prefix):
if projectfile != '' and not shelltools.can_access_file(projectfile):
raise ConfigureError(_("Project file '%s' not found.") % projectfile)
profiles = glob.glob("*.pro")
if len(profiles) > 1 and projectfile == '':
raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: %s)") % ", ".join(profiles))
shelltools.system("%s -makefile %s PREFIX='%s' QMAKE_CFLAGS+='%s' QMAKE_CXXFLAGS+='%s' %s" % (qmake, projectfile, installPrefix, get.CFLAGS(), get.CXXFLAGS(), parameters))
def make(parameters=''):
cmaketools.make(parameters)
def install(parameters='', argument='install'):
cmaketools.install('INSTALL_ROOT="%s" %s' % (get.installDIR(), parameters), argument)
@@ -1,64 +0,0 @@
diff -Nuar a/pisi/comariface.py b/pisi/comariface.py
--- a/pisi/comariface.py 2011-05-26 20:17:29.000000000 +0300
+++ b/pisi/comariface.py 2020-01-08 18:44:29.795094390 +0300
@@ -10,16 +10,17 @@
# Please read the COPYING file.
#
+import gettext
import os
-import time
import string
+import time
+
+import pisi
+import pisi.context as ctx
-import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
-import pisi
-import pisi.context as ctx
class Error(pisi.Error):
pass
@@ -30,10 +31,12 @@
except ImportError:
raise Error(_("comar-api package is not fully installed"))
+
def is_char_valid(char):
"""Test if char is valid object path character."""
return char in string.ascii_letters + string.digits + "_"
+
def is_method_missing(exception):
"""Tells if exception is about missing method in COMAR script"""
if exception._dbus_error_name in ("tr.org.pardus.comar.python.missing",
@@ -41,6 +44,7 @@
return True
return False
+
def safe_script_name(package):
"""Generates DBus-safe object name for package script names."""
object = package
@@ -51,6 +55,7 @@
object = '_%s' % object
return object
+
def get_link():
"""Connect to the COMAR daemon and return the link."""
@@ -190,8 +195,7 @@
link = get_link()
package_name = safe_script_name(package_name)
- scripts = set([safe_script_name(s.name) for s \
- in provided_scripts if s.name])
+ scripts = set([safe_script_name(s.name) for s in provided_scripts if s.name])
scripts.add(package_name)
if package_name in list(link.System.Package):
+9 -12
View File
@@ -12,11 +12,7 @@
<IsA>app:console</IsA>
<Summary>PISI is the package management system of Pisi Linux</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="379befb46ec1816f2ea35492bae3e3dda6c3cb93" type="targz">https://github.com/PisiLinuxNew/pisi/archive/v2.7.tar.gz</Archive>
<AdditionalFiles>
<AdditionalFile permission="0644" target="pisi.conf-i686">pisi.conf-i686</AdditionalFile>
<AdditionalFile permission="0644" target="pisi.conf-x86_64">pisi.conf-x86_64</AdditionalFile>
</AdditionalFiles>
<Archive sha1sum="227a4a01f7686892c0ad44bce5c95cc2e634cc50" type="targz">https://github.com/PisiLinuxNew/pisi/archive/v2.7.1.tar.gz</Archive>
<BuildDependencies>
<Dependency>comar</Dependency>
<Dependency>plyvel</Dependency>
@@ -26,9 +22,6 @@
<Dependency>intltool</Dependency>
<Dependency versionFrom="1.18">leveldb-devel</Dependency>
</BuildDependencies>
<Patches>
<Patch>kerneltools_extra_headers_moved.patch</Patch>
</Patches>
</Source>
<Package>
@@ -68,11 +61,8 @@
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/mirrors.conf">mirrors.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/sandbox.conf">sandbox.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/share/mime/packages/pisi.xml">pisi.xml</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/pkgconfig.py">pkgconfig.py</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/etc/pisi/pisi.conf">pisi.conf</AdditionalFile>
<AdditionalFile target="/usr/lib/tmpfiles.d/pisi.conf" permission="0644" owner="root">tmpfiles.conf</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/qt5.py">qt5.py</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/kde5.py">kde5.py</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/pisilinux/pisi/actionsapi/mesontools.py">mesontools.py</AdditionalFile>
</AdditionalFiles>
<Provides>
<COMAR script="package.py">System.Package</COMAR>
@@ -81,6 +71,13 @@
</Package>
<History>
<Update release="13">
<Date>2020-01-10</Date>
<Version>2.7.1</Version>
<Comment>Version bump</Comment>
<Name>Safa Arıman</Name>
<Email>safa@ariman.gen.tr</Email>
</Update>
<Update release="12">
<Date>2020-01-08</Date>
<Version>2.7</Version>