Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sack: Also look in /usr/share/rpm for Packages #47

Closed
wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Contributor

In the rpm-ostree model, the RPM database lives in /usr/share/rpm, and
is immutable. Let's look there first, and then fall back to the old
mutable database.

In the rpm-ostree model, the RPM database lives in /usr/share/rpm, and
is immutable.  Let's look there first, and then fall back to the old
mutable database.
@cgwalters
Copy link
Contributor Author

See also openSUSE/libsolv#43

@akozumpl
Copy link
Contributor

Thank you for the patch, Colin, we're of course ready to help with OSTree support.

The patch in this pull request however looks like it wasn't tested properly and even introduces a regression:

>>> import hawkey
>>> s = hawkey.Sack(make_cache_dir=True)
>>> s.load_system_repo()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IOError: load_system_repo() failed.
>>> 

Works on master. From the patch it's straightforward to see why---if the OSTree's rpmdb location is not available we only assign something to a local variable and error out in current_rpmdb_checksum().

The proper fix should introduce different rpm locations as a null terminated array (needs to be moved out of header files) and a loop that goes through them too.

@akozumpl akozumpl closed this Mar 28, 2014
@cgwalters
Copy link
Contributor Author

Sure; do you want me to remove the HY_SYSTEM_RPMDB define? It feels like the array should be private, right?

@akozumpl
Copy link
Contributor

Yeah, it should be private.

Fine by you and PK, @hughsie ?

@hughsie
Copy link
Contributor

hughsie commented Mar 28, 2014

Fine by me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants