-
Notifications
You must be signed in to change notification settings - Fork 96
ModifyRepo
Tomas Mlcoch edited this page Sep 30, 2013
·
20 revisions
modifyrepo bar rpms_sss/repodata/
- Add new record with type
bar - Add gz compressed file
bar.gzinto the repodata/ dir
modifyrepo --mdtype=foo bar rpms_sss/repodata/
- Add new record with type
foo - Add gz compressed file
bar.gzinto the repodata/ dir
-
<open-size>element of the newly added record is missing (not generated at all). - When adding already compressed file, the file is added uncompressed but its original compression suffix persists! (This is very confusing and in fact pretty illogical).
- Usage of
--no-compressdoesn't fix this misbehavior. -
--removebehavior depends on current working directory. When--removeis used, modifyrepo try to remove specified file by path that is stored in repomd.xml (e.g.repodata/primary.xml). So when modifyrepo is running from different working directory (e.g. one level up or directly in repodata/ dir) then although the record from repomd.xml is removed, the file physically still exists. -
--checksumwith bad param (e.g.foo) causes modifyrepo crash with python traceback. - When
--no-compressis used, both<checksum>and<open-checksum>elements are present. - The
<open-checksum>shouldn't be there - See any metadata with groupfile (e.g. Fedora metadata). When metadata contains a compressed groupfile (type "group_gz") in most cases it contains also uncompressed groupfile (type "group") and record about this uncompressed file doesn't contain the<open-checksum>nor<open-size>
- Autodetect compressed file and doesn't try to compress it again or even decompress it.
- Auto-detection if the simple or unique md filenames should be used.
- Support for batch file
Use GLib2 key file format.
Benefits of the format:
- Flexible and easy to extend
- Human-readable
- Computer-readable
- Standard and easy-to-use parser with UTF-8 support.
- Already used by several tools - Several freedesktop.org specifications use key files now, e.g the Desktop Entry Specification and the Icon Theme Specification.
# Add:
# [<path/to/file>]
# <options>
# Metadata that use a bunch of config options
[some/path/comps.xml]
type=group
compress=true
compress-type=gz
unique-md-filenames=true
checksum=sha256
new-name=group.xml
# Metadata that use default settings
[some/path/bar.xml]
# Metadata that use default settings
# But path is specified by 'path' option
# Useful in cases when path itself contains '[' or ']' character(s)
[some text]
path=some/path/foo[2].xml
# Remove:
# [<metadata name>]
# remove=true
[updateinfo]
remove=true
| Option name | Description | Supported value(s) | Default |
|---|---|---|---|
| path | Path to the file. When specified it override the path specified in group name (name between [] parenthesis) | Any string | group name (string between '[' ']') |
| type | Type of the metadata | Any string | Based on filename |
| remove | Remove specified file/type from repodata |
true or false
|
false |
| compress | Compress the new metadata before adding it to repo |
true or false
|
true |
| compress-type | Compression format to use |
gz, bz2, xz
|
gz |
| checksum | Checksum type to use |
md5, sha, sha1, sha224, sha256, sha384, sha512
|
sha256 |
| unique-md-filenames | Include the file's checksum in the filename |
true or false
|
true |
| new-name | New name for the file. If compress is true, then compression suffix will be appended. If unique-md-filenames is true, then checksum will be prepended. |
Any string | Original source filename |
- Lines beginning with a '#' and blank lines are considered comments.
- If
remove=trueis used, all other config related to the record will be ignored.