Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585538 - repoman -ci crashes, if /usr/portage/distfiles does not exist
Summary: repoman -ci crashes, if /usr/portage/distfiles does not exist
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-10 16:14 UTC by Jonas Stein
Modified: 2022-07-12 03:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Stein gentoo-dev 2016-06-10 16:14:36 UTC
I suggest to prevent a crash and give a message like
"Error: could not find /usr/portage/distfiles"

$ repoman ci
RepoMan scours the neighborhood...

*** the local copy of metadata.dtd needs to be refetched, doing that now

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.4/repoman", line 37, in <module>
    repoman_main(sys.argv[1:])
  File "/usr/lib64/python3.4/site-packages/repoman/main.py", line 103, in repoman_main
    vcs_settings, mydir, env)
  File "/usr/lib64/python3.4/site-packages/repoman/scanner.py", line 219, in __init__
    self.repo_settings.repoman_settings, metadata_dtd=metadata_dtd)
  File "/usr/lib64/python3.4/site-packages/repoman/checks/ebuilds/pkgmetadata.py", line 56, in __init__
    metadata_dtd=metadata_dtd)
  File "/usr/lib64/python3.4/site-packages/repoman/_xml.py", line 63, in __init__
    self._check_capable()
  File "/usr/lib64/python3.4/site-packages/repoman/_xml.py", line 73, in _check_capable
    if not fetch_metadata_dtd(self.metadata_dtd, self.repoman_settings):
  File "/usr/lib64/python3.4/site-packages/repoman/metadata.py", line 128, in fetch_metadata_dtd
    prefix='metadata.dtd.', dir=destdir)
  File "/usr/lib64/python3.4/tempfile.py", line 270, in mkstemp
    return _mkstemp_inner(dir, prefix, suffix, flags)
  File "/usr/lib64/python3.4/tempfile.py", line 200, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/portage/distfiles/metadata.dtd.opr_4cf5'

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:16 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.