Parcourir la source

use "<compat>" for "%l_tag_fmt" on upgrades to be more OpenPKG 1.3 compatible

Ralf S. Engelschall il y a 22 ans
Parent
commit
0cf8cba828
3 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 1 0
      openpkg/HISTORY
  2. 1 1
      openpkg/openpkg.spec
  3. 1 0
      openpkg/rpmmacros

+ 1 - 0
openpkg/HISTORY

@@ -2,6 +2,7 @@
 2004
 ====
 
+20040210 use "<compat>" for "%l_tag_fmt" on upgrades to be more OpenPKG 1.3 compatible
 20040210 we more smart and accept not-existing "Class:" headers for compatibility.
 20040209 cleanup "rpmmacros" for consistent "%l_prefix" usage and fix "rpmtool not found" issue
 20040208 added version tracking for OSSP uuid

+ 1 - 1
openpkg/openpkg.spec

@@ -369,7 +369,7 @@ Provides:     openpkg = 1.3.1-1.3.1
     if [ ".%{?l_tag_fmt:set}" = .set ]; then
         tag="%{l_tag_fmt}"
     else
-        tag="<loc>"
+        tag="<compat>"
     fi
     echo "tag=\"$tag\"; export tag" >>.buildenv
 

+ 1 - 0
openpkg/rpmmacros

@@ -38,6 +38,7 @@
 
 #   the OpenPKG package tagging
 %l_tag_fmt               @TAG@
+%l_tag_fmt_compat        %(prefix="%{l_prefix}"; if [ ".`expr $prefix : '/[^/][^/]*$'`" != .0 ]; then loc=`echo $prefix | cut -c2-4`; else loc=`echo $prefix | sed -e 's;/\\(.\\)[^/]*;\\1;g' | cut -c1-3`; fi; echo $loc)
 %l_tag_fmt_loc           %(echo "%{l_prefix}" | sed -e 's;^/\\([^/]\\)[^/]*/\\([^/]\\)[^/]*/\\([^/]\\).*;\\1\\2\\3;' -e 's;^/\\([^/]\\)[^/]*/\\([^/][^/]\\).*;\\1\\2;' -e 's;^/\\([^/][^/]\\)[^/]*/\\([^/]\\).*;\\1\\2;' -e 's;^/\\([^/]\\)[^/]*/\\([^/]\\).*;\\1\\2;' -e 's;^/\\([^/][^/][^/]\\).*;\\1;' -e 's;^/\\([^/][^/]\\).*;\\1;' -e 's;^/\\([^/]\\).*;\\1;')
 %l_tag_fmt_opt           %(uuid_ns="`%{l_uuid} -v3 ns:OID %{l_openpkg_oid_tagfmtopt}`"; %{l_uuid} -v3 $uuid_ns '%{?_options}')
 %l_tag_fmt_uuid          %(%{l_uuid} -v1)