IBT-FMI / gebuilder

Gentoo System and Image Builder
GNU General Public License v3.0
11 stars 0 forks source link

.gentoo format not robust to ebuild update #13

Closed TheChymera closed 6 years ago

TheChymera commented 6 years ago

The following sequence of events:

su - someuser
git clone https://some.host/reponame.git
exit
cd /home/someuser/reponame/.gentoo
./install.sh
<PUSH SOME UPDATE TO THE EBUILD>
su - someuser
cd reponame
git pull origin
exit
cd /home/someuser/reponame/.gentoo
./install.sh

Will fail with:

These are the packages that would be merged, in order:

Calculating dependencies - * Digest verification failed:
 * /home/gentoo/gebuilder/.gentoo/app-misc/gebuilder/gebuilder-99999.ebuild
 * Reason: Filesize does not match recorded size
 * Got: 953
 * Expected: 791
 \
*** You are emerging a masked package. It is MUCH better to use
*** /etc/portage/package.* to accomplish this. See portage(5) man
*** page for details.
>>> Waiting 10 seconds before starting...
>>> (Control-C to abort)...
Continuing... in: 10 9 8 7 6 5 4 3 2 1
... done!
Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 6850, in _pkg
    metadata = zip(db_keys, db.aux_get(cpv, db_keys, myrepo=myrepo))
  File "/usr/lib64/python3.5/site-packages/portage/dbapi/porttree.py", line 620, in aux_get
    raise PortageKeyError(mycpv)
portage.exception.PortageKeyError: 'app-misc/gebuilder-99999'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.5/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/python3.5/site-packages/_emerge/main.py", line 1251, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 3297, in run_action
    retval = action_build(emerge_config, spinner=spinner)
  File "/usr/lib64/python3.5/site-packages/_emerge/actions.py", line 339, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 9605, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 9642, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 3817, in select_files
    return self._select_files(args)
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 3919, in _select_files
    os.path.dirname(os.path.dirname(os.path.dirname(ebuild_path)))))
  File "/usr/lib64/python3.5/site-packages/_emerge/depgraph.py", line 6852, in _pkg
    raise portage.exception.PackageNotFound(cpv)
portage.exception.PackageNotFound: app-misc/gebuilder-99999

This is because the Manifest has been previously written, and is not getting cleaned up. @Doeme how should we best clean it up, at the start or end of the script?

TheChymera commented 6 years ago

seems to actually have been caused by an ebuild error. Closing for now.