Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /lib/python3.6/site-packages/dnf-plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.6/site-packages/dnf-plugins/etckeeper.py
# etckeeper.py, support etckeeper for dnf
#
# Copyright (C) 2014 Peter Listiak
# https://github.com/plistiak/dnf-etckeeper
#
# Later modifications by Petr Spacek:
# Distutils code below was copied from etckeeper-bzr distributed with v1.15
#

import logging
import subprocess
import dnf

logger = logging.getLogger('dnf.plugin')


class Etckeeper(dnf.Plugin):

    name = 'etckeeper'

    def _run_command(self, command):
        logger.debug('Etckeeper plugin: %s', command)
        try:
            with open("/dev/null", "wb") as devnull:
                ret = subprocess.call(("etckeeper", command),
                                      stdout=devnull, stderr=devnull,
                                      close_fds=True)
                if ret != 0:
                    raise dnf.exceptions.Error('"etckeeper %s" returned: %d' % (command, ret))
        except OSError as err:
            logger.warning('Failed to run "etckeeper %s": %s' % (command, err))

    def resolved(self):
        self._run_command("pre-install")

    def transaction(self):
        self._run_command("post-install")

if __name__ == "__main__":
    from distutils.core import setup
    setup(name="dnf-etckeeper",
          packages=["dnf-plugins"],
          package_dir={"dnf-plugins":"etckeeper-dnf"})
Name
Size
Permissions
Options
__pycache__
--
drwxr-xr-x
builddep.py
9.127 KB
-rw-r--r--
changelog.py
4.851 KB
-rw-r--r--
config_manager.py
10.63 KB
-rw-r--r--
copr.py
29.588 KB
-rw-r--r--
debug.py
12.271 KB
-rw-r--r--
debuginfo-install.py
10.824 KB
-rw-r--r--
download.py
12.041 KB
-rw-r--r--
etckeeper.py
1.256 KB
-rw-r--r--
generate_completion_cache.py
3.855 KB
-rw-r--r--
groups_manager.py
13.215 KB
-rw-r--r--
needs_restarting.py
11.594 KB
-rw-r--r--
repoclosure.py
6.651 KB
-rw-r--r--
repodiff.py
11.206 KB
-rw-r--r--
repograph.py
3.996 KB
-rw-r--r--
repomanage.py
10.322 KB
-rw-r--r--
reposync.py
14.305 KB
-rw-r--r--
spacewalk.py
13.876 KB
-rw-r--r--
system_upgrade.py
26.165 KB
-rw-r--r--
universal_hooks.py
5.78 KB
-rwxr-xr-x
versionlock.py
12.028 KB
-rw-r--r--