]> git.pld-linux.org Git - packages/adapter.git/commitdiff
- remove cvs leftover: changelog formatting
authorElan Ruusamäe <glen@delfi.ee>
Wed, 11 Jul 2012 15:17:05 +0000 (18:17 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 11 Jul 2012 15:17:05 +0000 (18:17 +0300)
adapter.awk

index 381c942c92612d3869447d0ddb0396c9a575d181..414f4d7d2db42ae4ec50d71bee18d91a6a49622d 100644 (file)
@@ -41,7 +41,6 @@ BEGIN {
        usedigest = 0   # Enable to switch to rpm 4.4.6+ md5 digests
 
        preamble = 1    # Is it part of preamble? Default - yes
-       boc = 4                 # Beginning of %changelog
        bod = 0                 # Beginning of %description
        tw = 70                 # Descriptions width
 
@@ -63,9 +62,6 @@ BEGIN {
 
        system("cd "packages_dir"; [ -f rpm.groups ] || cvs up rpm.groups > /dev/null")
        system("[ -d ../PLD-doc ] && cd ../PLD-doc && ([ -f BuildRequires.txt ] || cvs up BuildRequires.txt >/dev/null)");
-
-       # Temporary file for changelog section
-       changelog_file = mktemp("adapter.changelogXXXXXX")
 }
 
 # If the latest line matched /%files/
@@ -153,8 +149,9 @@ function b_makekey(a, b,    s) {
        if ($2 == "_applnkdir") {
                next
        }
+
+       # FIXME: this section will likely never match after cvs->git migration
        if ($2 == "date") {
-               date = 1
                if (did_files == 0) {
                        print "%files"
                        print ""
@@ -526,65 +523,6 @@ function b_makekey(a, b,   s) {
        }
 }
 
-##############
-# %changelog #
-##############
-/^%changelog/, (!/^%changelog/ && $0 ~ SECTIONS) {
-       preamble = 0
-       has_changelog = 1
-       skip = 0
-       # There should be some CVS keywords on the first line of %changelog.
-       if (boc == 3) {
-               if ($0 !~ _cvsmailfeedback) {
-                       print "* %{date} " _cvsmailfeedback > changelog_file
-               } else {
-                       skip = 1
-               }
-               boc = 2
-       }
-       if (boc == 2 && !skip) {
-               if (!/All persons listed below/) {
-                       printf "All persons listed below can be reached at " > changelog_file
-                       print "<cvs_login>" _cvsmaildomain "\n" > changelog_file
-               } else {
-                       skip = 1
-               }
-               boc = 1
-       }
-       if (boc == 1 && !skip) {
-               if (!/^$/) {
-                       if (!/\$.*Log:.*\$/) {
-                               print "$" "Log:$" > changelog_file
-                       }
-                       boc = 0
-               }
-       }
-       # Define date macro.
-       if (boc == 4) {
-               if (date == 0) {
-                       printf "%%define date\t%%(echo `LC_ALL=\"C\"" > changelog_file
-                       print " date +\"%a %b %d %Y\"`)" > changelog_file
-                       date = 1
-               }
-               boc = 3
-       }
-
-       sub(/[ \t]+$/, "");
-       if (!/^%[a-z]+$/ || /changelog/) {
-               # stop changelog if "real" changelog starts
-               if (boc == 0 && /^\* /) {
-                       boc = -1
-               }
-               if (boc == -1) {
-                       next;
-               }
-               print > changelog_file
-       } else {
-               print
-       }
-       next
-}
-
 ###########
 # SCRIPTS #
 ###########
@@ -1069,36 +1007,11 @@ END {
                }
        }
 
-       close(changelog_file)
-       while ((getline < changelog_file) > 0)
-               print
-       system("rm -f " changelog_file)
-
        if (did_clean == 0) {
                print ""
                print "%clean"
                print "rm -rf $RPM_BUILD_ROOT"
        }
-
-       if (date == 0) {
-               print ""
-               print "%define date\t%(echo `LC_ALL=\"C\" date +\"%a %b %d %Y\"`)"
-       }
-
-       if (has_changelog == 0) {
-               print "%changelog"
-       }
-
-       if (boc > 2) {
-               print "* %{date} PLD Team <feedback@pld-linux.org>"
-       }
-       if (boc > 1) {
-               printf "All persons listed below can be reached at "
-               print "<cvs_login>@pld-linux.org\n"
-       }
-       if (boc > 0) {
-               print "$" "Log:$"
-       }
 }
 
 # substitutes fixed strings (not regexps)
@@ -1897,11 +1810,6 @@ function import_rpm_macros(  v) {
                exit(rc = 1);
        }
 
-       # get cvsaddress for changelog section
-       # using rpm macros as too lazy to add ~/.adapterrc parsing support.
-       _cvsmaildomain = ENVIRON["_cvsmaildomain"]
-       _cvsmailfeedback = ENVIRON["_cvsmailfeedback"]
-
        prefix = ENVIRON["_prefix"]
        bindir = ENVIRON["_bindir"]
        sbindir = ENVIRON["_sbindir"]
This page took 0.078064 seconds and 4 git commands to generate.