File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,18 @@ void AptCache::loadCacheFiles()
18
18
const QString arch = getArch ();
19
19
20
20
// Define include and exclude regex patterns
21
- const QRegularExpression includeRegex (QString (R"( ^.*binary-%1_Packages$)" ).arg (arch));
22
- const QRegularExpression secondaryRegex (R"( ^.*_Packages$)" );
21
+ const QRegularExpression allBinaryArchRegex (QString (R"( ^.*binary-%1_Packages$)" ).arg (arch));
22
+ const QRegularExpression allBinaryAnyRegex (R"( ^.*binary-[a-z0-9]+_Packages$)" );
23
+ const QRegularExpression allRegex (R"( ^.*_Packages$)" );
24
+
23
25
const QRegularExpression excludeRegex (
24
26
R"( (debian_.*-backports_.*_Packages)|(mx_testrepo.*_test_.*_Packages)|(mx_repo.*_temp_.*_Packages))" );
25
27
26
28
QDirIterator it (dir.path (), QDir::Files);
27
29
while (it.hasNext ()) {
28
30
const QString fileName = it.next ();
29
- if ((includeRegex.match (fileName).hasMatch () || secondaryRegex.match (fileName).hasMatch ())
31
+ if ((allBinaryArchRegex.match (fileName).hasMatch () ||
32
+ (!allBinaryAnyRegex.match (fileName).hasMatch () && allRegex.match (fileName).hasMatch ()))
30
33
&& !excludeRegex.match (fileName).hasMatch ()) {
31
34
if (!readFile (fileName)) {
32
35
qWarning () << " Error reading cache file:" << fileName;
Original file line number Diff line number Diff line change
1
+ mx-packageinstaller (24.12.04) mx; urgency=medium
2
+
3
+ * Adjust regex to read binary-packages for current arch only and
4
+ add all flat-repo Packages without binary-arch in filename
5
+
6
+ -- fehlix <
[email protected] > Tue, 31 Dec 2024 11:12:36 -0500
7
+
1
8
mx-packageinstaller (24.12.03) mx; urgency=medium
2
9
3
10
* adjust secondary regex to pick up more package lists
@@ -9,6 +16,7 @@ mx-packageinstaller (24.12.02) mx; urgency=medium
9
16
* Set the application name to fix the Qt translation domain and
10
17
window icon name based on the application name instead of the
11
18
executable file or symlink name
19
+ * Adjust regex for Packages filenames without binary-arch from flat-repo
12
20
13
21
-- fehlix <
[email protected] > Tue, 31 Dec 2024 10:19:35 -0500
14
22
You can’t perform that action at this time.
0 commit comments