Merge lp://staging/~evfool/synaptic/lp945997 into lp://staging/synaptic
Status: | Needs review |
---|---|
Proposed branch: | lp://staging/~evfool/synaptic/lp945997 |
Merge into: | lp://staging/synaptic |
Diff against target: |
68 lines (+20/-7) 2 files modified
common/rpackage.cc (+18/-7) gtk/gtkbuilder/window_main.ui (+2/-0) |
To merge this branch: | bzr merge lp://staging/~evfool/synaptic/lp945997 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Hartwig (community) | Approve | ||
synaptic-developers | Pending | ||
Review via email: mp+138974@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-11-22.
Description of the change
This branch contains the following fixes:
* installed version and latest available version field values made selectable in the embedded package properties pane (related to bug #173464)
* installed files listing did not work for multiarch packages as the name() already contained the arch, so i have added a check to make sure we try both with and without the arch suffix (if name contains : we already tried with the arch suffix, try without it, and if the name doesn't contain :, add the arch suffix and try with that). This fixes bug #945997.
Unmerged revisions
- 2117. By
-
Added check to see if package is installed
- 2116. By Robert Roth
-
Fixed string searching issues based on review feedback
- 2115. By Robert Roth
-
Fixed installed files listing for multiarch packages (LP: #945997)
- 2114. By Robert Roth
-
Made installed version and available version in the embedded package properties pane selectable (LP: #173464)
The comment “try multiarch name next” no longer applies, replaced by the new comment you insert.
The logic here seems ok.
Portability issues:
+ int index = namestr. find_first_ of(":") ;
+ if (index > -1) {
string: :find_first_ of returns string::size_type, not int. It should not be coerced prior to comparing it to the “char not found“ value, or using it with any string functions. Generally, it is never necessary to explicitly coerce string::size_type.
The “char not found” value is string::npos, not -1. Although equivalent for some implementations of string in some libraries, you can not rely on that:
string::size_type index = namestr. find_first_ of(":") ;
if (index != string::npos) {