Section: User Contributed Perl Documentation (1)
Updated: 2018-08-01
Page Index


genhdlist2 - generates an hdlist and a synthesis file  


    genhdlist2 [options] dir



Do not use existing, build hdlist from scratch.
Use the given file to know which file dependencies are used by other media. Here is an example of use:

    package foo in medium contrib requires /bin/bar
    package bar in medium main has file /bin/bar

    % echo /bin/bar > media/media_info/file-deps
    % genhdlist2 --file-deps media/media_info/file-deps media/main/release

    without file-deps, media/main/release/media_info/ would not provide /bin/bar.

This option is not needed for file-deps inside a same medium.

Do not generate MD5SUM file.
Do not abort on bad rpms.
Take into account old-rpms.lst, but don't remove rpms from repository
genhdlist2 will only clean old rpms from repository, it will not update hdlist/synthesis.
Don't lock the media (can be useful when locks fail, eg NFS). Since the lock is used to verify no other genhdlist2 process is running on the same media, it is a dangerous option.
By default if no *.rpm files are found, genhdlist2 will exit on error. To allow building empty media, use this option.
--media_info-dir directory
Write hdlist/synthesis in this directory instead of <dir>/media_info (mostly useful for debugging)
--synthesis-filter SUFFIX:FILTER
Use SUFFIX for filename suffix and filter through FILTER for compression. By default genhdlist2 will use '.cz:xz -7'.
Force to generate xml info. By default genhdlist2 will only regenerate xml info files already there in media_info/
--xml-info-filter SUFFIX:FILTER
Use SUFFIX for filename suffix and filter through FILTER for compression. By default genhdlist2 will use '.lzma:xz -7'.
Force to generate versioned media info.
Disable generation of
Be verbose. Use one more -v to get even more verbose.
Quiet mode.


genhdlist2 is used to generate an hdlist and an associated synthesis file from a set of RPM packages found in the directory passed on the command-line. It will put the hdlist and synthesis files in media_info/ sub-directory.

Without --clean, genhdlist2 is incremental, ie it will use existing media_info/ it will first remove package headers for packages that are no more in the directory. It will then add new packages. This makes an important assumption: name-version-release-arch is enough to uniquely indentify a package. So if foo-1-1 is in hdlist, genhdlist2 will keep it and not bother verifying if it really is the same package.

Contrary to gendistrib, genhdlist2 doesn't have to be work on all media at once. For this, it assumes no inter media file dependencies are used. If you still have inter media file dependencies, you can use option --file-deps.  


gendistrib(1), parsehdlist(1)  


Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 MandrakeSoft SA

Copyright (C) 2005, 2006, 2007 Mandriva SA

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.