Merged #2917 into master.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2917#event-12039458910
You are receiving this because you are subscribed to this thread.
Message ID:
___
Rpm-maint
@pmatilai approved this pull request.
I actually meant you could just as well inline the whole lookup in what you're
calling checkPart() since there are no other users for this in sight, but works
for me.
--
Reply to this email directly or view it on GitHub:
@ffesti commented on this pull request.
> + return p->token;
+ }
+}
+return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+const struct PartRec *p;
+
+for (p = partList; p->token != NULL; p++) {
+ if (p->part == part) {
+ return
@ffesti pushed 1 commit.
137a4353cf32f7a4d10d05d216dbd9392f84acc4 Don't allow build directives in
generated specs
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2917/files/8dcf8824b2e7c00097e28e7ac1d4e939e431a0ab..137a4353cf32f7a4d10d05d216dbd9392f84acc4
You are
@pmatilai commented on this pull request.
> + return p->token;
+ }
+}
+return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+const struct PartRec *p;
+
+for (p = partList; p->token != NULL; p++) {
+ if (p->part == part) {
+ return
@ffesti commented on this pull request.
> + return p->token;
+ }
+}
+return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+const struct PartRec *p;
+
+for (p = partList; p->token != NULL; p++) {
+ if (p->part == part) {
+ return
Oh and for whatever reason, there's some po/ submodule update in here:
> diff --git a/po b/po
index d5cc5d368e..eee506492f 16
--- a/po
+++ b/po
@@ -1 +1 @@
-Subproject commit d5cc5d368e2cbb639156b3f6ceb824a8815fdeba
+Subproject commit eee506492f5fe2f4fe8940c5e5b088b42167b790
(also visible in
@pmatilai commented on this pull request.
> + return p->token;
+ }
+}
+return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+const struct PartRec *p;
+
+for (p = partList; p->token != NULL; p++) {
+ if (p->part == part) {
+ return
@ffesti commented on this pull request.
> @@ -1060,71 +1069,72 @@ typedef const struct PreambleRec_s {
int type;
int deprecated;
int ismacro;
+int beforebuildonly;
`prebuildonly` it is. Not that I am looking for any hills...
--
Reply to this email directly or view it on
@ffesti commented on this pull request.
> {0, 0, 0, 0}
};
/**
*/
static int findPreambleTag(rpmSpec spec,rpmTagVal * tag,
- const char ** macro, char * lang)
+ const char ** macro, char * lang, int * beforebuildonly)
Done. I looked at the same issue
@pmatilai commented on this pull request.
> @@ -1060,71 +1069,72 @@ typedef const struct PreambleRec_s {
int type;
int deprecated;
int ismacro;
+int beforebuildonly;
This is certainly better than the not-version (negations in variable names are
the wrong thing, every time),
@pmatilai commented on this pull request.
> {0, 0, 0, 0}
};
/**
*/
static int findPreambleTag(rpmSpec spec,rpmTagVal * tag,
- const char ** macro, char * lang)
+ const char ** macro, char * lang, int * beforebuildonly)
findPreambleTag() is of course
@pmatilai commented on this pull request.
> + return p->token;
+ }
+}
+return NULL;
+}
+
+static const int partBeforeBuildOnly(int part)
+{
+const struct PartRec *p;
+
+for (p = partList; p->token != NULL; p++) {
+ if (p->part == part) {
+ return
@ffesti commented on this pull request.
> @@ -1109,6 +1123,25 @@ static rpmRC parseSpecSection(rpmSpec *specptr, int
> secondary)
goto errxit;
}
+ if (stage == PARSE_GENERATED) {
+ switch (parsePart) {
+ case PART_PREP:
+ case
@ffesti pushed 1 commit.
1e89c45a1336b3927caa5222a536d2864b1c0c16 Don't allow build directives in
generated specs
--
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2917/files/b1eb41516fd8a6674f334502f98a99d3aa7f9a58..1e89c45a1336b3927caa5222a536d2864b1c0c16
You are
@pmatilai commented on this pull request.
> @@ -1060,71 +1069,72 @@ typedef const struct PreambleRec_s {
int type;
int deprecated;
int ismacro;
+int notgenerated;
"notgenerated" is not the greatest name ever :smile:
Maybe "isgenerated" and just flip the meaning around?
@pmatilai commented on this pull request.
> @@ -1109,6 +1123,25 @@ static rpmRC parseSpecSection(rpmSpec *specptr, int
> secondary)
goto errxit;
}
+ if (stage == PARSE_GENERATED) {
+ switch (parsePart) {
+ case PART_PREP:
+ case
@ffesti commented on this pull request.
> + if (stage == GENERATED) {
+ switch (tag) {
+ case RPMTAG_SOURCE:
+ case RPMTAG_PATCH:
+ case RPMTAG_NOSOURCE:
+ case RPMTAG_NOPATCH:
+
@ffesti commented on this pull request.
> @@ -21,6 +21,11 @@
#define ALLOWED_CHARS_EVR ALLOWED_CHARS_VERREL "-:"
#define LEN_AND_STR(_tag) (sizeof(_tag)-1), (_tag)
+enum parseStages {
+SPECFILE,
+BUILDSYS,
+GENERATED,
Done
--
Reply to this email directly or view it on GitHub:
@ffesti pushed 2 commits.
69b688ed04e78f40c9565f570e5fb72b8f64a057 Add parseStages enum
b1eb41516fd8a6674f334502f98a99d3aa7f9a58 No build directives in generated spec
parts
--
View it on GitHub:
@pmatilai commented on this pull request.
> @@ -21,6 +21,11 @@
#define ALLOWED_CHARS_EVR ALLOWED_CHARS_VERREL "-:"
#define LEN_AND_STR(_tag) (sizeof(_tag)-1), (_tag)
+enum parseStages {
+SPECFILE,
+BUILDSYS,
+GENERATED,
Use some unique prefix on the enum names, makes it easier
@pmatilai commented on this pull request.
> + if (stage == GENERATED) {
+ switch (tag) {
+ case RPMTAG_SOURCE:
+ case RPMTAG_PATCH:
+ case RPMTAG_NOSOURCE:
+ case RPMTAG_NOPATCH:
+
22 matches
Mail list logo