# Path: elbepack/treeutils.py
# class etree(ebase):
#     def __init__(self, fname):
#         if fname is not None:
#             parser = XMLParser(huge_tree=True, remove_comments=False)
#             et = parse(fname, parser=parser)
#         else:
#             et = ElementTree(file=None)
# 
#         ebase.__init__(self, et)
# 
#     def write(self, fname, encoding=None):
#         # Make sure, that we end with a newline
#         self.et.getroot().tail = '\n'
#         self.et.write(fname, encoding=encoding)
# 
#     def tostring(self):
#         return self.et.tostring()
# 
#     def ensure_child(self, tag):
#         retval = self.et.find("./" + tag)
#         if retval is not None:
#             return elem(retval)
#         return elem(SubElement(self.et.getroot(), tag))
# 
#     def set_child_position(self, child, pos):
#         root = self.et.getroot()
#         root.remove(child.et)
#         root.insert(pos, child.et)
# 
#     def setroot(self, tag):
#         retval = elem(Element(tag))
#         # pylint: disable=protected-access
#         self.et._setroot(retval.et)
#         return retval
# 
#     @property
#     def root(self):
#         return elem(self.et.getroot())


import apt
import apt_pkg
from elbepack.treeutils import etree
    cache = apt_pkg.Cache()
    hl_cache = apt.cache.Cache()

    for p in hl_cache:
        if p.is_installed:
            if not is_in_fpl(p, fpl):
                print("%s installed by user" % p.name)

    for ip in fpl:
        if not is_installed(ip, cache):
            print("%s removed by user" % ip.et.text)


def bootup_info():
    with open("/etc/elbe_version", 'r') as ev:
        print(ev.read())


def run_command(_argv):
    try:
        xml = etree("/etc/elbe_base.xml")
    except IOError:
        print("/etc/elbe_base.xml removed by user")
        return -1

    bootup_check(xml)
    try:
        bootup_info()
    except IOError:
        print("/etc/elbe_version removed by user")

# Path: elbepack/treeutils.py
# class etree(ebase):
#     def __init__(self, fname):
#         if fname is not None:
#             parser = XMLParser(huge_tree=True, remove_comments=False)
#             et = parse(fname, parser=parser)
#         else:
#             et = ElementTree(file=None)
# 
#         ebase.__init__(self, et)
# 
#     def write(self, fname, encoding=None):
#         # Make sure, that we end with a newline
#         self.et.getroot().tail = '\n'
#         self.et.write(fname, encoding=encoding)
# 
#     def tostring(self):
#         return self.et.tostring()
# 
#     def ensure_child(self, tag):
#         retval = self.et.find("./" + tag)
#         if retval is not None:
#             return elem(retval)
#         return elem(SubElement(self.et.getroot(), tag))
# 
#     def set_child_position(self, child, pos):
#         root = self.et.getroot()
#         root.remove(child.et)
#         root.insert(pos, child.et)
# 
#     def setroot(self, tag):
#         retval = elem(Element(tag))
#         # pylint: disable=protected-access
#         self.et._setroot(retval.et)
#         return retval
# 
#     @property
#     def root(self):
#         return elem(self.et.getroot())


# Path: elbepack/commands/bootup-check.py
import apt
import apt_pkg
from elbepack.treeutils import etree

    cache = apt_pkg.Cache()
    hl_cache = apt.cache.Cache()

    for p in hl_cache:
        if p.is_installed:
            if not is_in_fpl(p, fpl):
                print("%s installed by user" % p.name)

    for ip in fpl:
        if not is_installed(ip, cache):
            print("%s removed by user" % ip.et.text)


def bootup_info():
    with open("/etc/elbe_version", 'r') as ev:
        print(ev.read())


def run_command(_argv):
    try:
        xml = etree("/etc/elbe_base.xml")
    except IOError:
        print("/etc/elbe_base.xml removed by user")
        return -1

    bootup_check(xml)
    try:
        bootup_info()
    except IOError:
        print("/etc/elbe_version removed by user")

        return -1