From nobody Tue Aug 23 13:42:32 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MBr545pT8z4ZhqH; Tue, 23 Aug 2022 13:42:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MBr545Hypz49WS; Tue, 23 Aug 2022 13:42:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661262152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ksGYKwKoqWX7LbuQNXF7IrCcbo3CkLJY3rTCtzVxLeM=; b=ebRZRSRanwavaZj5CgV7ntCOWdw6V2dCKQXIfmgd/dyu7+5LXxwdMsS8E+T1R7c1FeoDOF /gOSBRF3rEGxccipmEzMsSJqNOh8cvYYK42vc0DbH3CwGZiALI1adugHjKmDZift+nZuES sigC4bW16u8nltGXAmXeuZYDN7K2GwV4jeHMU8zZjqHuX23BK2FQ7Jr0UZWsAjCV938/nR btaLghqGg9rFKRrt0FC+4omnBvuf8+UJLirW9CLBrJgIbvnPFH3ll3K5LQppcg0/qQGf8R N2rJX2JWHnjVrs9C1DpeL22mBOkqDUIyXNwFgEAyHhPNdDr7A/ax4LkyGrfHjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MBr5442dBzXZR; Tue, 23 Aug 2022 13:42:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27NDgWs9057119; Tue, 23 Aug 2022 13:42:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27NDgWNk057118; Tue, 23 Aug 2022 13:42:32 GMT (envelope-from git) Date: Tue, 23 Aug 2022 13:42:32 GMT Message-Id: <202208231342.27NDgWNk057118@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 4dfa8c4b4524 - main - Scripts: remove now inaccurate gnomedepends.py List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dfa8c4b4524325509ba9e2484f49631a4c1902e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661262152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ksGYKwKoqWX7LbuQNXF7IrCcbo3CkLJY3rTCtzVxLeM=; b=hXBgTF+XS2b9XtiqWEWlfkSROyhyYRC7wYKDLC4I/+wPZWClRE+taFT07Rpty8pDr7A2fY 5Y4LmEDE3J5GmJKOGschDFkhogHx5CaP/+gY54muBz0b6+OvJChXhJOFeZqQ6fnFy4JmJz y7Va+MWc7558wStgEj44S0jKP/KKiLrcvfIXO4nQiWFddTvW2ac7XFaf8ZtNfgwDXnAo5R 9/QPixqwEkaljFWxu38VS4taEg1t4vgY+czgeNJJMbfxC1CeEwEK9+koCw0nXP2zQL1xZt 2m5BoPC/PAelH2alZUE0goYwXgjVH9fAd0eGQ5e+USF+RyGKAeFk3EPmMGRJ7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661262152; a=rsa-sha256; cv=none; b=vJXHpSfaEIgDf8W37tOJ4ZQm9cPrMikCbJsZVlXw6VY2EJsbJFJS2+XVqADrt5lOBWjc/A pHw3iW5h2r1NrkiexxJ+2PKs0LmrF6H2wIpTR8ihRFXkS826hra+LsUqhjQCm4ZJ7UR6fJ y8axD0RKyC9hZ5IKmUHQYJGo/ZgHRZ78Fwtw0JG+dyL2TU9cESn7B/XVFaK0RG+nhiW31l 7GydFEuOuISJfyTlRQbqhuo4ynTiEYY7zJUWGPU+Yfhhn3msxcQoCWRSfCAcHjHr5CvLaU MvRdRSknFGFVqFmJFFpfokaA/J65QCvQna6G4PH96X6zNqemiID6JRCho9oXvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=4dfa8c4b4524325509ba9e2484f49631a4c1902e commit 4dfa8c4b4524325509ba9e2484f49631a4c1902e Author: Baptiste Daroussin AuthorDate: 2022-08-23 13:39:50 +0000 Commit: Baptiste Daroussin CommitDate: 2022-08-23 13:42:27 +0000 Scripts: remove now inaccurate gnomedepends.py --- Tools/scripts/gnomedepends.py | 126 ------------------------------------------ 1 file changed, 126 deletions(-) diff --git a/Tools/scripts/gnomedepends.py b/Tools/scripts/gnomedepends.py deleted file mode 100755 index 2c5da9c7fc29..000000000000 --- a/Tools/scripts/gnomedepends.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# -# gnomedepends -# Analyse pkg/PLIST and give an advice as to which GNOME -# ports should be listes in {RUN,LIB}_DEPENDS for this port -# -# ---------------------------------------------------------------------------- -# "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): -# Maxim Sobolev wrote this file. As long as you retain -# this notice you can do whatever you want with this stuff. If we meet some -# day, and you think this stuff is worth it, you can buy me a beer in return. -# -# Maxim Sobolev -# ---------------------------------------------------------------------------- -# -# MAINTAINER= gnome@FreeBSD.org -# -# TODO: -# - analyse actual {RUN,LIB}_DEPENDS and give an advice about what should be -# added; -# - analyse results and remove redundant dependencies (for example if gnomecore -# has gnomecontrolcenter listed as dependency, and it is found that the port -# requires both gnomecontrolcenter and gnomecore do not list -# gnomecontrolcenter then); -# - parse ports/INDEX directly. -# - -import os, os.path, sys, string, re - -def getcmdout(cmdline): - results = [] - pipe = os.popen(cmdline) - buffer = pipe.readlines() - for result in buffer: - result = string.strip(result) - if len(result) > 0: - results.append(result) - pipe.close() - return results - -def readfile(filename): - file = open(filename) - result = file.readlines() - file.close() - return result - -def filter(lines, regobj): - results = [] - for line in lines: - match = regobj.match(line) - if match != None: - result = string.strip(match.group(1)) - try: - tmp = results.index(result) - except ValueError: - results.append(result) - return results - -gnomeports = getcmdout('cd /usr/ports && make search key=gnome | grep ^Path:') -newgnomeports = [] -for i in gnomeports: - newgnomeports.append(string.split(i)[1]) -gnomeports = newgnomeports -newgnomeports = [] - -regobj = re.compile('^@dirrm (?P\S+).*$') -for portdir in gnomeports: - try: - lines = readfile(os.path.join(portdir, 'pkg-plist')) - lines = list(filter(lines, regobj)) - if len(lines) > 0: - newgnomeports.append([portdir, lines]) - except IOError: - pass -gnomeports = newgnomeports -newgnomeports = [] - -try: - currplist = readfile('pkg-plist') -except IOError as errmsg: - print(errmsg) - sys.exit(1) - -regobj = re.compile('^(?!@)(?P\S+)/.*') -currdirs = list(filter(currplist, regobj)) -regobj = re.compile('^@dirrm (?P\S+).*$') -currdirs.extend(list(filter(currplist, regobj))) -currportdir = os.getcwd() - -newcurrdirs = [] -for dir in currdirs: - incremental = '' - for component in string.split(dir, '/'): - if incremental != '': - incremental = incremental + '/' - incremental = incremental + component - try: - tmp = newcurrdirs.index(incremental) - except ValueError: - newcurrdirs.append(incremental) -currdirs = newcurrdirs - -depends = [] -for gnomeport in gnomeports: - if (currportdir == gnomeport[0]): - continue - matches = [] - for gnomedir in gnomeport[1]: - for dir in currdirs: - if (gnomedir == dir): - matches.append(dir) - if len(matches) > 0: - depends.append([gnomeport[0], matches]) - -if len(depends) == 0: - sys.stdout.writelines(['No dependencies found (maybe it is not a GNOME port).\n']) - sys.exit(0) - -sys.stdout.writelines(['According to the contents of pkg-plist the port depends on the following GNOME\n', 'port(s):\n\n']) -for depend in depends: - sys.stdout.writelines([depend[0], ', for directories:\n']) - for dir in depend[1]: - sys.stdout.writelines(['\t', dir, '\n']) - sys.stdout.writelines(['\n']) - -