Commit Graph

110 Commits

Author SHA1 Message Date
Ivan A. Melnikov
d98fc78de6 interactive: Annotate ti and *spi with annotations 2024-11-29 12:31:59 +04:00
Ivan A. Melnikov
9d2e14f5dc interactive: Read annotations
Annotations is a text file in the following format:

PACKAGE_NAME\tfew words describing it
2024-11-28 18:04:44 +04:00
Ivan A. Melnikov
e284750a57 tasks: Check task path for cached task
If path has changed, something else might have
changed, too.
2024-11-28 17:59:13 +04:00
Ivan A. Melnikov
8d14344594 interactive: Add sort criteria to display_tasks
Now its output can be sorted by any field, not just
task id, which is still the default.
2023-09-20 19:29:16 +04:00
Ivan A. Melnikov
cfd8dee1c6 More python3 compatibility
Try to convert all names, versions and releases
to str when reading.

Now we can actually use the interactive shell.
2023-08-02 17:05:46 +04:00
Ivan A. Melnikov
b674458df2 First steps towards python3 compatibility
Reports still use bytes/strs interchangeably,
but at least we can load things.
2023-03-10 14:42:01 +04:00
Ivan A. Melnikov
153130a18f Helpers to bootstrap daily archives based on task_mtime 2022-03-31 16:22:09 +04:00
Ivan A. Melnikov
92b514f6f1 repos: Brave attempt to handle ghc auto-generated deps 2022-03-31 16:21:05 +04:00
Ivan A. Melnikov
8ea4901f0c reports: Include more packages into the report
We are, in fact, interested in
- fresh packages that were never rebuild;
- old packages that were rebuild recently, but are still old.

This change makes sure that such packages are included
into update_days report.
2021-12-31 12:15:45 +04:00
Ivan A. Melnikov
56c981c56e recursive_build_report: Show what to_repo has 2021-10-20 13:21:58 +04:00
Ivan A. Melnikov
166cd3125b repos: switch_to_py3 report
Lists packages which python2 part is not needed
anymore.
2021-10-14 14:05:34 +04:00
Ivan A. Melnikov
618b824af3 repos: extras_to_remove
List EXTRA packages that can be safely removed without
causing 'usual' or build unmets to appear in the repository.
2021-10-05 21:51:18 +04:00
Ivan A. Melnikov
a82fc9042d rpm_ffi: Wide string support for evr_cmp
Many older report use evr_cmp on python2 unicode type.
2021-10-02 15:20:39 +04:00
Ivan A. Melnikov
c7a650b8e5 repos: New report, requires_build_report
Same as recursive_build_report, but for requires names,
not source names.
2021-09-16 13:41:01 +04:00
Ivan A. Melnikov
02b3453509 repos.recursive_buid_report: Try breaking cycles
Instead of falling back to alphabetical order when
cycle is detected, we try to break it and form
the topological order again. Even if cycles are
broken at the wrong edge, this order might still
be more useful.

All the cycles found are included into the report.
2021-09-16 12:04:15 +04:00
Ivan A. Melnikov
b8a040caac Update Makefile and fix some flake8 warnings 2021-09-08 12:43:17 +04:00
Ivan A. Melnikov
048ed5fe6c repos.recursive_build_report: Sort summary topologically
... if possible. If not, summary is sorted alphabetically
and the first cycle found is reported to logs.

Dependencies for sorting use very strong model: A should
be rebuild before B if any packages built from A are
in the build chroot for B. Of course, our rudimentary
implementation of chroot_for does not mimic real
apt packages selecting logic, so it gives us just an
approximation, but hopefully a useful one.
2021-09-08 12:35:05 +04:00
Ivan A. Melnikov
bfce854471 repos.Repository: optimize chroot_for
This change makes it 100+ times faster and actually
usable for various interesting cases.
2021-09-08 12:15:33 +04:00
Ivan A. Melnikov
d1094f9e6c rpm_ffi: Drop 'mode' argument from evr_cmp
It has really strange semantics and is very
hard to use. Now we expose ranges_overlap,
we can use evr_cmp for normal EVR comparision
only.
2021-09-08 12:11:39 +04:00
Ivan A. Melnikov
a42e630239 repos.recursive_build_report: Separate BRs in summary
Instead of putting all the dependencies in one list,
print build requires first, then '::', then extra
requires that are needed for installation only
(but not building).
2021-09-07 12:18:49 +04:00
Ivan A. Melnikov
9459d2b700 repos: recursive_build_report improvements
- support for multiple arguments
- allow an argument to be in '.src.rpm' form
  (also, the version and release are ignored for now)
- mark any additional sources which were not explicitly
  asked for in summary.
2021-09-07 11:36:26 +04:00
Ivan A. Melnikov
4a75b16600 repos: Repository.chroot_for initial implementation
This method provides a closure of given dependencies,
essentially computing chroot where a pacakge(s) can
be installed or built.
2021-09-07 11:35:24 +04:00
Ivan A. Melnikov
c658864543 repos: Store platform word size in a special repo field 2021-09-03 18:15:20 +04:00
Ivan A. Melnikov
18f0d27ffa repos: unmet reports 2021-09-03 16:00:39 +04:00
Ivan A. Melnikov
2c3063393c repos: recursive_build_report
Experimential report that does some interesting things
2021-09-02 20:23:48 +04:00
Ivan A. Melnikov
c373caeb99 repos: build_report
This is the initial version of cross-repository report
that tries to give an approximate answer to the question:
"What other packages we should build with this one, and
why?"
2021-09-02 19:50:13 +04:00
Ivan A. Melnikov
c84192c52a repos: New tool in the box
We try to model repository as collection of source and
binary packages with their dependencies, and do some
stuff with it.

The initial version can calculate a list of unmets.
2021-09-02 16:33:43 +04:00
Ivan A. Melnikov
33d59af9e6 tasks: Ingore non-existing task directories
Fixes issue on riscv64:

OSError: [Errno 2] No such file or directory: '/riscv64/tasks/archive/eperm'
2021-09-02 16:29:31 +04:00
Ivan A. Melnikov
8dce33f9b3 interactive: Move interactive_setup to utils
... and split it in hope to make the parts more reusable.
2021-09-02 16:02:33 +04:00
Ivan A. Melnikov
d532359ffe rpm_ffi: Basic python3 compatibility 2021-09-02 15:52:45 +04:00
Ivan A. Melnikov
96d88080c3 interactive: Helper function to create inapt reporter
inapt reports are still not part of the main functionality,
so I don't want to put them right into `load` and make
that even slower.
2021-08-15 20:38:23 +04:00
Ivan A. Melnikov
aba7fad63b colorize: Always color newer packages as SLATE
Previously, if the package in 'new' repo had larger version,
it was still called ORANGE. It was "optimization" from
the times when we had only sisyphus_mipsel, and never
packaged newer versions before the main repo. But for
p9_mipsel that's not true, as well as when comparing
p9_mipsel and sisyphus_mipsel, which we also would
like to do.
2021-08-15 20:28:29 +04:00
Ivan A. Melnikov
d52b3e4725 inapt: Avoid using name property of RPM header object
This property was not supported in older python-module-rpm.
2021-08-15 20:27:15 +04:00
Ivan A. Melnikov
e4b686ba53 inapt: Optimize info loading
... and building of the indices.
2021-08-13 14:53:43 +04:00
Ivan A. Melnikov
2dfc7cfab9 inapt: recursive_srpm_report
Looks for RED dependencies and makes report for them, too.
2021-08-13 13:34:53 +04:00
Ivan A. Melnikov
8edb64675c Inapt: SRPM dependencies report
For now, we just load src/pkglists and build a simple
report on what packages you have to have in order
to satisfy SRPM's build requires. Everything is
very approxymate, of course.
2021-08-12 15:19:08 +04:00
Ivan A. Melnikov
58c796d15c outdated_tasks: Filter tasks by repo and by owner 2021-08-12 15:05:36 +04:00
Ivan A. Melnikov
d2321c241a Tolerate empty files in tasks 2021-08-09 11:22:11 +04:00
Ivan A. Melnikov
c1275e3cad tasks: Set state to 'DONE' for done tasks
... based on the file path.

Sometimes info.json is moved before the state
is set to DONE. we need to fix this in girar, but for now
we opt for a simpler workaround.
2021-01-12 16:06:59 +04:00
Ivan A. Melnikov
786d7d87a8 Minimize error messages for broken task directories
This commit reduces the verbocity of error messages
when info.json is not present or broken (e.g. empty)
and makes such changes non-fatal.
2021-01-11 17:49:13 +04:00
Ivan A. Melnikov
250518bae8 lists: Use src.list from repository
... to get all the ENVRs of the packages it has.

Now comparing different arches of the same repo
is not important, and Sisyphus deperecated
source pkglists, so we can use the official
information source.
2020-09-18 13:43:54 +04:00
Ivan A. Melnikov
e0b48e098d update_days: Ignore fresh packages that were never rebuild
Threre was a time when this was important enough
for sisyphus_mipsel, but now, especially for p9_mipsel,
this is just noise.
2020-09-18 13:42:13 +04:00
Ivan A. Melnikov
037474ab50 Fix update_days() report
The prevous commit has broken it.
2019-12-06 13:14:24 +04:00
Ivan A. Melnikov
8af9e1d7b1 Make sure NONE packages are properly colorized
Previously, BY_NAME did not include packages that were
absent from both repositories. This meant that some functions
like `gspi` ignored them, which is inconvenient because
it does not show packages that were never built (like new
kernel flavors) or already deleted.

This commit addresses this in the following way:
- colorize.colorize() now takes additional argument,
  an explicit list of package names to colorize
- for interactive console, this list is formed from
  both repositories, AND all the package names found
  in PACKAGE_TASKS.
2019-12-04 11:10:07 +04:00
Ivan A. Melnikov
c66361223d interactive: fix fresh() for subtasks with EXTRA packages 2019-08-15 10:42:12 +04:00
Ivan A. Melnikov
1e6cc56b9a interactive/fresh: Make colorizing optional
Sometimes it's convenient to have the list
without colors.
2019-08-15 10:40:35 +04:00
Ivan A. Melnikov
6634f39f4b port_stats/lists: Raise error for empty prefix
Sometimes, when lists are updated while we are
reading them, we get 0 results, and all our
reports become very confusing. This change
adds a check to raise an exception in this case.
2019-08-15 10:38:22 +04:00
Ivan A. Melnikov
f60a82557c interactive: add doc() function
... that prints the welcoming message
2019-07-01 12:41:36 +04:00
Ivan A. Melnikov
aba8162676 interactive: add fresh(num)
This function displays subtasks of the tasks
that would update packages in the target repo.
It is especially useful for determining why
the particular task gets into next_tasks(...)
output.

Implementing it nicely required a bit of refactoring
to factor out certain parts of colorizing
and display mech.
2019-07-01 12:38:13 +04:00
Ivan A. Melnikov
a25d089525 Restrict set of interesting tasks to recycler's
recycler64 is boring now.
2019-05-02 17:45:02 +04:00