summaryrefslogtreecommitdiff
path: root/src/trust.cc
blob: 73c0cbae960d70cbcbe0974845b1b3896f308edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// trust.cc

#include "aptitude.h"
#include "trust.h"

#include <generic/apt/apt.h>

#include <cwidget/fragment.h>
#include <cwidget/config/colors.h>

namespace cw = cwidget;

cw::fragment *make_untrusted_warning(const pkgCache::VerIterator &ver)
{
  if(package_trusted(ver))
    return NULL;
  else
    return indentbox(0,
		     strlen(_("WARNING"))+2,
		     flowbox(cw::fragf(_("%F: This version of %s is from an %Buntrusted source%b!  Installing this package could allow a malicious individual to damage or take control of your system."),
				   cw::text_fragment(_("WARNING"),
						 cw::get_style("TrustWarning")),
				   ver.ParentPkg().Name())));
}