Commit Graph

82 Commits

Author SHA1 Message Date
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
Ivan A. Melnikov
7ea016d2c8 Drop task_predicates submodule
It did not turn out to be convenient
2019-03-01 14:01:47 +04:00
Ivan A. Melnikov
349cc65f61 update_days: Try to detect rebuilds
It's hard to do 100% correctly, but the heuristics we
employ here works quite well for now: when a package
was rebuild by base repo (Sisyphus) after we've updated
it last time, we probably need to rebuild it.
2019-03-01 13:48:09 +04:00
Ivan A. Melnikov
9e8dcddafe tasks: Derive task ctime from mtime of task/id file 2019-02-28 17:06:32 +04:00
Ivan A. Melnikov
d10a2dc058 outdated_tasks: Don't consider any archived task outdated
Now, when not all archived tasks are DONE, we need to be
less specific in this condition.
2019-02-04 21:02:19 +04:00
Ivan A. Melnikov
9d3984129c tasks: Load all the archived tasks 2019-02-04 14:28:49 +04:00
Ivan A. Melnikov
156f2cdcb8 interactive: Add '\n' between package tasks 2019-02-04 14:21:23 +04:00
Ivan A. Melnikov
f33aa9ae43 update_days report
This change adds new report, update_days, that nicely
displays how many days ago a package was updated. This
report is now available in interactive mode and included
into daily report.
2019-02-01 21:06:41 +04:00
Ivan A. Melnikov
7160cbf06d tasks: refacor format_tasks
- add date
- add test-only flag
2019-02-01 20:26:04 +04:00
Ivan A. Melnikov
ca22430030 tasks: task_is_updating function 2019-02-01 20:25:06 +04:00
Ivan A. Melnikov
15620240c0 tasks: subtask_is_updating
Refactor some useful code out of task_predicates.
2019-02-01 16:55:41 +04:00
Ivan A. Melnikov
6407f615c4 tasks: Fix task loading progress logging 2019-01-31 16:39:35 +04:00
Ivan A. Melnikov
901df3a952 Add 'import rlcompleter' back
Just importing this module configures the completion
correctly.
2019-01-23 13:46:03 +04:00
Ivan A. Melnikov
9189ab87ef interactive: aliases for logs and gspi
This change adds 1-letter aliases for 'logs' and 'gspi' commands.
These commands are used so often that even 4 letters are
just too much.
2019-01-22 13:05:05 +04:00
Ivan A. Melnikov
530010dee9 interactive: correctly load non-ascii logs
Some packages write utf-8 in logs, and may write
build logs in other charset. Now we can load
such logs more or less correctly.
2019-01-22 13:03:49 +04:00
Ivan A. Melnikov
7a656153fc Fix some flakes8 warnings 2019-01-17 13:25:22 +04:00
Ivan A. Melnikov
08bc219dc5 Tasks: don't re-read info.json if we don't have to
tasks.py is now capable of using a dict id => task_info
as a cache; if task is already there and is recent
enough, we don't have to re-read its metadata.
2019-01-17 12:39:23 +04:00