2

A question exists regarding how to mark an RPM as automatically installed, but that question concerns Fedora.

I am using zypper on OpenSUSE as an end-user and would like to know how to mark a package so that it will (or will not) show in the list of unneeded packages, with zypper packages --unneeded. I am looking for something along the lines of zypper mark autoselected [packageName].

A Novell Bugzilla bug mentions a status of byUser, and possibly autoselected, so it sounds like this information exists somewhere. I would like to know how to modify it.

  • If RPM tools don't have a way to modify this information, but zypper does, I will modify the question title to specify OpenSUSE or zypper. – palswim Oct 4 '17 at 6:07
  • Tags help with the categorization. The title, IMHO, is more about attracting the right people with the relevant knowledge about zypper and OpenSuse as well as with rpm. In the end, I would hazard to guess that the repository mappings are handled by zypper, just as yum does, rather than by rpm. Additionally, the question that you linked in your own question shows that yumdb is used for this within Fedora, which would further support my assumption here. – ILMostro_7 Oct 4 '17 at 6:09
2

I would hazard to guess that the repository mappings are handled by zypper, just as yum does, rather than by rpm. Additionally, the question that you linked in your own question shows that yumdb is used for this purpose within Fedora, which would further support my assumption here. The OpenSUSE documentation reveals:

test RPM XML Metadata format is mostly used for online repositories on the internet. It has its origins in the YUM package manager.

Just lately it was extended to support repositories split across multiple media.

See the source code for the OpenSUSE zypper schema specification on github. Although the metadata is part of the rpm package, it's either being used by yum/zypper (independently) or if the rpm tool does have that ability built-in, the database info is not shared between yum <--> rpm and/or zypper <--> rpm.

After reading the entirety of your question, I'm not sure if you're the end-user wishing to work with the zypperdb(?) or if you're a developer looking to build rpm packages. For the latter, as I eluded to earlier, the information can be specified within an rpm spec file.

rpm metadata

This is an XML format for describing the critical metadata from an rpm package for dependency resolving and installation. Currently, this format is supported by apt-rpm,smartpm,red carpet and yum.

The files break down as follows:

  • repomd.xml this is the file that describes the other metadata files. It is like an index file to point to the other files. It contains timestamps and checksums for the other files. This lets a client download this one, small file and know if anything else has changed. This also means that cryptographically (ex: gpg) signing this one file can ensure repository integrity.

  • primary.xml.[gz] this file stores the primary metadata information. This includes information such as:

    • name, epoch, version, release, architecture

    • file size, file location, description, summary, format, checksums header byte-ranges, etc.

    • dependencies, provides, conflicts, obsoletes, suggests, recommends
    • file lists for the package for CERTAIN files - specifically files matching: /etc*, bin/, /usr/lib/sendmail [1]
  • filelists.xml.[gz] this file stores the complete file and directory listings for the packages. The package is identified by: name, epoch, version, release, architecture and package checksum id.
  • other.xml.[gz] this file currently only stores the changelog data from packages. However, this file could be used for any other additional metadata that could be useful for clients.
  • groups.xml.[gz] this file is tentatively described. The intention is for a common package-groups specification as well. There is still some sections for this format that need to be fleshed out.

FIXME The specification needs better and more current documentation and needs to be included here. :)


Additional Resources

  • 1
    In this case, I am an end user wanting to work with the package database. – palswim Oct 4 '17 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.