Commit graph

49 commits

Author SHA1 Message Date
Bryan Gardiner
d9ad4964f5
nvd.1: Escape characters that are special according to groff_char(7). 2024-09-17 18:08:34 -07:00
Felix Uhl
b1813cb042 Add history command
Closes #18
2024-09-17 15:09:32 +02:00
Bryan Gardiner
ae4749c20d
Add "Error" to error message for consistency. 2024-09-09 23:04:33 -07:00
Bryan Gardiner
b2cf56efff
Add --sort option (issue #17). 2024-09-09 23:04:17 -07:00
Bryan Gardiner
20bcbda4b5
Drop unnecessary imports from 'typing'. 2024-09-07 22:00:58 -07:00
Bryan Gardiner
0ca2d3931b
Fix return type declaration of PackageSetPair.is_selection_state_changed(). 2024-08-22 20:52:17 -07:00
Bryan Gardiner
e7d0ce0c89
Make the rest of the 'list' and 'diff' logic use PackageSet. 2024-08-22 20:51:45 -07:00
Bryan Gardiner
682570f054
Rename "package manifests" to "package sets".
There are two styles of coding that are used currently.  First, the
PackageManifest{,Pair} classes track an arbitrary list of store paths (not
necessarily a closure) as parsed Package and Version objects.  These are used to
track and compare the sets of selected packages.  Then for everything else like
version diffing, we just store raw nested data structures holding package names
and versions, e.g. dict[str, list[optional[str]]] for mapping package names to
lists of available versions (and then parse Versions on the fly to do
comparisons, which is inefficient).

This is the beginning of clean-up to make the latter use PackageSet, Package,
and Version as well.
2024-08-18 18:28:15 -07:00
Bryan Gardiner
9594ab31ef
Fix some version ordering bugs.
- Use @total_ordering to supply implementations of all other comparison
  functions from just __eq__() and __le__().  This is not done automatically.

  https://docs.python.org/3/library/functools.html#functools.total_ordering

- An incomplete check for "pre" meant that the following would evaluate
  to true:

      VersionChunk("1pre2") < VersionChunk("1pre2")

  In practice this wasn't a problem because it appears that when comparing
  VersionChunk lists, equality is checked before ordering, but this isn't
  good to rely on.
2024-08-18 17:46:03 -07:00
Bryan Gardiner
8c8c662d87
Update the URL of the version comparison algoithm. 2024-08-18 17:46:03 -07:00
Bryan Gardiner
a8c1d6fa00
Update copyright to 2024. 2024-05-04 18:53:19 -07:00
Bryan Gardiner
30ecb231b7
Highlight the changed parts of version numbers (issue #17). 2024-05-04 18:47:30 -07:00
Bryan Gardiner
1276c2d3eb
Respect the NO_COLOR environment variable to disable colour. 2023-05-28 10:09:14 -07:00
Bryan Gardiner
19a6f7d3d1
Bump to v0.2.4. 2023-05-22 11:47:24 -07:00
Bryan Gardiner
6a67c9e1b4
Release v0.2.3. 2023-05-22 11:46:44 -07:00
Bryan Gardiner
cf59afb64f
Be stricter about checking exit codes from nix. 2023-05-22 11:44:37 -07:00
Bryan Gardiner
35bd54cb63
Fix compatibility with nix-2.3 not knowing --extra-experimental-features. 2023-05-22 11:40:59 -07:00
Bryan Gardiner
38736d6392
Bump to v0.2.3. 2023-05-22 11:00:52 -07:00
Bryan Gardiner
ccb957f706
Release v0.2.2. 2023-05-22 10:58:31 -07:00
Bryan Gardiner
8302026545
Fix crash when inspecting Nix package with no deps (related to issue #12). 2023-03-17 21:36:13 -07:00
Bryan Gardiner
7f17e6cdf3
Bump to v0.2.2. 2023-03-17 21:21:26 -07:00
Bryan Gardiner
37aa59ab4f
Release v0.2.1. 2023-03-17 21:20:12 -07:00
Bryan Gardiner
2d2b40b147
Update copyright to 2023. 2023-03-17 21:19:36 -07:00
Bryan Gardiner
1bf9d1740d
Fix reference to undefined variable (issue #12), and fix some lint. 2023-03-17 21:16:02 -07:00
Bryan Gardiner
f87f29530b
Bump to v0.2.1. 2022-10-15 16:35:05 -07:00
Bryan Gardiner
ef319a927d
Release v0.2.0. 2022-10-15 16:34:36 -07:00
Bryan Gardiner
11fd14887a
Bump to v0.2.0 because of changed output format. 2022-10-15 16:33:54 -07:00
Bryan Gardiner
0cfd93e34e
Fix invalid .P command in nvd.1. 2022-10-12 18:35:59 -07:00
Bryan Gardiner
06e1fc696c
Add a note that nvd should be obtained through Nixpkgs.
It was kindly pointed out to me in merge request !3 that it's not clear
that nvd is in Nixpkgs.  Nixpkgs is the preferred way to get nvd, or
alternatively one of the release tags in this repo, rather than the
master branch where things can change willy-nilly.
2022-10-12 18:26:24 -07:00
Bryan Gardiner
a334e6c0ec
Add --nix-bin-dir option for specifying Nix binaries to use (issue #9). 2022-10-12 17:38:24 -07:00
Bryan Gardiner
082958c205
Add display of the change in closure disk size (issue #8). 2022-10-12 17:14:51 -07:00
Bryan Gardiner
f735e17038
Bump copyright to 2022. 2022-10-12 17:14:51 -07:00
Bryan Gardiner
b082bd23f5 Merge branch 'SuperSandro2000-master-patch-21642' into 'master'
Remove URL literal

See merge request khumba/nvd!2
2022-05-28 04:18:12 +00:00
Sandro
e8e614c79d Remove URL literal 2022-05-23 16:47:16 +00:00
Bryan Gardiner
0d3aba5510
Bump to v0.1.3. 2021-11-05 18:48:06 -07:00
Bryan Gardiner
ea75310f8a
Update changelog and release v0.1.2. 2021-11-05 18:46:57 -07:00
Bryan Gardiner
fd059e5b2e Merge branch 'init-flake' into 'master'
Add flake.nix.

See merge request khumba/nvd!1
2021-07-20 03:57:51 +00:00
dadada
d6cbc5b4ac
Add flake.nix. 2021-07-08 21:52:55 +02:00
Bryan Gardiner
1e6e419be3
Update the readme to use the 'diff' subcommand. 2021-05-16 18:24:42 -07:00
Bryan Gardiner
13d3ab1255
Bump to v0.1.2. 2021-05-16 18:05:52 -07:00
Bryan Gardiner
304918bade
Fix SIGPIPE handling; bump to v0.1.1. 2021-05-16 18:04:37 -07:00
Bryan Gardiner
050f6ff2e3
Fix colour rendering for install states. 2021-05-16 17:51:46 -07:00
Bryan Gardiner
00495ddf25
Add the program version via 'nvd --version' and the man page. 2021-05-16 17:07:05 -07:00
Bryan Gardiner
95c7ab7070
Implement separate list command for listing matching packages (closes #5). 2021-05-16 17:06:22 -07:00
Bryan Gardiner
2c2fa1fbc9
Use nix-store to query direct deps of command line arguments (closes #4). 2021-05-03 19:50:16 -07:00
Bryan Gardiner
7cdaa6d818
Add a LICENSE file with the Apache 2.0 license text.
Grabbed from: https://www.apache.org/licenses/LICENSE-2.0.txt
2021-04-10 18:44:27 -07:00
Bryan Gardiner
0348e04872
Set version to 0.0.1. 2021-04-10 09:10:20 -07:00
Bryan Gardiner
709a8a2ed3
Docs, packaging, licensing. 2021-04-09 21:05:12 -07:00
Bryan Gardiner
3e619dafcc
Initial commit. 2021-04-09 19:21:39 -07:00