98 Commits

Author SHA1 Message Date
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
Ivan A. Melnikov
2410682af6 deps_cmp: initial version
A simple tool that compares dependencies of binary
packages in two repositories. For packages with
matching NEVR, it shows where their dependencies
differ, possibly hinting at the need to rebuild
one package or another.
2019-04-04 13:27:03 +04:00
Ivan A. Melnikov
98b20601ce Fix flake8 warning 2019-04-04 13:26:19 +04:00
Ivan A. Melnikov
c9057f2c08 interactive: EXTRA packages are always interesting
... for next_tasks report.
2019-04-04 13:25:33 +04:00
Ivan A. Melnikov
2077d293f5 side report! 2019-03-22 17:13:07 +04:00
Ivan A. Melnikov
573ff92a85 interactive: list_spi: Accept and split string as first argument
Use case: to show info on all packages in your clipboard, do:

>>> list_spi('''
... <paste>
... ''')
2019-03-19 18:15:39 +04:00
Ivan A. Melnikov
a46ff4b5d4 interactive: Update the module docstring
... to include all the recent stuff
2019-03-19 18:07:16 +04:00
Ivan A. Melnikov
a1c774089f tasks: descending task order in short format
This affects update_days, colorized and similar reports:
now tasks with the largest IDs go first. This helps
reading reports on smaller screens.
2019-03-02 21:40:37 +04:00
Ivan A. Melnikov
f9ef19f8d9 interactive: add min_id param to display_tasks and next_tasks 2019-03-02 21:13:05 +04:00
Ivan A. Melnikov
6598bb5b26 interactive: display_tasks enhancements
Now it is more usable as interactive command.
2019-03-01 17:13:59 +04:00
Ivan A. Melnikov
059f092080 interactive: Add build_log function
Function displays build logs for a subtask, and has
some nice defaults. Alias: bl
2019-03-01 16:45:19 +04:00
Ivan A. Melnikov
0bc2acb073 update_days report: Add a debug statement 2019-03-01 16:21:09 +04:00
Ivan A. Melnikov
0108663163 interactive: Try detecting rebuilds in next_tasks 2019-03-01 15:57:57 +04:00