| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
When called in spec context, the package structs are properly freed
but in rpmdeps context, commit 49f2bb7d8fd91f2d8b22bf7128fd3defe4ed5434
only added a "dirty kludgery" to make it not blow up. This causes
the rpmds structures created in rpmfcApplyInternal() to leak memory.
Make freePackage() internally available and use it for freeing the
dummy struct too to fix.
(cherry picked from commit df4f6a20c3bbf0d319643c17fb16364f64a1b10a)
|
|
|
|
| |
(cherry picked from commit 1d1ff6c86fc9afb4c6c89b42fdb5be851f13cb7a)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will send the output from rpmfcPrint() to stdout. This is an
alternative to using the --rpmfcdebug option, which will send the same
output to stderr. The two options have totally different use cases
though. While --alldeps is used when the output from rpmfcPrint() is
what is wanted, --rpmfcdebug can be used together with the other
output options, e.g., --requires, without affecting their output.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@gmail.com>
(cherry picked from commit 6cec28ff044ad0246f6b43c20f9fc44800fc892e)
|
|
|
|
|
|
|
| |
Fixes: 9d5bbd9774d00f50749bb045217eaf91c87b6de0
References: https://bugzilla.redhat.com/show_bug.cgi?id=1468476
Tested-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Signed-off-by: Florian Festi <ffesti@redhat.com>
|
|
|
|
|
|
| |
This reverts commits f23821c80be45a9291b007636dccc4783f2f32bd
and e2435b093314576230445d68354f7e21e191e9d9 that were accidentally
pushed during review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With double quoting, macro arguments may contain spaces.
Every odd occurrence of double quotes denotes begin of an argument.
Every even occurrence denotes the end of an argument.
Arguments are taken without quotes.
Examples:
./rpm --define "%foo() 1:%1 2:%2 3:%3" \
--eval '%foo "Next argument will be empty" "" "Last argument"'
1:Next argument will be empty 2: 3:Last argument
or without spaces between arguments:
./rpm --define "%foo() 1:%1 2:%2 3:%3" \
--eval '%foo "Next argument will be empty""""Last argument"'
1:Next argument will be empty 2: 3:Last argument
|
|
|
|
|
| |
Resolves regression introduced with 8f509d6
Fixes #224
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For NSPR, (which NSS uses internally) being portable to Windows and
whatnot and centered around apps like Firefox, simply ignoring
SIGPIPE is probably a reasonable choice. Rpm however is an old school
unix cli piece where SIGPIPE is very much relevant and handled where
necessary. Besides we now have not just one but two other, less obnoxious
crypto backends which exhibit different core rpm behavior due to the
difference, not good.
Save and restore the SIGPIPE handler across NSS initialization,
and remove all the now redundant calls to reset it after forking.
Should've done this ages ago but better late than never, no?
Note that the install-time scriptlet thing is different since we set
SIGPIPE to SIG_IGN by ourselves there, add a comment.
|
|
|
|
|
|
|
| |
Mostly achieved by replacing custom parser with the parseRCPOT().
Closes: https://github.com/rpm-software-management/rpm/issues/167
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
| |
|
|
|
|
|
|
|
| |
Using the FLGS tags is awkward and inconsistent with other part of the code
routinly use the NAME tags to denominate the type of dependencies.
This is also going to make using parseRCPOT() easier for the rpmfc code
that is also based on NAME tags.
|
|
|
|
|
|
|
|
| |
The missing space style-error has been recently coming common enough
somebody might think that IS the expected style, its not. Some of these
are actually very old, but fix across the board for consistency..
Strictly white-space only change.
|
| |
|
|
|
|
| |
Needed for next commit
|
|
|
|
|
|
| |
After automatic dependencies are generated filter out from them
unversioned dependencies if versioned dependencies with the same name,
type and color already exist.
|
|
|
|
|
|
|
|
| |
Often people have problems which can be solved by using the internal
dependency generator instead of the external one (rhbz: 1297557,
1326871, ...) and they are not aware that the external dependency
generator is deprecated and it shouldn't be used. So show a warning to
inform people about this fact.
|
|
|
|
|
| |
This passes the filenames with the actual file content to the dependency
generators when using RemovePathPostfixes (rhbz#1306559).
|
|
|
|
| |
They are generating warnings.
|
|
|
|
|
|
|
|
|
|
| |
Options added to rpmdeps tool:
--recommends
--suggests
--supplements
--enhances
--conflicts
--obsoletes
|
|
|
|
| |
Make shure parameter descriptions in doc strings match the functions
|
| |
|
|
|
|
|
|
|
| |
- Legacy generators dont create a dependency dictionary, in which
case there's no point adding per-file depends dictionary indexes
(all zeros) either. Should've probably been in
commit 05636a7db213e8255d6893c638a80d52390c3527 already.
|
|
|
|
|
| |
- Rename the actual worker functions for consistency, rpmfcApply()
is now just a simple wrapper around the two
|
|
|
|
| |
- This is already available through fc
|
| |
|
| |
|
|
|
|
|
|
| |
- There's no good reason for having a "current index" within fc,
and the code is easier to read when its clear its just an index
of a silly for-loop and not something fancier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- File coloring affects ability to install packages on multilib
systems when relying on color conflict resolution (eg Fedora, RHEL),
and that has zero to do with whether package dependencies are being
automatically generated or not. Always generate file classification
and the coloring based on that.
- Besides fixing coloring where AutoReqProv: 0 is used (ie RhBug:1150209),
this also fixes two issues when the legacy external dependency generator
is used: file coloring (RhBug:lotsa) and config() dependency generation.
So in default configuration, internal vs external depgen now only
affects whether dependencies are recorded on file or package level,
otherwise the produced packages should be fully equivalent now.
|
|
|
|
|
|
| |
- Another regression from the recent rpmfc work, in rpmdeps context
there's no spec or packages from it. Allocate a dummy package so
we have some place to store the dependencies. And yes its ugly.
|
|
|
|
|
|
|
| |
- Since commit a357c99c58a5e1367160dfa692f26d14bd3a3df1 the dependencies
are no longer in the header so there's little to print from there.
As it happens things are much saner this way, we no longer need
to create rpmds'es just to print stuff.
|
| |
|
| |
|
|
|
|
| |
Add the dependencies generated from the files to the package and write them to the header at the end.
|
|
|
|
|
|
| |
- Fixes regression from commit 0c2a5d58688699115503a1fc54dab40f80e4caab
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
|
|
|
|
|
|
|
|
| |
- Avoid pool setup + teardown for each and every dependency we create,
and string copy between pools on subsequent rpmdsMerge(). Probably
wont make much of a difference in practise since the number of
dependencies per package isn't *that* big, but wont hurt either
(and who knows what kind of texlive-monsters we get thrown at...)
|
|
|
|
| |
so rpmPackageFilesArchive() has only one rpmfi object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Get rid of the crazy tag-tango around rpmfi in genCpioListAndHeader():
pkg->cpioList is an rpmfi with the actual in-package paths, and
on-disk package paths are passed around as a separate array. This
simplifies and sanitizes things a lot... and also finally gets rid
of fi->apath entirely.
- Dependency generation wants on-disk paths, but it can generate those
by prepending buildroot, which actually makes it more obvious what's
going on.
- This also kills %{_noPayloadPrefix} ancient-history compatibility flag.
We could honor it in rpmfiArchiveWriteHeader() if we cared but we're
talking about rpm < 3.0.5 compatibility here ... so we dont.
|
|
|
|
|
|
|
| |
- Previously we just silently ignored any junk thrown at us, try to
do a little better than that. This still merrily accepts things like
<< as equal to < but at least we now issue errors on totally bogus
garbage in range.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Split dependency generator output by lines, not just any whitespace.
This is what all known dep generators do anyhow, and gives us a
much better chance at validating the input on rpm-side.
- Further split each line into components with poptParseArgvString()
and let parseDep() take care of the details and actually report
any errors we find.
- Using popt's argv parsing has the nice bonus of handling quotes,
so we can now sanely handle cases like RhBug:503846 as we now
a) accept whitespace in dependencies if properly quoted
b) report errors on bad generator output
|
|
|
|
|
| |
- This should behave pretty much identically to how we always did things,
just paving way for actual sanity checking and error reporting here.
|
| |
|
|
|
|
|
| |
- Doesn't affect anything yet as currently rpmfcHelper() always returns 0
and rpmfcHelperFoo() returns are ignored...
|
|
|
|
|
|
| |
- We already have the manually added dependencies in the per-package
rpmds'es so we can just merge, no need to reconstruct them from
the header.
|
| |
|
|
|
|
|
| |
- Memory use isn't typically that critical during build, but saving
a little bit of it doesn't hurt anyway...
|
|
|
|
|
|
|
|
|
|
| |
- argiAdd() isn't as costly as argvAdd(), but it still involves unnecessary
reallocation on every addition as the number of files is predetermined,
and each file has an associated class index.
- Additionally fixes a mostly harmless glitch introduced in commit
65e616cc9fdd00f523939088fab1070021b9f742: the pool id's are one larger
than the indexes we store in headers, take this into account in the
debug output.
|
|
|
|
|
|
| |
- argiAdd() isn't as costly as argvAdd(), but it still involves unnecessary
reallocation on every addition as the number of files is predetermined,
and each file has an associated color (whether its zero or something else)
|
|
|
|
|
|
|
|
| |
- argvAdd() gets more and more costly as the number of files increase,
use a plain old string array where one is called for: the size
is predetermined (from another argv) and we're just copying the
strings for internal storage here. We do need to pay a little bit
more attention to details now though.
|
|
|
|
|
|
|
|
| |
- The pool is mostly just a dumb storage space for this case, but
insertion to pool is far more efficient than argv search, add,
sort operation. The order does not matter as the actual information
is encoded in the string and then painfully parsed out again. This
could really use a special-purpose data structure for sanity but...
|
|
|
|
|
|
|
|
|
|
|
| |
- The string pool is a natural fit for this and much more efficient
when the number of files (and classes) is large.
- This does have an effect on the generated classdict array: it's no
longer sorted, and we no longer always (possibly unnecessarily)
insert an empty string and "directory" in it, but only when they
actually exist. Neither change makes any difference for usage,
unless some 3rd party software is making assumptions about the
classdict contents they shouldn't be making (very unlikely anyway)
|