Age | Commit message (Collapse) | Author | Files | Lines |
|
Make the regex more strict and decompose it right away instead of doing
a second pass over it. Only initialize minor when we need to update the
format. And fix the error for an invalid format to stop referencing the
Format field, which might not be involved during the parsing.
|
|
This makes it easier to construct a source package object with the
desired object, and initialize it as required.
Prompted-by: James McCoy <jamesan@debian.org>
Ref: https://salsa.debian.org/debian/devscripts/merge_requests/61
|
|
|
|
If the option has not been set, then the source format does not support
it and we should thus not recommend the --include-removal option in the
warning.
Closes: #913012
|
|
We initialized it already in the new constructor, no point in doing the
same twice.
|
|
Running code in the module scope means that anything importing the
module will execute that code, which is undesirable. Move the
initialization into a _select_objdump() sub, which gets assigned into
a state variable on demand.
|
|
The spawn() call was removed but not the matching import.
Fixes: commit 8ae966ae7d3635b8359829085db4262923ceae96
|
|
The default buildflags got moved from the Dpkg::BuildFlags module to
the Dpkg::Vendor::Debian, but this module was not adapted to match.
Instead of running the Debian hooks after the Ubuntu buildflags are set
up, run them first, and then modify/prepend the bits we need to change.
This fixes compiler optimization on ppc64el, and makes setting it more
future proof.
Fixes: commit d5374bc618310917557daa9c9ac2f4930515a0b2
Closes: #915881
Co-Author: Iain Lane <laney@ubuntu.com>
Co-Author: Adam Conrad <adconrad@ubuntu.com>
|
|
This makes several call sites more clear, as we move the logic inside
the function.
|
|
We should keep these and consider them as pseudo-EOF markers, and stop
processing once seen.
[lamby@debian.org:
- Initial test cases for dpkg-mergechangelogs functional tests. ]
Closes: #916056
|
|
|
|
Document inherited methods. Document the return values. Note which
arguments are optional. Reorder methods by their position in the stack.
|
|
This makes it possible to reuse the code by other modules.
|
|
|
|
The check is very simple, and can be done w/o requiring calling diff(1)
for each input file.
This makes the code shorter, more portable, and should be faster in the
non-binary cases.
|
|
|
|
This will contain different data depending on the program used. We do
not really care about that, later versions of GnuPG have stopped
emitting it, and it makes the test suite fail when using GnuPG 1.x.
Fixes: https://rt.cpan.org/Public/Bug/Display.html?id=127217
|
|
The former calls /bin/pwd, while the latter uses the getcwd() syscall
directly.
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
This option will make the output be in reverse order.
|
|
This will make it possible to track key/value attributes for each file,
so that we can track interesting information and pass it to the various
programs parsing the debian/files file.
|
|
This is a superset of the fixdebugpath feature supported by gcc-8, but
covering in addition mappings for macros such as __FILE__ and similar.
|
|
Architecture:all packages are treated as native ones as part of the
current multi-arch design, the only current exception is in
build dependencies with the :native arch-qualifier.
It looks like this was an oversight when implementing the :native
support, as there's been no rationale found for the current behavior.
Closes: #854438
Analysis-by: Johannes Schauer <josch@debian.org>
|
|
We were trying to use realpath() on nonexistent directories, which means
we'd get undef. Instead just completely ignore nonexistent directories
from any processing.
Fixes: commit 174a5bd2a080847d0ed901d269a2ba74476eba8b
|
|
|
|
Warned-by: perlcritic
Fixes: Subroutines::ProhibitAmpersandSigils
|
|
This way we can distinguish the failure from the success case.
|
|
We might use a vendor specific series file, so we should print the one
being used to notify if this fact.
|
|
This makes the deprecation explicit, so that we can start noticing
what is inappropriately setting this variable for a purpose it was
not designed for.
|
|
Clarify the unknown and unused substitution variable warnings, to try to
make them more clear as to what each implies.
Closes: #904258
|
|
Thanks-to: Niels Thykier <niels@thykier.net> (for typo in dpkg(1))
|
|
To be able to build a source tree, a user needs write permisions on it,
but not necessarily ownership of those files. We check the existing file
permissions and avoid changing them if not necessary, which helps in the
case where the user does not have ownership of those files, and they
were already present.
Closes: #898010
Naming-by: Julian Andres Klode <jak@debian.org>
|
|
This makes the structure easier to comprehend, and easier to read,
otherwise it's difficutl to search for specific methods or functions
and know immediately to what module they belong. It also makes for
more structured POD.
|
|
This method is currently used by Dpkg::Deps::Simple, and is marked as
private by way of its underscore prefix. This will be a problem once
we split the modules into different files, as then we are not supposed
to be using private methods from external modules.
Rename the method, and document it explicitly as being private, while
only giving a partial prototype to deter its use.
|
|
Document each implemented method. This will make it easier to split the
modules into their own files.
|
|
Dependency simplification can only really be done for metadata for which
we have all its context and information during the simplification
process. Anything that relies on the state of the dependencies cannot be
simplified. This means that any dependency that might change the
satisfiability due to the value of Multi-Arch field of the depended on
package cannot be simplified.
Clarify this in the function commends, and add new test cases to cover
this.
Prompted-by: Stuart Prescott <stuart@debian.org>
|
|
|
|
There should be no difference between Copyright and Portions Copyright,
remove the distinction, and merge all these notices.
|
|
We should mention when these functions are present and what they do,
so that users know when they can rely on these.
Warned-by: Test::Pod::Coverage
|
|
Even though we will not use the domain value set by this function, we
should honor its original interface and return a domain string, and
update it when requested.
|
|
This should really be a vendor specific default. It's also documented
that way in the man page.
|
|
This function was being called on each foreach iteration to parse the
options within the DEB_BUILD_MAINT_OPTIONS and DEB_BUILD_OPTIONS
environment variables, and needed to parse these at construction time
every time. Inlining it should make it more performant and in addition
reduce line count.
|
|
The usage in this file is correct, but we are still doing boolean
evaluation.
|
|
We should always assign a proper Dpkg::Version object to the deprecated
variable. Otherwise it can get confused with the scalar value 0 used on
boolean context to denote it is *not* deprecated, instead of it being
a version number 0.
|
|
Give context to the warning message, otherwise it's not clear what is
going on. If the users to not conditionalize the warning usage they will
get a perl warning about the unknown warning category itself, bump the
module version to be able to discern this change, and update documentation
to reflect this.
|
|
|
|
|
|
We can just assign an anonymous sub to the typeglob.
|
|
Instead of relying on the tail command, simply read the end of the
file ourselves, assuming a packed set of 80 character lines, reading
4096 bytes before the end, implies around 51 lines, which is close
to the 40 lines currently used.
This should be both faster and should improve portability, because even
if we are using the POSIX -n option, some systems do not have a POSIX
compliant tail(1) on the default path, such as Solaris.
Analysis-by: James Clarke <jrtc27@debian.org>
|
|
The current bool overload has broken semantics, because it considers the
version "0" to be false.
The bool overload used to have sane semantics (equivalent to is_valid())
before commit 5b9f353b2940de751df47036608afbe71992d622, but there it got
changed to return the stringified version if it was valid, or undef
otherwise, to fix a problem within dpkg-shlibdeps, instead of properly
fixing the local-only problem in the tool. This makes the overload hard
to use, and broke existing callers from external projects.
We will emit a warning until dpkg 1.20.x to notify of the semantic change
in case there is code relying on the broken semantics. For fixed code the
warning can then be quiesced with:
no warnings qw(Dpkg::Version::semantic_change::overload::bool);
Closes: #895004
|
|
An ELF executable is defined by whether the object has the EXEC_P flag
defined or an interpreter in the program header. The former applies to
statically linked programs, the latter to dynamically linked programs
and possibly some shared libraries that can be executed, such as the
ones provided by glibc.
This is now more relevant as PIE makes normal executables show up as
shared objects, so they do not contain the EXEC_P flag, and were not
being detected as executables.
|