home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 January / Disc 3 / Amethyst.iso / live / usr / lib / rpm-3.0.6 / rpmpopt < prev    next >
Encoding:
Text File  |  2001-04-06  |  4.8 KB  |  116 lines

  1. #
  2. # This file *should not be modified*. Local customizations
  3. # belong in /etc/popt, not here. This file will be replaced
  4. # whenever a new version of RPM is installed.
  5. #
  6. # (best viewed with 132 columns... ;^)
  7.  
  8. rpm alias --scripts --qf '\
  9. %|PREIN?{preinstall script\
  10. %|PREINPROG?{ (through %{PREINPROG})}|:\n%{PREIN}\n}:\
  11. {%|PREINPROG?{preinstall program: %{PREINPROG}\n}|}|\
  12. \
  13. %|POSTIN?{postinstall script\
  14. %|POSTINPROG?{ (through %{POSTINPROG})}|:\n%{POSTIN}\n}:\
  15. {%|POSTINPROG?{postinstall program: %{POSTINPROG}\n}|}|\
  16. \
  17. %|PREUN?{preuninstall script\
  18. %|PREUNPROG?{ (through %{PREUNPROG})}|:\n%{PREUN}\n}:\
  19. {%|PREUNPROG?{preuninstall program: %{PREUNPROG}\n}|}|\
  20. \
  21. %|POSTUN?{postuninstall script\
  22. %|POSTUNPROG?{ (through %{POSTUNPROG})}|:\n%{POSTUN}\n}:\
  23. {%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
  24. \
  25. %|VERIFYSCRIPT?{verify script:\n%{VERIFYSCRIPT}\n}|\
  26. '
  27.  
  28. rpm alias --setperms -q --qf "\
  29. %|FILENAMES?{[%7.7{FILEMODES:octal} %{FILENAMES}\n]}:{}|\
  30. " --pipe "perl -ne 's/^...(\d{4}) (.*)$/chmod $1 $2/;-l $2&&next;$|=1;print;chmod(oct($1),$2)||print STDERR \"chmod: $!\n\";'"
  31.  
  32. rpm alias --setugids -q --qf "\
  33. %|FILENAMES?{[chown %{FILEUSERNAME}.%{FILEGROUPNAME} %{FILENAMES}\n]}:{}|\
  34. " --pipe "perl -ne '/^chown (.+)\.(.+) (.+)$/||next;-l $3&&next;$|=1;print;chown($1,$2,$3)||print STDERR \"chown: $!\n\";'"
  35.  
  36. rpm alias --conflicts    --qf \
  37.   "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]"
  38. rpm alias --obsoletes    --qf \
  39.   "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]"
  40. rpm alias --provides    --qf \
  41.   "[%{PROVIDENAME} %|PROVIDEFLAGS?{%{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}}:{}|\n]"
  42.  
  43. # XXX prereq output is part of requires for query
  44. #rpm alias --prereq    --qf '[%{PREREQ}:depflags\n]'
  45.  
  46. rpm alias --requires    --qf \
  47.   "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]"
  48. rpm alias -R --requires
  49.  
  50. rpm alias --info --qf "\
  51. Name        : %-28{NAME} Vendor: %{VENDOR}\n\
  52. Version     : %-22{VERSION} Distribution: %{DISTRIBUTION}\n\
  53. Release     : %-24{RELEASE} Build Host: %{BUILDHOST}\n\
  54. Install Date: %|INSTALLTIME?{%-24{INSTALLTIME:utc}}:{(not installed)         }| Build Date: %{BUILDTIME:utc}\n\
  55. Size        : %-24{SIZE} Source RPM: %{SOURCERPM}\n\
  56. Group       : %{GROUP}\n\
  57. %|LICENSE?{Copyright   : %{LICENSE}\n}|\
  58. %|PACKAGER?{Packager    : %{PACKAGER}\n}|\
  59. %|URL?{URL         : %{URL}\n}|\
  60. Summary     : %{SUMMARY}\n\
  61. Description :\n%{DESCRIPTION}\n\
  62. "
  63.  
  64. rpm alias --changelog --qf '[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n\n%{CHANGELOGTEXT}\n\n]'
  65.  
  66. rpm alias --triggerscripts --qf '\
  67. [trigger%{TRIGGERTYPE} script (through %{TRIGGERSCRIPTPROG}) -- %{TRIGGERCONDS}\n%{TRIGGERSCRIPTS}\n]'
  68. rpm alias --triggers --triggerscripts
  69.  
  70. rpm alias --last --qf "\
  71. %|INSTALLTIME?{%{INSTALLTIME}}:{000000000}| %{NAME}-%{VERSION}-%{RELEASE} %|INSTALLTIME?{%{INSTALLTIME:utc}}:{(not installed)}|\n\
  72. " --pipe "sort -r -n | awk '{printf(\"%-45s %s\n\", $2, $3)}' "
  73. #rpm alias --last --qf "\
  74. #%{NAME}-%{VERSION}-%{RELEASE}     %|INSTALLTIME?{%{INSTALLTIME:utc}}:{(not installed)}|\n\
  75. #" --pipe "sort -r -b +1"
  76. #rpm alias --last --qf "\
  77. #%|INSTALLTIME?{%{INSTALLTIME:utc}}:{(not installed)}|   %{NAME}-%{VERSION}-%{RELEASE}n\
  78. #" --pipe "sort -r"
  79. rpm alias --last --qf "\
  80. %|INSTALLTIME?{%{INSTALLTIME:utc}}:{(not installed)}| %{NAME}-%{VERSION}-%{RELEASE}\n\
  81. " --pipe "sort -r | awk '{printf(\"%-55s %s\n\", $2, $1)}'"
  82.  
  83. rpm alias --filesbypkg --qf '[%-25{=NAME} %{FILENAMES}\n]'
  84.  
  85. rpm alias --redhatprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatprovides
  86. rpm alias --redhatrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat' --whatrequires
  87.  
  88. # colon separated i18n domains to use as PO catalogue lookaside for
  89. * retrieving header group/description/summary.
  90. #
  91. # For Red Hat, value should be "redhat-dist:redhat-powertools".
  92. rpm alias --i18ndomains --define '_i18ndomains !#:+'
  93.  
  94. # Build policies enabled from command line. Last policy applies.
  95. rpm alias --buildpolicy --define '__spec_install_post /usr/lib/rpm-3.0.6/brp-!#:+'
  96.  
  97. #############################################################
  98. # Additional aliases for Caldera OpenLinux packages...
  99. # $Id: lib-rpmpopt.epilogue,v 1.2 1999/12/17 18:39:59 ray Exp ray $
  100. # (requires a modified rpm-binary!)
  101.  
  102. rpm alias --sc        --OL --short-circuit
  103.  
  104. rpm alias --pkgpath    --qf '%{GROUP}/%{NAME}/%{VERSION}\n'
  105.  
  106. rpm alias --PostIn -q --qf "\
  107. %|POSTIN?{#! %|POSTINPROG?{%{POSTINPROG}}:{/bin/sh}|\n%{POSTIN}\n}:{%|POSTINPROG?{%{POSTINPROG}\n}|}|\
  108. "
  109. rpm alias --PostUn -q --qf "\
  110. %|POSTUN?{#! %|POSTUNPROG?{%{POSTUNPROG}}:{/bin/sh}|\n%{POSTUN}\n}:{%|POSTUNPROG?{%{POSTUNPROG}\n}|}|\
  111. "
  112.  
  113. rpm alias --OLprovides -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/OpenLinux' --whatprovides
  114. rpm alias --OLrequires -q --define '_dbpath /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/OpenLinux' --whatrequires
  115.  
  116.