From: Michael Tremer Date: Thu, 3 Jun 2021 18:27:18 +0000 (+0000) Subject: constants: Drop loads of unused constants X-Git-Tag: 0.9.28~1285^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0c79e44bd44b833abcff591042d99e82de0127b;p=pakfire.git constants: Drop loads of unused constants Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/constants.py b/src/pakfire/constants.py index 56ffaf396..8190c5cce 100644 --- a/src/pakfire/constants.py +++ b/src/pakfire/constants.py @@ -36,133 +36,10 @@ CONFIG_DISTRO_DIR = os.path.join(CONFIG_DIR, "distros") CACHE_DIR = "/var/cache/pakfire" CCACHE_CACHE_DIR = os.path.join(CACHE_DIR, "ccache") -LOCAL_TMP_PATH = "/var/tmp" - BUFFER_SIZE = 102400 -PACKAGE_FORMAT = 5 PACKAGE_EXTENSION = "pfm" MAKEFILE_EXTENSION = "nm" # A script that is called, when a user is dropped to a chroot shell. BUILD_ROOT = "/var/lib/pakfire/build" - -ORPHAN_DIRECTORIES = [ - "lib", "lib64", "usr/lib", "usr/lib64", "libexec", "usr/libexec", - "bin", "sbin", "usr/bin", "usr/sbin", "usr/include", "usr/share", - "usr/share/man", "usr/share/man/man0", "usr/share/man/man1", - "usr/share/man/man2", "usr/share/man/man3", "usr/share/man/man4", - "usr/share/man/man5", "usr/share/man/man6", "usr/share/man/man7", - "usr/share/man/man8", "usr/share/man/man9", "usr/lib/pkgconfig", -] -for i in ORPHAN_DIRECTORIES: - i = os.path.dirname(i) - - if not i or i in ORPHAN_DIRECTORIES: - continue - - ORPHAN_DIRECTORIES.append(i) - -ORPHAN_DIRECTORIES.sort(key=lambda x: len(x), reverse=True) - -PACKAGE_INFO = """\ -# Pakfire %(pakfire_version)s - -# Package information -package - name = %(name)s - version = %(version)s - release = %(release)s - epoch = %(epoch)s - arch = %(arch)s - - uuid = %(uuid)s - groups = %(groups)s - maintainer = %(maintainer)s - url = %(url)s - license = %(license)s - - summary = %(summary)s - - def description -%(description)s - end - - type = %(type)s - size = %(inst_size)d -end - -# Build information -build - host = %(build_host)s - id = %(build_id)s - time = %(build_time)d -end - -# Distribution information -distribution - name = %(distro_name)s - release = %(distro_release)s - vendor = %(distro_vendor)s - maintainer = %(distro_maintainer)s -end - -# Dependency information -dependencies - def prerequires -%(prerequires)s - end - - def requires -%(requires)s - end - - def provides -%(provides)s - end - - def conflicts -%(conflicts)s - end - - def obsoletes -%(obsoletes)s - end - - def recommends -%(recommends)s - end - - def suggests -%(suggests)s - end -end - -# EOF -""" -PACKAGE_INFO_DESCRIPTION_LINE = PACKAGE_INFO_DEPENDENCY_LINE = "\t\t%s" - -SCRIPTS = ( - "pretransin", - "pretransun", - "pretransup", - "prein", - "postin", - "preun", - "postun", - "preup", - "postup", - "posttransin", - "posttransun", - "posttransup", -) - -SCRIPTS_PREREQUIRES = ( - "prein", - "postin", - "preup", - "postup", -) - -CONFIG_FILE_SUFFIX_NEW = ".paknew" -CONFIG_FILE_SUFFIX_SAVE = ".paksave"