Age | Commit message (Collapse) | Author | Files | Lines |
|
Missed in commit 73dab65273c589b7eed823adab30870e77171bb8.
|
|
|
|
When recording the available information from the binary package, we
don't want it to possibly create a duplicate pkginfo entry with the
same (but mixed) architecture, and having to cleanup the obsolete one.
Instead we ignore the cross-grade slot finding logic, and just use the
old available slot matching the architecture.
|
|
There's no much point in that function, and if we need to set additional
flags we need most of the inline code anyway.
|
|
|
|
When we have performed a cross-grade, the pkgset will end up with two
pkginfo entries having the same architecture, which would mess up
subsequent lookups. Blank the duplicated pkginfo entry which should
only have a valid but now obsolete available member.
|
|
This is needed to be able to find the correct slot where the package
entry instance from the update log should be inserted to, specially
when dealing with architecture cross-gradings.
|
|
The three common operations are: parsing the status file, parsing the
available file and parsing the control file from a binary package.
This makes the code more obvious and will allow to change their values
centrally.
|
|
This makes the behaviour consistent with the other Packages file
action (i.e. --update-avail).
Missed in commit 357ab385750c1cb657ff95c0b34ad0a6bf6d2cdf.
|
|
This does not apply for package constructors.
|
|
Although the flags will never end up written back to disk, and there's
currently only eflag_reinstreq, it's actually wrong to change their
value during the audit.
|
|
Packages in lesser states do not pose any problem for dependencies.
|
|
|
|
|
|
There's no point in removing the architecture from the actual list, as
dpkg_arch_save() will only write out foreign architectures, and if code
later looks for it, then it will be reintroduced. Rename the function
to dpkg_arch_unmark() so that the name makes more sense.
|
|
|
|
|
|
Regression introduced in commit 0b8652b226a7601dfd71471797d15168a7337242.
Spotted-by: Raphaël Hertzog <hertzog@debian.org>
|
|
Regression introduced in commit b274b0d96da80ef162d45f800777f11b11defe91.
|
|
Replace pkg->set->name with varbuf_add_pkgbin_name(), pkgbin_name() or
pkg_name(). This only changes informative output, so no behaviour change
should result from this.
Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org>
Patch-sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
|
|
Having to keep this information twice is error-prone as it easily gets
out of sync. Having to translate it is bothersome. It's not consistent
across dpkg tools, some do print it some don't. It's currently not
accurate, as the output would need to include the holders for all files
that end up being part of the binary. And listing it in the --versions
output is visually annoying and the wrong place.
Just keep this where it belongs, at the file comment headers, above the
license information.
|
|
[hertzog@debian.org:
- Track pkgbin in struct trigfileint. ]
|
|
|
|
Headers in _SOURCES variables are only used to track files to ship in
the distribution tarball, as dependencies are automatically generated.
So there's no point in the reduntant listings.
|
|
They are replaced with loops using deppossi_pkg_iterator.
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Since a dependency now points to a pkgset, if you want to find the
correct instance of the package that satisfies the dependency, you
have to take into the account the arch affinity expressed by the
dependency.
The function deppossi_pkg_iter_next() now takes care of this. It
can return multiple packages when the dependency is a wildcard one
(foo:any), you just need to pass the iterator previously created
by deppossi_pkg_iter_new(), and free it with deppossi_pkg_iter_free().
Based-on-patch-by: Raphaël Hertzog <hertzog@debian.org>
Patch-sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Use strict types instead of a ‘void *’ pointer.
|
|
|
|
The --foreign-architecture option is not a good interface, the problem
with it comes from the fact that the architectures supported by the
database are not configuration, they are state. This shows up in several
ways.
When a front-end needs to load the list of architectures, it needs to
get someone to parse dpkg.cfg files, this is currently done by dpkg
itself, and the list can be retrieved with --print-foreign-architectures,
the problem appears when wanting a front-end to load them through libdpkg.
Making the latter have to execute «dpkg --print-foreign-architectures»
would be suboptimal, and making libdpkg have to load dpkg.cfg would be
distasteful. Another issue is that if the list of foreign architectures
is on the configuration files it makes it slightly more tricky to
cross-grade dpkg, and it makes it fairly easy to accidentally remove
architectures required by the database.
Replace the option with two new commands --add-architecture and
--remove-architecture which will perform sanity checks and store and
load the architecture list (including the native arch) in an internal
db file under /var/lib/dpkg/.
|
|
[hertzog@debian.org:
- Switch dselect method option file. ]
|
|
|
|
|
|
Switch dpkg_arch_get_native() to dpkg_arch_get(arch_native), and
dpkg_arch_find() calls to direct dpkg_arch_get() ones.
|
|
Printing just a line with space separated entries makes both the code
to print and to parse slightly more complicated. The worst part comes
from parsing as the standard stream input operations require delimited
buffers, and as such if those buffers would not be enough truncation
would happen.
|
|
LP: #369898
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Although all users of replacingfilesandsaid are previously calling
clear_istobes() to make sure it's initialized, doing so when allocating
clientdata is safer from an API point of view.
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
|
|
A diversion is recorded against a package name, thus a pkgset. This is
due to the fact that different instances of the same pkgset cannot have
conflicting pathnames, if they do the pathname object should be the
same.
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
The occurrences that concern triggers and diversions will be replaced
in a later commit.
Most of the remaining occurrences in src/* will be replaced in an update
implementing the parsing of package specifiers in the input.
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
This will avoid a name clash with the upcoming function of the same
name.
|
|
Change some functions to use pkgset instead of pkginfo in order to avoid
some deppossi->ed->pkg lookup which are inherently wrong.
Analyzing reverse dependencies does not need a pkginfo but only a pkgset.
This consideration is the basis for the refactoring done here.
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
It's common for packages to “Provides: foo” and “Conflicts: foo”
when taking over another package. This self-conflict is explicitly
ignored by dpkg.
Now if multiple instances of a “Multi-Arch: same” package do this,
it should still be allowed. Update the checks accordingly both in
dpkg and in dselect.
Sponsored-by: Linaro Limited
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
Implement support for the packagename:archname syntax in package
relationships, required for multiarch.
Also, the only architecture value currently allowed is “any”, consistent
with round one of <https://wiki.ubuntu.com/MultiarchSpec>. This may be
relaxed before the wheezy release to allow for arch-specific cross
dependencies in the next release, but should probably not be relaxed
for package generation in order to avoid accidental archive uploads of
uninstallable packages.
[guillem@debian.org:
- Rearrange struct deppossi for better memory alignment.
- Do not print the arch qualifier if arch_none instead of NULL.
- Check against arch_wildcard instead of the literal string.
- Check archlength == 0 instead of arch[0] being NUL. ]
Signed-off-by: Guillem Jover <guillem@debian.org>
|
|
The code does not do anything yet with this new argument, but it will
allow it to access the multiarch information, once the on-disk layout
is changed.
|
|
|