summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-29 08:58:27 +0300
committerPanu Matilainen <pmatilai@redhat.com>2010-03-29 08:58:27 +0300
commitc0eb82dd1f2102f2b4899c1e7232086c41d2e805 (patch)
treeed84188714c96e75d4e0f4abddb7c36eb6346463 /build
parentbf2bc18ebb325f081ade65adc2fbb6858f0b8396 (diff)
downloadrpm-c0eb82dd1f2102f2b4899c1e7232086c41d2e805.tar.gz
rpm-c0eb82dd1f2102f2b4899c1e7232086c41d2e805.tar.bz2
rpm-c0eb82dd1f2102f2b4899c1e7232086c41d2e805.zip
Teach rpm about pre-transaction dependencies
- A pre-transaction dependency is generally anything that must be available at the start of the transaction, and cannot be resolved by packages *in* the transaction. This lets %pretrans scriptlet dependencies be expressed correctly, and could be also used for other kinds of pre-conditions. - rpmlib() dependencies are a special case of pre-trans dependencies but leaving them handled separately as they cannot be provided by anything in rpmdb either, whereas pretrans dependencies can.
Diffstat (limited to 'build')
-rw-r--r--build/parsePreamble.c1
-rw-r--r--build/parseScript.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 7d5e9ca4b..eb6385a92 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -126,6 +126,7 @@ static struct tokenBits_s const installScriptBits[] = {
{ "post", RPMSENSE_SCRIPT_POST },
{ "rpmlib", RPMSENSE_RPMLIB },
{ "verify", RPMSENSE_SCRIPT_VERIFY },
+ { "pretrans", RPMSENSE_PRETRANS },
{ NULL, 0 }
};
diff --git a/build/parseScript.c b/build/parseScript.c
index 492df0ec3..0948ba993 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -131,7 +131,7 @@ int parseScript(rpmSpec spec, int parsePart)
break;
case PART_PRETRANS:
tag = RPMTAG_PRETRANS;
- tagflags = 0;
+ tagflags = RPMSENSE_PRETRANS;
progtag = RPMTAG_PRETRANSPROG;
flagtag = RPMTAG_PRETRANSFLAGS;
partname = "%pretrans";