packages icon indicating copy to clipboard operation
packages copied to clipboard

Testing the eopkg4-bin package

Open sheepman4267 opened this issue 1 year ago • 20 comments

:warning: WARNING! :warning: WARNING! :warning: WARNING! :warning:

This is a very new packaging effort, building a binary version of a relatively untested python3 version of eopkg. It probably won't break your system, but it definitely could. Do not use this if you don't know what you're doing.

despicable-me-animation With that out of the way, this issue exists as a repository for test results and discussion of the new compiled binary version of eopkg4. Place concerns about the actual package in the draft PR, but discussions and testing of the binary itself here.

For installation instructions, see here: https://github.com/getsolus/packages/tree/main/packages/e/eopkg4-bin

And Do not use this if you don't know what you're doing!!!

How to use eopkg4-bin as a convenient replacement for eopkg py2

# bash/zsh
alias eopkg='sudo eopkg4-bin'
# fish
abbr eopkg --position anywhere "eopkg4-bin"

eopkg commands test matrix

Notes

  • This list was taken from the eopkg.1 man page, I have removed all the explainer text.
  • Add notes below a checkmark if it fails somehow
  • To check off a box: Run the command, see that it behaves, check off the box and add your name next to it so we have some tracking of who did what.

OPTIONS

  • [x] -D, --destdir
  • [x] -y, `--yes-all
  • [ ] -u, --username
  • [ ] -p, --password
  • [x] -L, --bandwidth-limit (David)
  • [x] -v, --verbose (David)
  • [x] -d, --debug (David)
  • [x] -h, --help
  • [x] --version
  • [x] -N, --no-color

SUBCOMMANDS

  • [x] add-repo (ar) <repo-name> <repo URI>
    • [x] --ignore-check
    • [x] --no-fetch
    • [x] --at @ermo : This one is interesting. It takes an integer as argument. I wonder if this is a way to sort out repo priority?
  • [x] autoremove (rmf) <package1> <package2> ...
    • [x] --ignore-dependency
    • [ ] --ignore-comar - ignore this, comar does not work with py3
    • [x] --ignore-safety
    • [x] -n, --dry-run
    • [ ] -p, --purge ermo: Doesn't appear to do anything? Not sure what it's supposed to be doing either...
  • [x] blame (bl) <packagename>
    • [x] -r, --release
    • [x] -a, --all
  • [ ] build (bi) <path to pspec.xml>
  • [x] check <package?>
    • [x] -c, --component
    • [x] --config
  • [x] clean
  • [x] configure-pending (cp)
  • [x] delete-cache (dc)
  • [ ] delta (dt) <oldpackage1> <newpackage>
    • [ ] -t, --newest-package
    • [ ] -O, --output-dir
    • [ ] -F, --package-format
  • [x] disable-repo (dr) <name>
  • [x] emerge (em) <name> 🚫 not a recognized command
  • [x] enable-repo (er) <name>
  • [x] fetch (fc) <name>
    • [x] -o, --output-dir
  • [x] help (?) <subcommand?>
  • [x] history (hs)
    • ~~❌ David gets BrokenPipeError: [Errno 32] Broken pipe after quitting command~~ - fixed by https://github.com/getsolus/eopkg/pull/31
    • [x] -l, --last
    • [x] -s, --snapshot
    • [x] -t, --takeback
  • [x] index (ix) <directory> ❌ System error. Program terminated. Invalid attribute name 'xml:lang' (see this comment)
    • [x] -a, --absolute-urls
    • [x] -o, --output
    • [x] --compression-types
    • [ ] ~~--skip-sources Doesn't seem to exist? It's in the manpage with no description; doesn't show up in eopkg ix --help. I don't think we care. -HK~~ OK, no, it's not even in the up-to-date manpage anymore.
    • [x] --skip-signing
  • [x] info
    • [x] -f, --files
    • [x] -c, --component
    • [x] -F, --files-path
    • [x] -s, --short
    • [x] --xml Evan, David confirms ❌ System error. Program terminated. Invalid attribute name 'xml:lang'
  • [x] install (it) <name>
    • [x] --ignore-dependency
    • [ ] --ignore-comar
    • [x] --ignore-safety
    • [x] -n, --dry-run
    • [x] --reinstall
    • [ ] --ignore-check
    • [ ] --ignore-file-conflicts
    • [ ] --ignore-package-conflicts
    • [x] -c, --component ermo --component :heavy_check_mark:, ❌ sheepman Error, the program tried to call itself with '-c' argument. Disable with '--no-deployment-flag=self-execution'.
    • [ ] -r, --repository
    • [x] -f, --fetch-only
    • [ ] -x, --exclude No idea what this is supposed to do. -HK
    • [ ] --exclude-from <filename> No idea what this is supposed to do. -HK
  • [x] list-available <la> <repo name?>
    • [x] -l, --long
    • [x] -c, --component ermo --component :heavy_check_mark:, -c = ❌, Error, the program tried to call itself with '-c' argument. Disable with '--no-deployment-flag=self-execution'.
    • [x] -U, --uninstalled
  • [x] list-components (lc)
    • [x] l, --long
    • [x] r, --repository
  • [x] list-installed (li)
    • [x] -a, --automatic
    • [ ] -b, --build-host
    • [x] -l, --long
    • [x] -c, --component ermo --component :heavy_check_mark:, -c = ❌, Error, the program tried to call itself with '-c' argument. Disable with '--no-deployment-flag=self-execution'.
    • [x] -i, --install-info
  • [x] list-newest (ln) <repo?>
    • [x] -s, --since
    • [x] -l, --last
  • [x] list-pending (lp)
  • [x] list-repo (lr)
  • [x] list-sources (ls) 🚫 not a recognized command
    • [x] -l, --long
  • [x] list-upgrades (lu)
    • [x] -l, --long
    • [x] -c, --component ermo --component ✔️, -c = ❌, Error, the program tried to call itself with '-c' argument. Disable with '--no-deployment-flag=self-execution'.
    • [x] -i, --install-info
  • [x] rebuild-db (rdb)
    • [ ] -f, --files
  • [x] remove (rm) <package1> <package2> ...
    • [ ] --ignore-comar
    • [ ] --ignore-safety
    • [x] -n, --dry-run
    • [ ] -p, --purge
    • [ ] -c, --component
  • [x] remove-orphans (rmo)
    • [ ] --ignore-comar
    • [ ] --ignore-safety
    • [x] -n, --dry-run
    • [ ] -p, --purge
  • [x] search (sr) <term>
    • [x] -l, --language (seems to work but it's slower)
    • [x] -r, --repository
    • [ ] -i, --installdb
    • [ ] ~~-s, --sourcedberror: no such option: -s/--sourcedb~~ No longer exists as of 2022 -HK
    • [x] --name
    • [x] --summary
    • [x] --description
  • [x] search-file (sf) <path>
    • [x] -l, --long (same output and behaviour as without -l/--long)
    • [x] -q, --quiet
  • [x] update-repo (ur) <reponame?>
    • [x] -f, --force
  • [x] upgrade (up) <package-name?>
    • [ ] --ignore-comar
    • [x] --ignore-safety
    • [x] -n, --dry-run
    • [x] --security-only
    • [x] -b, --bypass-update-repo
    • [ ] --ignore-file-conflicts
    • [ ] --ignore-package-conflicts
    • [x] -c, --component
    • [ ] -r, --repository
    • [x] -f, --fetch-only
    • [x] -x, --exclude
    • [ ] --exclude-from <filename>

sheepman4267 avatar Jan 15 '24 23:01 sheepman4267

The test matrix lists an emerge command, but there's no help entry for it. In fact, that command doesn't appear to exist.

EbonJaeger avatar Jan 16 '24 19:01 EbonJaeger

eopkg info nano --xml fails with this:

❯ eopkg info nano --xml
System error. Program terminated.
Invalid attribute name 'xml:lang'
Please use 'eopkg help' for general help.
Use --debug to see a traceback.

EbonJaeger avatar Jan 16 '24 19:01 EbonJaeger

eopkg list-sources does not seem to be a command.

EbonJaeger avatar Jan 16 '24 19:01 EbonJaeger

eopkg hs -l <number> prints the same output as the old eopkg. LGTM.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

eopkg hs -t <number> actually reverts to a previous snapshot. Re-running the same command is no-op as expected. If I keep going back with the number, at a certain point it asks to uninstall eokg4-bin (obviously). If I say no it correctly stops.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

eopkg hs -s successfully takes a snapshot. I can also revert to that snapshot with eopkg hs -t <number> after I installed some packages.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

The --no-color global flag works with install and history -t.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

The -y global flag works with install, rmf and history.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

eopkg it --reinstall works with a bunch of different package names.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

The -D global flag works with ar, ur and it.

livingsilver94 avatar Jan 17 '24 15:01 livingsilver94

I don't know how eopkg sr --language is supposed to be tested since I'm sure all packages in our repo are described in English. Anyway, eopkg4 output is the same of eopkg.

Side note, eopkg4 is 360% slower than eopkg (2.9s compared to 0.8). I suspect this isn't the only case where it's slower.

livingsilver94 avatar Jan 18 '24 07:01 livingsilver94

eopkg it --ignore-dependency works. Can also uninstall the package it installed correctly.

livingsilver94 avatar Jan 18 '24 08:01 livingsilver94

eopkg sf <keyword> works. The order of results is different but the content is the same.

livingsilver94 avatar Jan 18 '24 09:01 livingsilver94

Successfully did:

  • sudo eopkg4-bin it --components games.action
  • sudo eopkg4-bin rm --components games.action
  • sudo eopkg4-bin rmo.

All worked as expected.

ermo avatar Jan 24 '24 05:01 ermo

ermo@solbox:~/repos/getsolus/solpkgs/common/Scripts [cpesearch-updates* +1 ~0 -0 !]
$ command -v eopkg
alias eopkg='sudo eopkg4-bin'
ermo@solbox:~/repos/getsolus/solpkgs/common/Scripts [cpesearch-updates* +1 ~0 -0 !]
$ eopkg index --debug --skip-signing /var/lib/solbuild/local/ --output /var/lib/solbuild/local/eopkg-index.xml
Building index of eopkg files under /var/lib/solbuild/local/

Adding package to index: eopkg4-bin-4.0.0-1-1-x86_64.eopkg                      
System error. Program terminated.
<class 'ValueError'>: Invalid attribute name 'xml:lang'
Please use 'eopkg help' for general help.

Traceback:
  File "/tmp/onefile_105690_1706734511_616010/eopkg-cli", line 73, in <module>
  File "/tmp/onefile_105690_1706734511_616010/eopkg-cli", line 70, in main
  File "/tmp/onefile_105690_1706734511_616010/pisi/cli/pisicli.py", line 131, in run_command
  File "/tmp/onefile_105690_1706734511_616010/pisi/cli/index.py", line 82, in run
  File "/tmp/onefile_105690_1706734511_616010/pisi/api.py", line 808, in index
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 524, in write
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 365, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 624, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 858, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 792, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 363, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 365, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 624, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 916, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/autoxml.py", line 91, in encode
  File "/tmp/onefile_105690_1706734511_616010/pisi/pxml/xmlext.py", line 44, in setNodeAttribute
  File "src/lxml/etree.pyx", line 2446, in lxml.etree._Attrib.__setitem__
  File "src/lxml/apihelpers.pxi", line 586, in lxml.etree._setAttributeValue
  File "src/lxml/apihelpers.pxi", line 1764, in lxml.etree._attributeValidOrRaise

ermo avatar Jan 31 '24 20:01 ermo

When trying to install a package and there are dependencies or system packages that should be updated, eopkg4-bin fails.

❯ sudo eopkg4-bin it vscode
Updates available, checking reverse dependencies of runtime dependencies for safety.
Safety switch forces the upgrade of following packages:
audit  less  systemd
System error. Program terminated.
Repo item
   not found
Please use 'eopkg help' for general help.
Use --debug to see a traceback.

Full traceback:

❯ sudo eopkg4-bin it vscode --debug
DEBUG: InstallDB initialized in 0.0014789104461669922.
DEBUG: RepoDB initialized in 9.822845458984375e-05.
DEBUG: PackageDB initialized in 2.165886878967285.
Updates available, checking reverse dependencies of runtime dependencies for safety.
DEBUG: HistoryDB initialized in 0.00012803077697753906.
DEBUG: InstallDB initialized in 0.0008413791656494141.
DEBUG: RepoDB initialized in 9.751319885253906e-05.
DEBUG: ComponentDB initialized in 0.4143648147583008.
DEBUG: PackageDB initialized in 1.919245719909668.
digraph G {


}
Safety switch forces the upgrade of following packages:
audit  less  systemd
digraph G {
systemd[ label = "systemd(253.16,143)" ];
systemd_devel[ label = "systemd-devel(253.16,143)" ];
audit[ label = "audit(3.1.2,12)" ];
less[ label = "less(643,20)" ];
systemd_32bit[ label = "systemd-32bit(253.16,143)" ];

systemd_devel -> systemd;
systemd_32bit -> systemd;

}
DEBUG: checking kerberos release >= 21
DEBUG: checking mesalib release >= 218
DEBUG: checking dbus release >= 37
DEBUG: checking expat release >= 26
DEBUG: checking libstdc++ release >= 76
DEBUG: checking libdrm release >= 46
System error. Program terminated.
<class 'Exception'>: Repo item
   not found
Please use 'eopkg help' for general help.

Traceback:
  File "/tmp/onefile_6398_1706975296_616265/eopkg-cli", line 73, in <module>
  File "/tmp/onefile_6398_1706975296_616265/eopkg-cli", line 70, in main
  File "/tmp/onefile_6398_1706975296_616265/pisi/cli/pisicli.py", line 131, in run_command
  File "/tmp/onefile_6398_1706975296_616265/pisi/cli/install.py", line 165, in run
  File "/tmp/onefile_6398_1706975296_616265/pisi/api.py", line 67, in wrapper
  File "/tmp/onefile_6398_1706975296_616265/pisi/api.py", line 500, in install
  File "/tmp/onefile_6398_1706975296_616265/pisi/operations/install.py", line 53, in install_pkg_names
  File "/tmp/onefile_6398_1706975296_616265/pisi/operations/install.py", line 359, in plan_install_pkg_names
  File "/tmp/onefile_6398_1706975296_616265/pisi/pgraph.py", line 38, in add_dep
  File "/tmp/onefile_6398_1706975296_616265/pisi/db/packagedb.py", line 96, in get_package
  File "/tmp/onefile_6398_1706975296_616265/pisi/db/packagedb.py", line 213, in get_package_repo
  File "/tmp/onefile_6398_1706975296_616265/pisi/db/itembyrepo.py", line 40, in get_item_repo

EbonJaeger avatar Feb 03 '24 15:02 EbonJaeger

Hm I might have had an old version of eopkg4-bin installed. Time will tell if the above is fixed or not.

EbonJaeger avatar Feb 03 '24 15:02 EbonJaeger

@EbonJaeger @sheepman4267 @joebonrichie @livingsilver94 :

Have any of you found anything concerning with eopkg4-bin release 4 since python-3.11 landed?

For context, I haven't and even though eopkg4-bin release 4 was built against python-3.10, in my tests it can trivially upgrade itself to a bumped eopkg4-bin release 5 built against python-3.11 and back again to the eopkg4-bin release 4 version with no breakage observed either before, during or after...

ermo avatar Feb 27 '24 18:02 ermo

I haven't noticed anything different. Everything seems to be working exactly as it did before for me.

EbonJaeger avatar Feb 27 '24 20:02 EbonJaeger

@sheepman4267 There's only a few tickboxes that need to be covered. If those can be done, this can be closed out. Thanks!

TraceyC77 avatar Jan 31 '25 16:01 TraceyC77

Just finished checking off all the boxes I can. Here are my notes about all the others:

  • Options --username and --password have been deprecated and removed.
  • --ignore-comar: comar doesn't work with python3, no fix planned.
  • build technically works, but can't call actions.py. This works in the python3 version, but not when compiled. No fix planned.
  • delta support isn't in use at the moment, and generation of deltas wouldn't be done by eopkg itself anyway. No concern at present.
  • --ignore-check is irrelevant in current deployment (we only support one architecture, and we've only ever used distro release 1).
  • --repository: Not really sure what this is supposed to do. It may not work. However, we don't really support multiple repositories in "production" anyway (outside of local repo for packaging work).
  • rdb --files: Really not sure what change this makes. filed an issue to prompt future investigation.
  • rm -c: Broken, causes an unholy metadata mess. Additionally, this option has very unsafe behavior.
  • I've had enough of testing remove arguments tonight. Defer testing --purge.
  • upgrade --ignore-file-conflicts: Behavior is possibly inconsistent with documentation - file conflicts seem to be ignored by default for upgrade operations. Filed an issue to prompt further investigation.

With this, I believe all relevant pieces of the testing matrix have been tried, and issues have been created on the appropriate repo for questions which still remain. This issue has, therefore, run its course. Closing now!

sheepman4267 avatar Jun 15 '25 03:06 sheepman4267