Skip to content

Commit

Permalink
Denote when upgrades will be ignored
Browse files Browse the repository at this point in the history
Much like `pacman -Qu`, sync doesn't care about IgnorePkg.
  • Loading branch information
falconindy committed Oct 2, 2018
1 parent 8c2b086 commit b7f1eeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/auracle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ int Auracle::Sync(const std::vector<PackageOrDependency>& args) {
if (options_.quiet) {
std::cout << format::NameOnly(r);
} else {
std::cout << format::Update(*iter, r);
std::cout << format::Update(*iter, r,
pacman_->ShouldIgnorePackage(r.name));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ std::ostream& operator<<(std::ostream& os, const Update& u) {
namespace t = terminal;

os << t::Bold(u.from.pkgname) << " " << t::BoldRed(u.from.pkgver) << " -> "
<< t::BoldGreen(u.to.version) << "\n";
<< t::BoldGreen(u.to.version) << (u.ignored ? " [ignored]" : "") << "\n";

return os;
}
Expand Down
5 changes: 3 additions & 2 deletions src/format.hh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ struct Long {
};

struct Update {
Update(const dlr::Pacman::Package& from, const aur::Package& to)
: from(from), to(to) {}
Update(const dlr::Pacman::Package& from, const aur::Package& to, bool ignored)
: from(from), to(to), ignored(ignored) {}

friend std::ostream& operator<<(std::ostream& os, const Update& u);

private:
const dlr::Pacman::Package& from;
const aur::Package& to;
const bool ignored;
};

// TODO: custom formatting
Expand Down

0 comments on commit b7f1eeb

Please sign in to comment.