summaryrefslogtreecommitdiffstats
path: root/scripts/opkg-query-helper.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /scripts/opkg-query-helper.py
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/opkg-query-helper.py')
-rwxr-xr-xscripts/opkg-query-helper.py72
1 files changed, 0 insertions, 72 deletions
diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py
deleted file mode 100755
index 084d9ef684..0000000000
--- a/scripts/opkg-query-helper.py
+++ /dev/null
@@ -1,72 +0,0 @@
1#!/usr/bin/env python3
2
3# OpenEmbedded opkg query helper utility
4#
5# Written by: Paul Eggleton <paul.eggleton@linux.intel.com>
6#
7# Copyright 2012 Intel Corporation
8#
9# SPDX-License-Identifier: GPL-2.0-only
10#
11
12import sys
13import fileinput
14import re
15
16archmode = False
17filemode = False
18vermode = False
19
20args = []
21for arg in sys.argv[1:]:
22 if arg == '-a':
23 archmode = True
24 elif arg == '-f':
25 filemode = True
26 elif arg == '-v':
27 vermode = True
28 else:
29 args.append(arg)
30
31# Regex for removing version specs after dependency items
32verregex = re.compile(r' \([=<>]* [^ )]*\)')
33
34pkg = ""
35ver = ""
36for line in fileinput.input(args):
37 line = line.rstrip()
38 if ': ' in line:
39 if line.startswith("Package:"):
40 pkg = line.split(": ")[1]
41 ver = ""
42 else:
43 if archmode:
44 if line.startswith("Architecture:"):
45 arch = line.split(": ")[1]
46 print("%s %s" % (pkg,arch))
47 elif filemode:
48 if line.startswith("Version:"):
49 ver = line.split(": ")[1]
50 elif line.startswith("Architecture:"):
51 arch = line.split(": ")[1]
52 print("%s %s_%s_%s.ipk %s" % (pkg,pkg,ver,arch,arch))
53 elif vermode:
54 if line.startswith("Version:"):
55 ver = line.split(": ")[1]
56 elif line.startswith("Architecture:"):
57 arch = line.split(": ")[1]
58 print("%s %s %s" % (pkg,arch,ver))
59 else:
60 if line.startswith("Depends:"):
61 depval = line.split(": ")[1]
62 deps = depval.split(", ")
63 for dep in deps:
64 dep = verregex.sub('', dep)
65 print("%s|%s" % (pkg,dep))
66 elif line.startswith("Recommends:"):
67 recval = line.split(": ")[1]
68 recs = recval.split(", ")
69 for rec in recs:
70 rec = verregex.sub('', rec)
71 print("%s|%s [REC]" % (pkg, rec))
72