Kaydet (Commit) 297424b7 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Fixed merge problems

Depolar arasındaki bu karmaşa ciddi sorunlara neden olabiliyor
üst cb55239e
PREFIX=/
all: build install
clean:
`find | grep pycache | sed 's/^/rm -rf /g'`
rm -rf build
build:
python3 setup.py build
install:
python3 setup.py install --prefix=$(PREFIX)
install inary-cli $(PREFIX)usr/bin/inary
# -*- coding: utf-8 -*-
#
# documentation build configuration file, created by
# sphinx-quickstart on Wen Feb 7 18:41:23 2018
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed
# automatically).
#
# All configuration values have a default value; values that are commented out
# serve to show the default value.
import sys
import os
# pip install sphinx_rtd_theme
# import sphinx_rtd_theme
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
VERSION = '1.0'
AUTHOR = 'Zaryob'
# General configuration
# ---------------------
# Add any Sphinx extension module names here, as strings.
# They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
# Later on, add 'sphinx.ext.viewcode' to the list if you want to have
# colorized code generated too for references.
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General substitutions.
project = 'Inary Documentation'
copyright = "2016-2017 Zaryob"
# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
#
# The short X.Y version.
version = VERSION
# The full version, including alpha/beta/rc tags.
release = VERSION
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
today_fmt = '%B %d, %Y'
# List of documents that shouldn't be included in the build.
# unused_docs = []
# List of directories, relative to source directories, that shouldn't be
# searched for source files.
# exclude_dirs = []
# A list of glob-style patterns that should be excluded when looking
# for source files.
exclude_patterns = ['modules']
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
highlight_language = 'YAML+Jinja'
# Substitutions, variables, entities, & shortcuts for text which do not need to link to anything.
# For titles which should be a link, use the intersphinx anchors set at the index, chapter, and
# section levels, such as qi_start_:
rst_epilog = """
"""
# Options for HTML output
# -----------------------
html_theme_path = ['../_themes']
html_theme = 'highlight'
html_short_title = 'Inary Documentation'
# The style sheet to use for HTML and HTML Help pages. A file of that name
# must exist either in Sphinx' static/ path, or in one of the custom paths
# given in html_static_path.
# html_style = 'solar.css'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
html_title = 'Inary Documentation'
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (within the static path) to place at the top of
# the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
html_favicon = 'favicon.ico'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['.static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
# html_use_modindex = True
# If false, no index is generated.
# html_use_index = True
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, the reST sources are included in the HTML build as _sources/<name>.
html_copy_source = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = ''
# Output file base name for HTML help builder.
htmlhelp_basename = 'Poseidodoc'
# Options for LaTeX output
# ------------------------
# The paper size ('letter' or 'a4').
# latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
# latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, document class
# [howto/manual]).
latex_documents = [
('index', 'ansible.tex', 'Ansible 2.2 Documentation', AUTHOR, 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# Additional stuff for the LaTeX preamble.
# latex_preamble = ''
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_use_modindex = True
autoclass_content = 'both'
intersphinx_mapping = {'python3': ('https://docs.python.org/3/', (None, '../python3-3.6.2.inv')),
'jinja2': ('http://jinja.pocoo.org/docs/', (None, '../jinja2-2.9.7.inv'))}
......@@ -61,13 +61,10 @@ def curPYTHON():
def curPERL():
""" returns currently used perl's version"""
<<<<<<< HEAD
# for i in os.listdir("/usr/bin"):
# if i.startswith("perl"):
# if i.split("perl")[1]
=======
>>>>>>> master
return os.path.realpath('/usr/bin/perl').split('perl')[1]
......
......@@ -12,10 +12,6 @@
# Please read the COPYING file.
"""supports globs in sourceFile arguments"""
<<<<<<< HEAD
=======
>>>>>>> master
import filecmp
import fileinput
......@@ -93,12 +89,8 @@ def readable_insinto(destinationDirectory, *sourceFiles):
for source in sourceFileGlob:
system('install -m 0644 "{0}" {1}'.format(source, destinationDirectory))
<<<<<<< HEAD
def lib_insinto(sourceFile, destinationDirectory, permission=644):
=======
def lib_insinto(sourceFile, destinationDirectory, permission = 644):
>>>>>>> master
"""inserts a library fileinto destinationDirectory with given permission"""
if not sourceFile or not destinationDirectory:
......@@ -114,21 +106,13 @@ def lib_insinto(sourceFile, destinationDirectory, permission = 644):
# inarytools funtions
<<<<<<< HEAD
def dobin(sourceFile, destinationDirectory='/usr/bin'):
=======
def dobin(sourceFile, destinationDirectory = '/usr/bin'):
>>>>>>> master
"""insert a executable file into /bin or /usr/bin"""
''' example call: inarytools.dobin("bin/xloadimage", "/bin", "xload") '''
executable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
<<<<<<< HEAD
def dopixmaps(sourceFile, destinationDirectory='/usr/share/pixmaps'):
=======
def dopixmaps(sourceFile, destinationDirectory = '/usr/share/pixmaps'):
>>>>>>> master
"""insert a data file into /usr/share/pixmaps"""
''' example call: inarytools.dopixmaps("/usr/share/pixmaps/firefox", "firefox") '''
readable_insinto(join_path(get.installDIR(), destinationDirectory), sourceFile)
......@@ -182,12 +166,8 @@ def doinfo(*sourceFiles):
"""inserts the into files in the list of files into /usr/share/info"""
readable_insinto(join_path(get.installDIR(), get.infoDIR()), *sourceFiles)
<<<<<<< HEAD
def dolib(sourceFile, destinationDirectory='/usr/lib', mode=755):
=======
def dolib(sourceFile, destinationDirectory = '/usr/lib', mode=755):
>>>>>>> master
"""insert the library into /usr/lib"""
'''example call: inarytools.dolib("libz.a")'''
'''example call: inarytools.dolib("libz.so")'''
......@@ -229,12 +209,8 @@ def doman(*sourceFiles):
else:
uncompress(compressed, targetDir=manPDIR)
<<<<<<< HEAD
def domo(sourceFile, locale, destinationFile, localeDirPrefix='/usr/share/locale'):
=======
def domo(sourceFile, locale, destinationFile, localeDirPrefix = '/usr/share/locale'):
>>>>>>> master
"""inserts the mo files in the list of files into /usr/share/locale/LOCALE/LC_MESSAGES"""
'''example call: inarytools.domo("po/tr.po", "tr", "pam_login.mo")'''
......@@ -243,12 +219,8 @@ def domo(sourceFile, locale, destinationFile, localeDirPrefix = '/usr/share/loca
makedirs('{0}{1}/{2}/LC_MESSAGES/'.format(get.installDIR(), localeDirPrefix, locale))
move('messages.mo', '{0}{1}/{2}/LC_MESSAGES/{3}'.format(get.installDIR(), localeDirPrefix, locale, destinationFile))
<<<<<<< HEAD
def domove(sourceFile, destination, destinationFile=''):
=======
def domove(sourceFile, destination, destinationFile = ''):
>>>>>>> master
"""moves sourceFile/Directory into destinationFile/Directory"""
''' example call: inarytools.domove("/usr/bin/bash", "/bin/bash")'''
......@@ -279,12 +251,8 @@ def rename(sourceFile, destinationFile):
except OSError as e:
error(_('ActionsAPI [rename]: {0}: {1}').format(e, sourceFile))
<<<<<<< HEAD
def dosed(sources, findPattern, replacePattern='', filePattern='', deleteLine=False, level=-1):
=======
def dosed(sources, findPattern, replacePattern = '', filePattern = '', deleteLine = False, level = -1):
>>>>>>> master
"""replaces patterns in sources"""
''' example call: inarytools.dosed("/etc/passwd", "caglar", "cem")'''
......@@ -341,12 +309,8 @@ def dosed(sources, findPattern, replacePattern = '', filePattern = '', deleteLin
else:
raise FileError(_('File does not exist or permission denied: {}').format(sourceFile))
<<<<<<< HEAD
def dosbin(sourceFile, destinationDirectory='/usr/sbin'):
=======
def dosbin(sourceFile, destinationDirectory = '/usr/sbin'):
>>>>>>> master
"""insert a executable file into /sbin or /usr/sbin"""
''' example call: inarytools.dobin("bin/xloadimage", "/sbin") '''
......@@ -364,12 +328,8 @@ def dosym(sourceFile, destinationFile):
except OSError:
error(_('ActionsAPI [dosym]: File already exists: {}').format(destinationFile))
<<<<<<< HEAD
def insinto(destinationDirectory, sourceFile, destinationFile='', sym=True):
=======
def insinto(destinationDirectory, sourceFile, destinationFile = '', sym = True):
>>>>>>> master
"""insert a sourceFile into destinationDirectory as a destinationFile with same uid/guid/permissions"""
makedirs(join_path(get.installDIR(), destinationDirectory))
......@@ -388,10 +348,6 @@ def insinto(destinationDirectory, sourceFile, destinationFile = '', sym = True)
def newdoc(sourceFile, destinationFile):
"""inserts a sourceFile into /usr/share/doc/PACKAGE/ directory as a destinationFile"""
<<<<<<< HEAD
=======
destinationDirectory = '' #490
>>>>>>> master
destinationDirectory = os.path.dirname(destinationFile)
destinationFile = os.path.basename(destinationFile)
# Use copy instead of move or let build-install scream like file not found!
......
......@@ -41,12 +41,8 @@ docdir = "/{0}/{1}".format(get.docDIR(), basename)
htmldir = "{}/html".format(docdir)
wallpapersdir = "{}/share/wallpapers".format(prefix)
<<<<<<< HEAD
def configure(parameters='', installPrefix=prefix, sourceDir='..'):
=======
def configure(parameters = '', installPrefix = prefix, sourceDir = '..'):
>>>>>>> master
""" parameters -DLIB_INSTALL_DIR="hede" -DSOMETHING_USEFUL=1"""
shelltools.makedirs("build")
......
......@@ -24,10 +24,6 @@ __trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
import gettext
__trans = gettext.translation('inary', fallback=True)
_ = __trans.gettext
class MesonError(inary.actionsapi.Error):
def __init__(self, value=''):
inary.actionsapi.Error.__init__(self, value)
......
......@@ -52,12 +52,8 @@ class InstallError(inary.actionsapi.Error):
self.value = value
ctx.ui.error(value)
<<<<<<< HEAD
def configure(parameters=''):
=======
def configure(parameters = ''):
>>>>>>> master
"""configure source with given parameters."""
export('PERL_MM_USE_DEFAULT', '1')
if can_access_file('Build.PL'):
......@@ -68,12 +64,8 @@ def configure(parameters = ''):
get.installDIR())):
raise ConfigureError(_('Configure failed.'))
<<<<<<< HEAD
def make(parameters=''):
=======
def make(parameters = ''):
>>>>>>> master
"""make source with given parameters."""
if can_access_file('Makefile'):
if system('make {}'.format(parameters)):
......@@ -82,12 +74,8 @@ def make(parameters = ''):
if system('perl{0} Build {1}'.format(get.curPERL(), parameters)):
raise MakeError(_('perl build failed.'))
<<<<<<< HEAD
def install(parameters='install'):
=======
def install(parameters = 'install'):
>>>>>>> master
"""install source with given parameters."""
if can_access_file('Makefile'):
if system('make {}'.format(parameters)):
......@@ -99,12 +87,8 @@ def install(parameters = 'install'):
removePacklist()
removePodfiles()
<<<<<<< HEAD
def removePacklist(path='usr/lib/perl5/'):
=======
def removePacklist(path = 'usr/lib/perl5/'):
>>>>>>> master
""" cleans .packlist file from perl packages """
full_path = '{0}/{1}'.format(get.installDIR(), path)
for root, dirs, files in os.walk(full_path):
......@@ -114,12 +98,8 @@ def removePacklist(path = 'usr/lib/perl5/'):
unlink('{0}/{1}'.format(root, packFile))
removeEmptydirs(root)
<<<<<<< HEAD
def removePodfiles(path='usr/lib/perl5/'):
=======
def removePodfiles(path = 'usr/lib/perl5/'):
>>>>>>> master
""" cleans *.pod files from perl packages """
full_path = '{0}/{1}'.format(get.installDIR(), path)
for root, dirs, files in os.walk(full_path):
......
......@@ -57,32 +57,20 @@ class RunTimeError(inary.actionsapi.Error):
self.value = value
ctx.ui.error(value)
<<<<<<< HEAD
def configure(parameters='', pyVer=''):
=======
def configure(parameters = '', pyVer = ''):
>>>>>>> master
"""does python setup.py configure"""
if system('python{0} setup.py configure {1}'.format(pyVer, parameters)):
raise ConfigureError(_('Configuration failed.'))
<<<<<<< HEAD
def compile(parameters='', pyVer=''):
=======
def compile(parameters = '', pyVer = ''):
>>>>>>> master
"""compile source with given parameters."""
if system('python{0} setup.py build {1}'.format(pyVer, parameters)):
raise CompileError(_('Make failed.'))
<<<<<<< HEAD
def install(parameters='', pyVer=''):
=======
def install(parameters = '', pyVer = ''):
>>>>>>> master
"""does python setup.py install"""
if system('python{0} setup.py install --root={1} --no-compile -O0 {2}'.format(pyVer, get.installDIR(), parameters)):
raise InstallError(_('Install failed.'))
......@@ -96,26 +84,16 @@ def install(parameters = '', pyVer = ''):
if not isEmpty(doc):
dodoc(doc)
<<<<<<< HEAD
def run(parameters='', pyVer=''):
=======
def run(parameters = '', pyVer = ''):
>>>>>>> master
"""executes parameters with python"""
if system('python{0} {1}'.format(pyVer, parameters)):
raise RunTimeError(_('Running {} failed.').format(parameters))
<<<<<<< HEAD
def fixCompiledPy(lookInto='/usr/lib/{}/'.format(get.curPYTHON())):
""" cleans *.py[co] from packages """
for root, dirs, files in os.walk('{0}/{1}'.format(get.installDIR(), lookInto)):
=======
def fixCompiledPy(lookInto = '/usr/lib/{}/'.format(get.curPYTHON())):
""" cleans *.py[co] from packages """
for root, dirs, files in os.walk('{0}/{1}'.format(get.installDIR(),lookInto)):
>>>>>>> master
for compiledFile in files:
if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'):
if can_access_file('{0}/{1}'.format(root, compiledFile)):
......
......@@ -102,12 +102,8 @@ def auto_dodoc():
def install(parameters=''):
"""does ruby setup.rb install"""
<<<<<<< HEAD
if system(
'ruby -w setup.rb --prefix=/{0.defaultprefixDIR()} --destdir={0.installDIR()} {1}'.format(get, parameters)):
=======
if system('ruby -w setup.rb --prefix=/{0.defaultprefixDIR()} --destdir={0.installDIR()} {1}'.format(get, parameters)):
>>>>>>> master
raise InstallError(_('Install failed.'))
auto_dodoc()
......
......@@ -61,12 +61,8 @@ def echo(destionationFile, content):
except IOError:
error(_('ActionsAPI [echo]: Can\'t append to file {}.').format(destionationFile))
<<<<<<< HEAD
def chmod(filePath, mode=0o755):
=======
def chmod(filePath, mode = 0o755):
>>>>>>> master
"""change the mode of filePath to the mode"""
filePathGlob = glob.glob(filePath)
if len(filePathGlob) == 0:
......@@ -81,12 +77,8 @@ def chmod(filePath, mode = 0o755):
else:
ctx.ui.error(_('ActionsAPI [chmod]: File {} doesn\'t exists.').format(fileName))
<<<<<<< HEAD
def chown(filePath, uid='root', gid='root'):
=======
def chown(filePath, uid = 'root', gid = 'root'):
>>>>>>> master
"""change the owner and group id of filePath to uid and gid"""
if can_access_file(filePath):
try:
......@@ -158,13 +150,8 @@ def move(source, destination):
# FIXME: instead of passing a sym parameter, split copy and copytree into 4 different function
<<<<<<< HEAD
def copy(source, destination, sym=True):
"""recursively copy a "source" file or directory to "destination\" """
=======
def copy(source, destination, sym = True):
"""recursively copy a "source" file or directory to "destination\""""
>>>>>>> master
sourceGlob = glob.glob(source)
if len(sourceGlob) == 0:
error(_("ActionsAPI [copy]: No file matched pattern \"{}\".").format(source))
......@@ -192,12 +179,8 @@ def copy(source, destination, sym = True):
else:
error(_('ActionsAPI [copy]: File {} does not exist.').format(filePath))
<<<<<<< HEAD
def copytree(source, destination, sym=True):
=======
def copytree(source, destination, sym = True):
>>>>>>> master
"""recursively copy an entire directory tree rooted at source"""
if isDirectory(source):
if os.path.exists(destination):
......@@ -232,12 +215,8 @@ def touch(filePath):
except IOError:
error(_('ActionsAPI [touch]: Permission denied: {}').format(filePath))
<<<<<<< HEAD
def cd(directoryName=''):
=======
def cd(directoryName = ''):
>>>>>>> master
"""change directory"""
current = os.getcwd()
if directoryName:
......
......@@ -51,12 +51,8 @@ class RunTimeError(inary.actionsapi.Error):
self.value = value
ctx.ui.error(value)
<<<<<<< HEAD
def compile(parameters=''):
=======
def compile(parameters = ''):
>>>>>>> master
"""compiling texlive packages"""
# Move sources according to tplobj files
......@@ -69,12 +65,8 @@ def compile(parameters = ''):
if buildFormatFiles():
raise CompileError(_('Building format files failed'))
<<<<<<< HEAD
def install(parameters=''):
=======
def install(parameters = ''):
>>>>>>> master
"""Installing texlive packages"""
# Create symlinks from format to engines
......@@ -162,11 +154,7 @@ def installConfigFiles():
def handleConfigFiles():
"""Handling config files"""
<<<<<<< HEAD
for root, dirs, files in os.walk("{}/usr/share/texmf".format(get.installDIR())):
=======
for root, dirs,files in os.walk("{}/usr/share/texmf".format(get.installDIR())):
>>>>>>> master
if not ("config" in root or "doc" in root):
for configFile in files:
if configFile.endswith(("cfg", "cnf")):
......
......@@ -48,10 +48,7 @@ def exportFlags():
class Env(object):
"""General environment variables used in actions API"""
<<<<<<< HEAD
=======
>>>>>>> master
def __init__(self):
exportFlags()
......
......@@ -70,11 +70,5 @@ class Dependency(relation.Relation, metaclass=autoxml.autoxml):
return self.satisfies_relation(pkg.version, pkg.release)
# Added for AnyDependency, single Dependency always returns False
<<<<<<< HEAD
def satisfied_by_any_installed_other_than(self):
pass
=======
@staticmethod
def satisfied_by_any_installed_other_than(package):
return False
>>>>>>> master
......@@ -164,5 +164,5 @@ from inary.operations.info import info
from inary.operations.install import install, get_install_order
from inary.operations.remove import remove, get_remove_order
from inary.operations.repository import *
from inary.operations.upgrade import upgrade, get_upgrade_order
from inary.operations.upgrade import upgrade, get_upgrade_order, get_base_upgrade_order
from inary.operations.search import *
......@@ -453,10 +453,6 @@ class ArchiveTar(ArchiveBase):
# Try to extract again.
self.tar.extract(tarinfo)
<<<<<<< HEAD
=======
except OSError as e:
>>>>>>> master
# Handle the case where new path is file, but old path is directory
# due to not possible touch file c in /a/b if directory /a/b/c exists.
if not e.errno == errno.EISDIR:
......
......@@ -37,9 +37,7 @@ import inary.uri
import inary.ui
import inary.util as util
import inary.version
import inary.reactor
from inary.db.repodb import RepoDB as repodb
class Error(inary.errors.Error):
pass
......@@ -53,13 +51,8 @@ class NotfoundError(inary.errors.Error):
class AtomicOperation(object):
<<<<<<< HEAD
def __init__(self, ignore_dep=None):
# self.package = package
=======
def __init__(self, ignore_dep = None):
#self.package = package
>>>>>>> master
if ignore_dep is None:
self.ignore_dep = ctx.config.get_option('ignore_dependency')