Giter Club home page Giter Club logo

dcrpm's People

Contributors

aleivag avatar davide125 avatar fejese avatar get9 avatar ifel avatar jaymzh avatar jgoguen avatar joshuamiller01 avatar malmond77 avatar markdrayton avatar michel-slm avatar nikitakoshikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcrpm's Issues

Acquire db_stat details about the rpmdb before running db_recover

dcrpm runs rpm -qa as a heuristic to determine whether an rpmdb is accessible, followed by running db_recover on a timeout (or other) failure. Unfortunately db_recover destroys whatever state that can be used to diagnose the root cause.

Capturing "db_stat -CA" (or at least "db_stat -Cl") would help classify "stale lock" deadlock problems from timeouts.

Checking for the DB_ RUNRECOVERY error message on steer would help classify dbenv recovery problems. You might also consider writing a simple program to open&eclipse the rpmdb dbenv instead of reading the 100Mb of content in Packages (rpm -qa is perhaps not the best heuristic, although there really isn't a better means to get a package count than rpm -qa line count)

Finally, db_recovery can be run with a "-evv" to preserve the dbenv files: there are known (but rare) problems if/when there are multiple instances of dbenv files attached to different processes which can happen if open files are unlinked. Preserving the dbenv files with db_recover is recommended to avoid.

No such file or directory: '/var/lib/yum' error for DNF distros

On some OS, e.g. CentOS 8 or Fedora 36, "/var/lib/yum" doesn't exist. Thus causing this error.

$ sudo dcrpm --clean-yum-transactions
2023-01-13 21:18:14,717 ERROR [main.main]: exception
2023-01-13 21:18:14,717 ERROR [main.main]: exception
2023-01-13 21:18:14,717 ERROR [main.main]: exception: [Errno 2] No such file or directory: '/var/lib/yum'

Not sure if it's due to yum/dnf difference or something, but maybe we can fix it for CentOS 8 or other DNF distros?

Tried #55, but that may not be the correct fix.

test_rpmdb_centos7_missing_index fails on Fedora 37

=================================== FAILURES ===================================
____________ DcrpmIntegrationTest.test_rpmdb_centos7_missing_index _____________

args = (<tests.test_end_to_end.DcrpmIntegrationTest testMethod=test_rpmdb_centos7_missing_index>, '/tmp/tmpbmruxg8r/rpm')
kwargs = {}

    def wrapper(*args, **kwargs):
        # type: (t.Any, t.Any) -> RT
        args += (os.path.join(temp_dir, "rpm"),)
>       result = t.cast(F, function)(*args, **kwargs)

tests/rpmdb.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_end_to_end.py:93: in test_rpmdb_centos7_missing_index
    self.assertTrue(run_result)
E   AssertionError: False is not true
------------------------------ Captured log call -------------------------------
WARNING  root:rpmutil.py:510 No db_backend found in macros, assuming bdb
ERROR    root:dcrpm.py:137 DB needs recovery
ERROR    root:dcrpm.py:148 DB needs rebuild
ERROR    root:rpmutil.py:430 db_verify returned nonzero status
WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.dbenv.lock: No such file or directory

WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.rpm.lock: No such file or directory

WARNING  root:dcrpm.py:160 Got other exception: Could not save __db.001 failed
ERROR    root:rpmutil.py:430 db_verify returned nonzero status
WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.dbenv.lock: No such file or directory

WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.rpm.lock: No such file or directory

WARNING  root:dcrpm.py:160 Got other exception: Could not save __db.001 failed
ERROR    root:rpmutil.py:430 db_verify returned nonzero status
WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.dbenv.lock: No such file or directory

WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.rpm.lock: No such file or directory

WARNING  root:dcrpm.py:160 Got other exception: Could not save __db.001 failed
ERROR    root:rpmutil.py:430 db_verify returned nonzero status
WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.dbenv.lock: No such file or directory

WARNING  root:pidutil.py:65 lsof returned non-zero: lsof: status error on /tmp/tmpbmruxg8r/rpm/.rpm.lock: No such file or directory

WARNING  root:dcrpm.py:160 Got other exception: Could not save __db.001 failed
ERROR    root:dcrpm.py:169 Unable to repair RPM database
=========================== short test summary info ============================
FAILED tests/test_end_to_end.py::DcrpmIntegrationTest::test_rpmdb_centos7_missing_index

test_rpmdb_centos7_missing_index fails when building dcrpm with setuptools 60.9.3 in Fedora

Hello,
I'm working on integrating setuptools 60+ to Fedora and test it against all packages in Fedora Rawhide (the rebuild takes place in Copr repository. One of the big-impact changes is the new default: setuptools uses its own distutils (rather than the one from Python's standard library).
One of dcrpm's tests fails every time with the newest setuptools and builds successfully every time with setuptools 59.6.0 we already have in Fedora. The test failure is rather weird though, there's no clear (to me) connection to setuptools that could play any role here. Do you have any idea why does this happen?

FAIL: test_rpmdb_centos7_missing_index (tests.test_end_to_end.DcrpmIntegrationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/dcrpm-0.6.2/tests/rpmdb.py", line 38, in wrapper
    result = t.cast(F, function)(*args, **kwargs)
  File "/builddir/build/BUILD/dcrpm-0.6.2/tests/test_end_to_end.py", line 92, in test_rpmdb_centos7_missing_index
    self.assertEqual(self.action_trace(), [])
AssertionError: Lists differ: ['index_rebuild', 'index_rebuild', 'table_rebuild'] != []

First list contains 3 additional elements.
First extra element 0:
'index_rebuild'

- ['index_rebuild', 'index_rebuild', 'table_rebuild']
+ []

----------------------------------------------------------------------
Ran 67 tests in 7.490s

FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=67 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=67 errors=0 failures=1>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.