Kaydet (Commit) 297bd8a0 authored tarafından Your Name's avatar Your Name

build operation fixes & pgraph relations

üst f52682b0
root@localhost.localdomain:inary :) [develop] > inary it gedit --rei
Kurulum için bağımlılıklar kontrol ediliyor...
Bu paketler kurulacak:
acl amtk aspell
at-spi2-atk at-spi2-core atk
attr audit avahi
avahi-libs bzip2 ca-certificates
cairo colord cracklib
cups cyrus-sasl db
dbus dejavu-fonts e2fsprogs
elogind enchant eudev
expat fontconfig freeglut
freetype fridibi gconf
gd gdbm gdk-pixbuf
gedit giflib glib2
gmp gnome-doc-utils gobject-introspection
graphite2 gspell gtk2
gtk3 gtksourceview gtksourceview4
harfbuzz icu4c iso-codes
jasper jbigkit keyutils
lcms2 libICE libSM
libX11 libXau libXcomposite
libXcursor libXdamage libXdmcp
libXext libXfixes libXft
libXi libXinerama libXrandr
libXrender libXtst libXv
libXvMC libXxf86vm libaio
libart_lgpl libbsd libcap-ng
libdaemon libdrm libdrm-amd
libdrm-intel libdrm-nouveau libdrm-radeon
libedit libepoxy libexif
libffi libgcc libgcrypt
libgpg-error libgphoto2 libgudev
libgusb libieee1284 libjpeg-turbo
libkmod libnl libomxil-bellagio
libpaper libpciaccess libpcre
libpcre2 libpeas libpng
libtool-ltdl libusb libusb-compat
libutil-linux libv4l libvpx
libxcb libxkbcommon libxml2
libxshmfence libxslt libyaml
llvm llvm-clang llvm-libs
lm_sensors lua mariadb-bin-client
mariadb-bin-lib mesa mesa-glu
mit-kerberos mozjs60 ncurses
net-snmp nspr nss
openldap-client openssl pam
pango pciutils perl
pixman polkit python
python3 readline rrdtool
ruby run-parts sane-backends
shared-color-profiles shared-mime-info spidermonkey
sqlite tcl tcltk
tcp-wrappers tepl tiff
uchardet unixODBC vala
wayland wayland-client wayland-cursor
wayland-protocols wayland-server webp
xz zlib
Paket(ler)in toplam boyu: 0.00 B / 257.07 MB
Bu işlemden sonra 1011152.00 B disk alanı serbest bırakılacak.
Bağımlılıklar yüzünden ek paketler var. Devam etmek istiyor musunuz? (evet/hayır):
EOF | paste2
EOF
......@@ -69,7 +69,7 @@ class PGraph:
self.packages.append(pkg)
for (dep, depinfo) in self.installdb.get_rev_deps(pkg):
if dep not in self.packages:
self.check_package(dep)
self.check_package(dep,reverse)
if self.installdb.has_package(dep):
self.packages.append(dep)
else:
......@@ -79,7 +79,7 @@ class PGraph:
self.packages.append(pkg)
for dep in self.packagedb.get_package(pkg).runtimeDependencies():
if dep not in self.packages:
self.check_package(dep.package)
self.check_package(dep.package,reverse)
if not self.installdb.has_package(dep.package):
self.packages.append(dep.package)
......@@ -92,6 +92,12 @@ class PGraph:
def add_package_revdep(self,package):
self.check_package(package,True)
def add_package_file(self,pkg):
self.packages.append(pkg)
for dep in self.installdb.get_package(pkg).runtimeDependencies():
if dep not in self.packages:
self.check_package(dep.package)
def vertices(self):
return self.vertic
......
......@@ -383,7 +383,6 @@ class Fetcher:
# helper function
def fetch_git(url, destdir="",branch="master"):
if os.path.isdir(destdir):
os.system("rm -rf \"{}\"".format(destdir))
status=os.system("git clone \"{0}\" \"{1}\" -b \"{2}\"".format(url,destdir,branch))
......
......@@ -847,7 +847,7 @@ class Builder:
_('Would you like to install the unsatisfied build dependencies?')):
ctx.ui.info(_('Installing build dependencies.'))
if not inary.operations.install.install(
[dep.package for dep in dep_unsatis], reinstall=True):
[dep.package for dep in dep_unsatis], reinstall=False):
fail()
else:
fail()
......
......@@ -254,7 +254,13 @@ def install_pkg_files(package_URIs, reinstall=False):
raise Exception(_('External dependencies not satisfied.'))
install_pkg_names(extra_packages, reinstall=True, extra=True)
packagedb = inary.db.packagedb.PackageDB()
class PackageDB:
@staticmethod
def get_package(key, repo=None):
return d_t[str(key)]
packagedb = PackageDB()
installdb = inary.db.installdb.InstallDB()
A = list(d_t.keys())
......@@ -272,12 +278,14 @@ def install_pkg_files(package_URIs, reinstall=False):
# find the "install closure" graph of G_f by package
# set A using packagedb
for x in A:
G_f.add_package(x)
G_f.packages.append(x)
B = A
while len(B) > 0:
Bp = set()
for x in B:
G_f.add_package(x)
pkg = packagedb.get_package(x)
for dep in pkg.runtimeDependencies():
G_f.add_package(dep)
B = Bp
order = G_f.topological_sort()
if not ctx.get_option('ignore_package_conflicts'):
......
......@@ -227,11 +227,20 @@ class Package:
#broke system)
if os.path.isfile(tarinfo.name):
if os.path.islink(tarinfo.name):
if os.path.isfile(os.readlink(tarinfo.name)) :
link=os.readlink(tarinfo.name)
if not os.path.isdir(link):
try:
print(tarinfo.name)
os.unlink(tarinfo.name)
except OSError as e:
ctx.ui.warning(e)
else:
try:
os.unlink(tarinfo.name)
except OSError as e:
ctx.ui.warning(e)
else:
# Added for package-manager
......@@ -244,7 +253,7 @@ class Package:
tar = self.get_install_archive()
if tar:
tar.unpack_dir(outdir, callback=callback)
tar.unpack_dir(outdir, callback=callback)
else:
self.extract_dir_flat('install', outdir)
......
......@@ -29,33 +29,6 @@ class Trigger:
self.postscript = None
self.missing_postOps = False
def load_script(self):
"""Compiles and executes the script"""
compiled_script = self.compile_script()
try:
if not self.missing_postOps:
localSymbols = globalSymbols = {}
exec(compiled_script, localSymbols, globalSymbols)
else:
return 0
except Exception as e:
raise (e)
self.Locals = localSymbols
self.Globals = globalSymbols
def compile_script(self):
"""Compiles the script and returns a code object"""
fname = util.join_path(self.postscript)
if os.path.isfile(fname):
buf = open(fname).read()
return compile(buf, fname, "exec")
else:
self.missing_postOps = True
return None
def run_command(self, func):
""""""
if not self.missing_postOps:
......@@ -84,7 +57,6 @@ class Trigger:
def preinstall(self, specdir):
self.specdir = specdir
self.postscript = util.join_path(self.specdir, ctx.const.postops)
self.load_script()
retval = self.run_command("preInstall")
util.delete_file(self.postscript)
return retval
......@@ -92,17 +64,14 @@ class Trigger:
def postinstall(self, specdir):
self.specdir = specdir
self.postscript = util.join_path(self.specdir, ctx.const.postops)
self.load_script()
return self.run_command("postInstall")
def postremove(self, specdir):
self.specdir = specdir
self.postscript = util.join_path(self.specdir, ctx.const.postops)
self.load_script()
return self.run_command("postRemove")
def preremove(self, specdir):
self.specdir = specdir
self.postscript = util.join_path(self.specdir, ctx.const.postops)
self.load_script()
return self.run_command("preRemove")
......@@ -12,6 +12,7 @@ from inary.actionsapi import mesontools
from inary.actionsapi import cmaketools
from inary.actionsapi import autotools
def setup():
pass
......@@ -19,4 +20,5 @@ def build():
pass
def install():
autotools.install("DESTDIR={} >/dev/null".format(get.installDIR()))
os.chdir("../unibuild-master")
autotools.install("DESTDIR={} ".format(get.installDIR()))
......@@ -13,7 +13,8 @@
<PartOf>system.base</PartOf>
<Summary>unibuild package build test</Summary>
<Description>Pakcage build test for inary.</Description>
<Archive sha1sum="master" >https://gitlab.com/sulinos/devel/unibuild.git</Archive>
<!--Archive sha1sum="master" >https://gitlab.com/sulinos/devel/unibuild.git</Archive-->
<Archive sha1sum="e5f5a0721c01549bdaf7c862021b80e8b037c13a">https://gitlab.com/sulinos/devel/unibuild/-/archive/master/unibuild-master.tar.gz</Archive>
</Source>
<Package>
......
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